0% found this document useful (0 votes)
14 views

GTK Mathematics2 05 Handout

This document discusses analyzing two-variable functions. It explains how to find critical points by taking partial derivatives and setting them equal to zero. It also discusses using the Hessian matrix and its determinant to determine if a critical point is a minimum, maximum or saddle point. An example problem is worked through as well.

Uploaded by

graczerfanni19
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

GTK Mathematics2 05 Handout

This document discusses analyzing two-variable functions. It explains how to find critical points by taking partial derivatives and setting them equal to zero. It also discusses using the Hessian matrix and its determinant to determine if a critical point is a minimum, maximum or saddle point. An example problem is worked through as well.

Uploaded by

graczerfanni19
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Mathematics II

Week 5
This week’s topic
Analyzing two-variable functions
Motivation
Similarly to one-variable functions, we might be interested in the extrema of economic functions of two variables.
To that end, we will analyze two-variable functions.
While doing so, we will rely on our experiences concerning one-variable functions.
Critical points
To have an extremum at a given point, a two-variable function must have an extremum in all directions.
It means that the point has to be a critical point in every direction.

However, we are only able to inspect two directions: one which is parallel to the x-z plane, and one which is
parallel to the y-z plane.

So, in order to have an extremum point, both partial derivatives must be 0 (a critical point both ways):
fx′ (a, b) = 0, fy′ (a, b) = 0.

It is a necessary condition but not sufficient.


Critical points both ways, no extremum either ways
It can happen that we have an inflection point both ways.

Or – which is just as bad – extremum one way and infection point the other way. And even if we have extremum
both ways. . .
Critical points both ways, different types of extremum
One of the partial derivatives might increase, and the other might decrease meaning that we have local maximum
one way and local minimum the other way.

In such cases we have a so-called saddle point. But we can be even less lucky. . .
Critical points both ways, local maximum both ways, yet no extremum
We can have critical points both ways, local maximum both ways, yet no extremum.

This function has a saddle point, which we cannot find with the two partial derivatives. It has a minimum “across”.
What are the possibilities?
We have seen that when f is a one-variable function, then
– if f has a local minimum at a, then f ′ (a) = 0, f ′ is increasing at a, thus f ′′ (a) is positive (f is convex),
– if f has a local maximum at a, then f ′ (a) = 0, f ′ is decreasing at a, thus f ′′ (a) is negative (f is concave).

Based on this, we will draw conclusions for two-variable functions.


For that, we will need to consider the second partial derivatives of f .
fxx′′ and fyy′′ denote the second partial derivatives of f with respect to x and y, respectively.

Suppose that (a, b) is a critical point of f (x, y) both ways, that is, fx′ (a, b) = fy′ (a, b) = 0.
The following cases can occur:
1. f has a local minimum at (a, b), for example, x2 + y2 , fxx′′ (a, b) > 0, fyy′′ (a, b) > 0.
2. f has a local maximum at (a, b), for example, −(x2 + y2 ), fxx′′ (a, b) < 0, fyy′′ (a, b) < 0.
3. f has a saddle point at (a, b), for example, x2 − y2 , fxx′′ (a, b) and fyy′′ (a, b) have different signs.
4. f has neither of the above at (a, b), for example, x3 + y3 .
The fact that fxx′′ (a, b) and fyy′′ (a, b) have different signs can be written as fxx′′ (a, b)fyy′′ (a, b) < 0.
Let us check out the function f (x, y) = x2 + y2 + pxy (p is a parameter)

x2 + y2 + pxy
https://www.geogebra.org/3d/etvc2ffd
It can have a saddle point and a minimum. It shows that the “mixed” term (pxy) plays an important role in shaping
the graph of the function – we cannot simply ignore it.
Therefore, it is not enough to check out the so-called clean second partial derivatives (fxx′′ and fyy′′ ), we might need
the mixed second partial derivatives to decide whether we have an extremum or a saddle point.
fxy′′ is short for (fx′ )y′ and, similarly, fyx′′ is short for (fy′ )x′ .
It this case, fx′ = 2x + py, fy′ = 2x + px, fxy′′ = p and fyx′′ = p.
Note that for “nice functions” (the ones we are going to consider), the mixed partial derivatives will be equal:
fxy′′ = fyx′′ .
We need a more complex examination
Let (a, b) be a critical point of f (fx′ (a, b) = fy′ (a, b) = 0), arrange the second partial derivatives of f in a 2 × 2 matrix
(the so-called Hessian matrix):
" ′′
fxx (x, y) fxy′′ (x, y)
#
H(x, y) = ′′ .
fyx (x, y) fyy′′ (x, y)

Its determinant is the function fxx′′ (x, y)fyy′′ (x, y) − fxy′′ (x, y)fyx′′ (x, y).

Substituting (a, b) in place of (x, y), we get the number fxx′′ (a, b)fyy′′ (a, b) − fxy′′ (a, b)fyx′′ (a, b) denoted by D(a, b).

If D(a, b) > 0, then f has a local extremum at (a, b); for fxx′′ (a, b) < 0, a maximum; for fxx′′ (a, b) < 0, a minimum.
If D(a, b) < 0, then function f has a saddle point at (a, b).
if D(a, b) = 0, then further investigation is needed.
Notice that in fxx′′ (x, y)fyy′′ (x, y) − fxy′′ (x, y)fyx′′ (x, y), we have fxy′′ (x, y)fyx′′ (x, y) > 0 (since fxy′′ = fyx′′ ).
Therefore, if fxx′′ fyy′′ < 0, then D < 0. However, if fxx′′ fyy′′ > 0, then D can be positive, negative or zero.
Notice also that when D(a, b) > 0, then fxx′′ (x, y)fyy′′ (x, y) must be positive, therefore, fxx′′ (a, b) and fyy′′ (a, b) must
have the same sign.
Example with calculations
f (x, y) = x3 − y3 − 3x + 3y + xy,

Finding D(x, y): fx′ (x, y) = 3x2 − 3 + y fy′ (x, y) = −3y2 + 3 + x

3x2 − 3 + y = 0 y = −3x2 + 3
) )
Critical points: ; ; adding them: x + y = −3(x2 − y2 ); (x + y) = −3(x + y) (x − y)
2 2
−3y + 3 + x = 0 x = 3y − 3

1
Either x + y = 0, that is, y = −x, or −3(x − y) = 1, thus y = x + .
3
√ √
2 1 ± 1 + 36 1 ± 37
I. If y = −x, then 3x − 3 − x = 0, x1,2 = = , y = −x.
6 6
√ √ √
1 8 −1 ± 1 + 32 −1 ± 33 1 1 ± 33
II. If y = x + , then 3x2 + x − = 0, x3,4 = = , y = x+ = .
3 3 6 6 3 6
Example – continued
(1) (2) (3) (4)
√ √ √ √
1 + 37 1 − 37 −1 + 33 −1 − 33
x >0 <0 >0 <0
6 6 6 6
√ √
1 1 + 33 1 1 − 33
y −x −x x+ = x+ =
3 6 3 6
From fx′ (x, y) = 3x2 − 3 + y and fy′ (x, y) = −3y2 + 3 + x
fxx′′ (x, y) = 6x fxy′′ (x, y) = fyx′′ (x, y) = 1 fyy′′ (x, y) = −6y
D(x, y) = fxx′′ (x, y) · fyy′′ (x, y) − fxy′′ (x, y) = −36xy − 1.

(1) D(a, b) = 1 + 37 + 2 37 − 1 > 0, fxx′′ (a, b) = 6a > 0 ⇒ local minimum.

(2) D(a, b) = 1 + 37 − 2 37 − 1 > 0, fxx′′ (a, b) = 6a < 0 ⇒ local maximum.

(3) D(a, b) = −(33 − 1) − 1 < 0 ⇒ saddle point.

(4) D(a, b) = (1 − 33) − 1 < 0 ⇒ saddle point.


The graph of the function
Summary
Take the first partial derivatives of the function.
Find the critical points.
Calculate the second partial derivatives of the function.
Write the Hessian matrix, find its determinant.
Check the determinant of the Hessian matrix for all (a, b) critical points.
Draw the conclusion:
– if D(a, b) = 0, we cannot tell anything about the behaviour of f at (a, b),
– if D(a, b) < 0, then f has a saddle point at (a, b),
– if D(a, b) > 0 and fxx′′ (x, y) < 0 (and fyy′′ (a, b) < 0), then f has a local maximum at (a, b),
– if D(a, b) > 0 and fxx′′ (x, y) > 0 (and fyy′′ (x, y) > 0), then f has a local minimum at (a, b).
Example 5.1.1.
Two products can be sold at a unit price of x USD and y USD, respectively.
The corresponding demand functions are D1 (x, y) = 500 − 6x + 5y and D2 (x, y) = 200 + 2x − 5y.
How should the unit prices be chosen to maximize the revenue?
Example 5.1.1.
Two products sell for x and y. Demands are: D1 (x, y) = 500 − 6x + 5y; D2 (x, y) = 200 + 2x − 5y. Maximize the
revenue. What is the maximum value of it?

Revenue: R(x, y) = x · D1 + y · D2 = −6x2 − 5y2 + 7xy + 500x + 200y.


12x − 7y = 500
Critical points: Rx′ (x, y) = −12x + 7y + 500, Ry′ (x, y) = −10y + 7x + 200; has to be solved.
−7x + 10y = 200
6400 5900
x= , y= . Thus the function has only one critical point.
71 71
′′ ′′ ′′ ′′
The second partial derivatives: Rxx (x, y) = −12, Ryy (x, y) = −10, Rxy (x, y) = Ryx (x, y) = 7 (all constants).
−12 7
D(a, b) = = 120 − 49 > 0.
7 −10
 
6400 5900 ′′
The function has a local extremum at the point , ; thus, Rxx (x, y) < 0, R has a local maximum here.
71 71
 
6400 5900
Its value taken here is R , ≈ 30 845.07 USD.
71 71
Extra/1
A factory produces two types of products. Let x and y denote the amount of the two products given in tons/month.
The cost of the production is C(x, y) = x2 − 3xy + 5y2 − 10x − 18y + 150 million FT/month.
What is the minimum cost and for what amounts can they reach it?

Cx′ = 2x − 3y − 10; Cy′ = −3x + 10y − 18


) )
2x − 3y = 10 6x − 9y = 30 66
Critical point: . . y= = 6, x = 5 + 1.5y = 14 (tons).
−3x + 10y = 18 −6x + 20y = 36 11
′′ ′′ ′′ ′′
Cxx = 2; Cyy = 10; Cxy = Cyx = −3.
   
2 −3 2 −3
H(x, y) = ; D(a, b) = = 11 > 0
−3 10 −3 10
′′
Cxx (a, b) > 0, C has a minimum.
C(14, 6) = 196 − 252 + 180 − 140 − 108 + 150 = 26 (million Ft).
Extra/2
The annual profit of a firm is given by the function P(x, y) = 12x + 8y − x2 − y2 − 10 (in million forints). x is the
amount spent on research and y is the amount spent on advertisements (given in million forints). How much should
they spend on research and advertising to maximize their profit? What is the maximum profit?

Px′ = 12 − 2x, Py′ = 8 − 2y


(a, b) = (6, 4).
′′ ′′ ′′ ′′
Pxx = −2, Pyy = −2, Pxy = Pyx = 0.
 
−2 0 −2 0
H(x, y) = D(x, y) = = 4. D(a, b) = 4 > 0, a local extremum.
0 −2 0 −2
′′
Since Pxx (6, 4) = −2 < 0, a local maximum.
P(6, 4) = 72 + 32 − 36 − 16 − 10 = 42.
Exercises 5.2.1
Determine the local extrema and saddle points of the given functions.

(a) f (x, y) = 5 − x2 − y2 , (f) f (x, y) = x2 − 5y2 + 2xy + 3x,


(b) f (x, y) = xy, (g) f (x, y) = 2x2 + 15 − y2 ,
(c) f (x, y) = 2x2 − 3y2 , (h) f (x, y) = −x2 + 2xy − 3y2 + 10y − 2x + 20,
(d) f (x, y) = x2 + 2y2 − xy + 14y, (i) f (x, y) = 6 + 5x2 + 2y2 ,
(e) f (x, y) = 2x3 + y3 + 3x2 − 3y − 12x − 4, (j) f (x, y) = (x − 1) 2 + y3 − 3y2 − 9y + 5.
Exercises 5.2.1 (a)
f (x, y) = 5 − x2 − y2
fx′ (x, y) = −2x fy′ (x, y) = −2y (a, b) = (0, 0)
fxx′′ (x, y) = −2 fyy′′ (x, y) = −2 fxy′′ (x, y) = fyx′′ (x, y) = 0
   
−2 0 −2 0
H= D(a, b) = = 4 > 0, fxx′′ (0, 0) = −2 < 0 ⇒ local maximum (5).
0 −2 0 −2
Exercises 5.2.1 (b)
f (x, y) = xy
fx′ (x, y) = y fy′ (x, y) = x (a, b) = (0, 0)
fxx′′ (x, y) = 0 fyy′′ (x, y) = 0 fxy′′ (x, y) = fyx′′ (x, y) = 1
   
0 1 0 1
H= D(a, b) = = −1 < 0 ⇒ saddle point.
1 0 1 0
Exercises 5.2.1 (c)
f (x, y) = 2x2 − 3y2
fx′ (x, y) = 4x fy′ (x, y) = −6y (a, b) = (0, 0)
fxx′′ (x, y) = 4 fyy′′ (x, y) = −6 fxy′′ (x, y) = fyx′′ (x, y) = 0
 
4 0
H= D(a, b) = −24 < 0 ⇒ saddle point.
0 −6
Exercises 5.2.1 (d)
f (x, y) = x2 + 2y2 − xy + 14y
fx′ (x, y) = 2x − y fy′ (x, y) = 4y − x + 14
)
2x − y = 0
y = 2x x = −2 y = −4 (a, b) = (−2, −4)
4y − x + 14 = 0
fxx′′ (x, y) = 2 fyy′′ (x, y) = 4 fxy′′ (x, y) = fyx′′ (x, y) = −1
 
2 −1
H= D(a, b) = 9 > 0 fxx′′ (−2, −4) = 2 > 0 ⇒ local minimum (4 + 32 − 8 − 56 = −28).
−1 4
Shall we check out?
Exercises 5.2.1 (e)
f (x, y) = 2x3 + y3 + 3x2 − 3y − 12x − 4
fx′ (x, y) = 6x2 + 6x − 12 fy′ (x, y) = 3y2 − 3
x1 = 1, x2 = −2, y1 = 1, y2 = −1.
(a, b) = (1, 1), (1, −1), (−2, 1), (−2, −1)
fxx′′ (x, y) = 12x + 6 fyy′′ (x, y) = 6y fxy′′ (x, y) = fyx′′ (x, y) = 0
 
12x + 6 0
H= D(x, y) = 72xy + 36y fyy′′ = 6y
0 6y
(1) (1, 1): D(a, b) > 0, fyy′′ (a, b) > 0 local minimum (−13)
(2) (1, −1): D(a, b) < 0 saddle point
(3) (−2, 1): D(a, b) < 0 saddle point
′′
(4) (−2, −1): D(a, b) > 0, fyy (a, b) < 0 local maximum (18)
Exercises 5.2.1 (f)
f (x, y) = x2 − 5y2 + 2xy + 3x
fx′ (x, y) = 2x + 2y + 3 fy′ (x, y) = −10y + 2x
 
1 5 5 1
From fy′ , 2x = 10y 10y + 2y + 3 = 0 y=− x=− (a, b) = − , −
4 4 4 4
fxx′′ (x, y) = 2 fyy′′ (x, y) = −10 fxy′′ (x, y) = fyx′′ (x, y) = 2
 
2 2
H= D(a, b) = −24 < 0 ⇒ saddle point.
2 −10
Exercises 5.2.1 (g)
f (x, y) = 2x2 + 15 − y2
fx′ (x, y) = 4x fy′ (x, y) = −2y
(a, b) = (0, 0)
fxx′′ (x, y) = 4 fyy′′ (x, y) = −2 fxy′′ (x, y) = fyx′′ (x, y) = 0
 
4 0
H= D(a, b) = −8 < 0 ⇒ saddle point.
0 −2
Exercises 5.2.1 (h)
f (x, y) = −x2 + 2xy − 3y2 + 10y − 2x + 20
fx′ (x, y) = −2x + 2y − 2 fy′ (x, y) = 2x − 6y + 10
(a, b) = (1, 2)
fxx′′ (x, y) = −2 fyy′′ (x, y) = −6 fxy′′ (x, y) = fyx′′ (x, y) = 2
 
−2 2
H= D(a, b) = 8 > 0 fxx′′ (1, 2) = −2 < 0 ⇒ local maximum (29).
2 −6
Exercises 5.2.1 (i)
f (x, y) = 6 + 5x2 + 2y2
fx′ (x, y) = 10x fy′ (x, y) = 4y
(a, b) = (0, 0)
fxx′′ (x, y) = 10 fyy′′ (x, y) = 4 fxy′′ (x, y) = fyx′′ (x, y) = 0
 
10 0
H= D(a, b) = 40 > 0 fxx′′ (0, 0) = 10 > 0 ⇒ local minimum (6).
0 4
Exercises 5.2.1 (j)
f (x, y) = (x − 1) 2 + y3 − 3y2 − 9y + 5
fx′ (x, y) = 2(x − 1) fy′ (x, y) = 3y2 − 6y − 9
(a, b) = (1, −1) (1, 3)
′′ ′′
fxx (x, y) = 2 fyy (x, y) = 6y − 6 fxy′′ (x, y) = fyx′′ (x, y) = 0
 
2 0
H= D(x, y) = 12y − 12
0 6y − 6
(1) D(1, −1) = −24 < 0 ⇒ saddle point
′′
(2) D(1, 3) = 24 > 0 fxx (1, 3) = 2 > 0 ⇒ local minimum (−22)
Exercise 5.2.2
A company produces two kinds of products with number of x and y pieces.
They can sell the first product at a unit price of p = 100 − x USD and the second one at a unit price of q = 100 − y USD.
The cost of production is C(x, y) = x2 + xy + y2 USD.
(a) How many pieces should be manufactured to maximize the profit?
(b) What if p(x) = 20 − 5x, q(y) = 4 − 2y and C(x, y) = 2xy + 4?
Exercise 5.2.2
Two products, x and y pieces.
Saleable: (a) p = 100 − x USD, q = 100 − y USD. C(x, y) = x2 + xy + y2 USD. x =?, y =? to maximize the profit?

R(x, y) = x(100 − x) + y(100 − y) = 100x − x2 + 100y − y2 . C(x, y) = x2 + xy + y2 USD.


P(x, y) = R(x, y) − C(x, y) = −2x2 − 2y2 − xy + 100x + 100y.
)
4x + y = 100
Px′ (x, y) = −4x − y + 100; Py′ (x, y) = −x − 4y + 100. Critical point: , ⇒ x = 20, y = 20.
x + 4y = 100
′′ ′′ ′′ ′′
Pxx (x, y) = −4, Pyy (x, y) = −4, Pxy (x, y) = Pyx (x, y) = −1 (all constants).
D(x, y) = (−4) · (−4) − (−1) 2 = 15 (independently of x and y).
′′
The determinant is positive. Since Pxx (20, 20) = −4 < 0, the function (the profit) has a local maximum at the
critical point (x = y = 20), its value is P(20, 20) = −800 − 800 + 400 + 2000 + 2000 = 2800 USD.
In order to maximize the profit, they should manufacture 20 pieces of both products.
https://chat.openai.com/share/d1f75f01-6c93-43f3-8294-4b469505c5d9
Exercise 5.2.2
Two products, x and y pieces.
Saleable: (b) p = 20 − 5x USD, q = 4 − 2y USD. C(x, y) = 3xy + 4 USD. x =?, y =? to maximize the profit?

R(x, y) = x(20 − 5x) + y(4 − 2y) = −5x2 − 2y2 + 20x + 4y. C(x, y) = 2xy + 4.
P(x, y) = R(x, y) − C(x, y) = −5x2 − 2y2 − 2xy + 20x + 4y − 4.
Px′ (x, y) = −10x − 2y + 20; Py′ (x, y) = −4y − 2x + 4.
) )
10x + 2y = 20 10x + 2y = 20
Critical point: x = 2, y = 0.
2x + 4y = 4 10x + 20y = 20
′′ ′′ ′′ ′′
Pxx (x, y) = −10, Pyy (x, y) = −4, Pxy (x, y) = Pyx (x, y) = −2 (all constants).
D(x, y) = (−10) · (−4) − (−2) 2 = 36 > 0 (independently of x and y).
′′
Since Pxx < 0, the function (the profit) has a local maximum at the critical point (x = 2, y = 0), its value is
P(2, 0) = −20 + 40 = 20 USD.
In order to maximize the profit, they should manufacture 2 pieces of the first product and quit manufacturing the
second one.
https://chat.openai.com/share/d1f75f01-6c93-43f3-8294-4b469505c5d9
Exercise 5.2.3
A paint shop distributes two kinds of special paints.
If the first and second paints have unit prices x and y USD per gallon, respectively, then the corresponding demands
are D1 (x, y) = 269 − 10x + 4y and D2 (x, y) = 250.25 + 2x − 2.5y gallons per month.
The paint shop purchases the first and second paints for 1 USD per gallon and 1.5 USD per gallon, respectively.
(a) Determine the monthly revenue in terms of unit prices.
(b) Determine the monthly profit in terms of unit prices.
(c) What are the monthly revenue and monthly profit for unit prices x = 21 and y = 16 USD per gallon?
(d) Determine the unit prices maximizing the monthly profit.
Exercise 5.2.3
Paint prices: x, y USD/gallon. Purchase prices: 1 and 1.5 USD/gallon.
Demands: D1 (x, y) = 269 − 10x + 4y, D2 (x, y) = 250.25 + 2x − 2.5y gallons/month.
(a) Monthly revenue? (b) Profit? (pro unit prices) (c) Monthly revenue and profit for x = 21, y = 16 USD/gallon?
(d) Unit price at the maximum profit?

Revenue: R(x, y) = xD1 (x, y) + yD2 (x, y) = −10x2 − 2.5y2 + 6xy + 269x + 250.25y.
Cost per gallons sold: C(x, y) = 1 · D1 (x, y) + 1.5 · D2 (x, y),
Profit per month: P(x, y) = R(x, y) − C(x, y) = xD1 + 1.5D2 − D1 − 1.5D2

P(x, y) = −10x2 − 2.5y2 + 6xy + 276x + 250y − 644.375.


Monthy rev.: R(21, 16) = −4410 − 640 + 2016 + 5649 + 4004 = 6619 (USD/month).
Monthly profit: P(21, 16) = 6117.63.
Px′ (x, y) = −20x + 6y + 276; Py′ (x, y) = −5y + 6x + 250.
Solving the corresponding system of equations: x = 45, y = 150 USD. Critical point (45, 105).
′′ ′′ ′′ ′′
Pxx (x, y) = −20, Pyy (x, y) = −5, Pxy (x, y) = 6, D(x, y) = (−20) · (−5) − 62 = 64 > 0 – an extremum, and since Pxx (x, y)
′′
is negative (and so is Pyy (x, y)), it is a local maximum.
The maximum value is: P(45, 105) ≈ 18 563.
Extra/3
Suppose that the total cost of two products over a certain time is given by the function
3000 s2 (q − s) 2
k(q, s) = + + .
q 10q 20q
Find the values of q and s for which the cost is minimal.
s = 100, q = 300

You might also like