GTK Mathematics2 05 Handout
GTK Mathematics2 05 Handout
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.
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).
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,
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.
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