Section13 8
Section13 8
Figure 13.8.1
1
Theorem 13.8.1
If f has a local maximum or a local minimum at a non-boundary point (a, b)
in its domain then ∇f (a, b) = ~0. That is, (a, b) is a critical point.
Proof.
Suppose f has a local extremum at a point (a, b). Define g(x) = f (x, b).
Then g(x) has a local extremum at x = a so that g 0 (a) = 0 = fx (a, b).
Likewise, the function G(y) = f (a, y) has a local extremum at y = b so that
G0 (b) = 0 = fy (a, b). Hence, ∇f (a, b) = ~0
Example 13.8.1
Locate and classify the critical points of f (x, y) = x2 − y 2 .
Solution.
The gradient of f is given by ∇f (x, y) = 2x~i − 2y~j. We see that fx (x, y) = 2x
and fy (x, y) = −2y are simultaneously zero at (0, 0). Therefore, (0, 0) is a
critical point and a possible extremum. The graph of f (x, y) shown in Figure
13.8.2 indicates that (0, 0) is neither a local maximum nor a local minimum.
Such a point will be called a saddle point
2
Figure 13.8.2
1. If D > 0 and fxx (a, b) > 0, then f (x, y) has a relative minimum at (a, b).
2. If D > 0 and fxx (a, b) < 0, then f (x, y) has a relative maximum at (a, b).
3. If D < 0 then f (x, y)) has a saddle point at (a, b).
Proof.
First recall that the sign of f~u (x, y) determines whether f (x, y) is increasing or
decreasing in the direction of a unit vector ~u. Likewise, the sign of [f~u ]~u (x, y)
determines the concavity of f (x, y) in the direction of ~u.
Let ~u =< h, , k > be a unit vector. Then the directional derivative of f at
(x, y) in the direction of ~u is
3
The directional derivative of this new function in the direction of ~u is
∂ ∂
[f~u ]~u (x, y) = [fx (x, y)h + fy (x, y)k]h + [fx (x, y)h + fy (x, y)k]k
∂x ∂y
=fxx (x, y)h2 + fyx (x, y)hk + fxy (x, y)hk + fyy (x, y)k 2
=fxx (x, y)h2 + 2fxy (x, y)hk + fyy (x, y)k 2 .
Thus,
[f~u ]~u (a, b) = fxx (a, b)h2 + 2fxy (a, b)hk + fyy (a, b)k 2 .
Now, consider the single variable quadratic function
g(t) = fxx (a, b)t2 + 2fxy (a, b)t + fyy (a, b).
• If D > 0 then either g(t) > 0 for all t or g(t) < 0 for all t. Since fxx (a, b) > 0,
we have g(t) > 0 for all t. But
h2
2 2 h
k g(h/k) =k fxx (a, b) 2 + 2fxy (a, b) + fyy (a, b)
k k
=fxx (x, y)h + 2fxy (x, y)hk + fyy (x, y)k 2 > 0.
2
This is true for any ~u. Thus, the surface is concave up around (a, b). Hence,
(a, b) is a local minimum.
• If D > 0 and fxx (a, b) < 0, we have g(t) < 0 for all t. But
h2
2 2 h
k g(h/k) =k fxx (a, b) 2 + 2fxy (a, b) + fyy (a, b)
k k
=fxx (x, y)h + 2fxy (x, y)hk + fyy (x, y)k 2 < 0.
2
This is true for any ~u. Thus, the surface is concave down around (a, b). Hence,
(a, b) is a local maximum.
• If D < 0 then ∆ > 0 so that g(t) changes sign. That is, there exist t1 and
t2 such that g(t1 ) > 0 and g(t2 ) < 0. Let h1 = √ t21 and k1 = √ 12 . Then
t1 +1 t1 +1
h1
t1 = k1
and
k12 g(t1 ) = fxx (x, y)h21 + 2fxy (x, y)h1 k1 + fyy (x, y)k12 > 0
4
so that f (x, y) is concave up in the direction of u~1 =< h1 , k1 > . Likewise,
we let t2 = hk22 where h2 = √ t22 and k2 = √ 12 . In this case,
t2 +1 t2 +1
k22 g(t2 ) = fxx (x, y)h21 + 2fxy (x, y)h1 k1 + fyy (x, y)k12 < 0
Example 13.8.2
Find the local extrema and saddle points of the function
1 y2
f (x, y) = x3 − 3x2 + + xy + 13x − y + 2.
3 4
Solution.
we first find the critical points for this function. This gives us:
fx (x, y) =x2 − 6x + y + 13 = 0
y
fy (x, y) = + x − 1 = 0.
2
From the second equation we find y = 2 − 2x. Substituting this into the first
equation we find x2 − 8x + 15 = (x − 3)(x − 5) = 0. Thus, x = 3 and x = 5
so that the critical points are (3, −4) and (5, −8).
On the other hand, we have fxx (x, y) = 2x − 6, fyy (x, y) = 12 , and fxy (x, y) =
1. Hence, D(3, −4) = −1 < 0 so (3, −4) is a saddle point. Similarly,
D(5, −8) = 2 − 1 = 1 > 0 and fxx (5, −8) = 4 > 0 so that (5, −8) is a
local minimum
Example 13.8.3
Find the local extrema and saddle points of the function
f (x, y) = x3 + y 5 − 3x − 10y + 4.
Solution.
The partial derivatives give
fx (x, y) =3x2 − 3 = 0
fy (x, y) =5y 4 − 10 = 0.
5
√
4
Solving√each equation
√ we find
√ x = ±1 and√ y = ± 2. Thus, the critical points
4 4 4 4
are (1, 2), (1, − 2), (−1, 2), (−1, − 2).The discriminant is
D(x, y) = fxx (x, y)fyy (x, y) − [fxy (x, y)]2 = 120xy 3 .
√ √ √ √
Since D(1, 4 2) = 120
√
4
8 and f √
xx (1, 4
2) = 6 >
√ 0, (1, 4
2) is a local mini-
4 4 4
mum. √ Since D(1, − √2) = −120 8 √ < 0, (1, − 2) is a saddle point. Since
D(−1, 4 √2) = −120√4 8 < 0, (−1, 4 2) is √a saddle point. Finally, √ since
4 4 4 4
D(−1, − 2) = 120 8 > 0 and fxx (−1, − 2) = −6 < 0, (−1, − 2) is a
local maximum
The second derivative test discussed above, did not cover the case D = 0. As
illustrated in the example below, the second derivative test is inconclusive in
this case. That is one cannot classify the critical point. It can be either a
local maximum, a local minimum or a saddle point.
Example 13.8.4
Let f (x, y) = x4 + y 4 , g(x, y) = −x4 − y 4 , and h(x, y) = x4 − y 4 . Show
that D(0, 0) = 0 for each function. Classify the critical point (0, 0) for each
function.
Solution.
Note that fx (0, 0) = fy (0, 0) = 0 so that f (x, y) has a critical point at
(0, 0). Since fxx (x, y) = 12x2 , fyy (x, y) = 12y 2 and fxy (x, y) = 0, we have
D(0, 0) = fxx (0, 0)fyy (0, 0)−[fxy (0, 0)]2 = 0. But the smallest value of f (x, y)
occurs at (0, 0) so that f (x, y) has a local and global minimum at (0, 0) with
D(0, 0) = 0.
Similarly, gx (0, 0) = gy (0, 0) = 0 so that (0, 0) is a critical point of g.
Moreover, gxx (x, y) = −12x2 , gyy (x, y) = −12y 2 and gxy (x, y) = 0, we have
D(0, 0) = gxx (0, 0)gyy (0, 0) − [gxy (0, 0)]2 = 0. Since g(x, y) ≤ 0, the largest
value occurs at (0, 0). That is, g has a local and global maximum at (0, 0)
with D(0, 0) = 0.
Finally, we have hx (0, 0) = hy (0, 0) = 0 so that (0, 0) is a critical point of
h. Since hxx (x, y) = 12x2 , hyy (x, y) = −12y 2 and hxy (x, y) = 0, we have
D(0, 0) = hxx (0, 0)hyy (0, 0) − [hxy (0, 0)]0 = 0. However, h(0, 0) = 0, z =
h(x, 0) = x4 > 0 and z = h(0, y) = −y 4 < 0. Hence, (0, 0) is a saddle point
with D(0, 0) = 0
Example 13.8.5
Find the shortest distance from the point (1, 0, −2) to the plane x+2y+z = 4.
6
Solution.
Let d be the distance from (1, 0, −2) to any point (x, y, z) on the plane
x + 2y + z = 4. By the distance formula,
p p
d = (x − 1)2 + y 2 + (z + 2)2 = (x − 1)2 + y 2 + (6 − x − 2y)2 .
We have
2x + 2y − 7
fx (x, y) =
d
2x + 5y − 12
fy (x, y) = .
d
Solving 2x + 2y − 7 = 0 and x + 5y − 12 = 0 simultaneously gives x = 11 6
and
5 11 5
y = 3 so that ( 6 , 3 ) is the only critical point of f. An absolute minimum
exists (since there is a minimum distance from the point to the plane) and
it must occur at a critical point so the shortest distance occurs when x = 11
6
and y = 35 , for which d = √56
7
Absolute Extrema
In real life, one is most likely interested in finding the places at which the
largest and smallest values of a function f occur in its domain.
We recall the reader that a point (a, b) in the domain of f (x, y) is called
an absolute or global maximum if f (x, y) ≤ f (a, b) for all points in the
domain of f.
If f (a, b) ≤ f (x, y) for all points in the domain of f then f (x, y) has an
absolute or global minimun at (a, b).
Optimization typically refers to finding the global maximum or minimum
of a function. If the domain of f is the entire xy−plane then we have an un-
constrained optimization; if the domain of f is not the entire xy−plane
then we have a constrained optimization.
Solution.
The first partials give
This implies that the only critical point is (0, 0). Finding second partials we
have
Since D = fxx (0, 0)fyy (0, 0) − fxy (0, 0)2 = 4 > 0 and fxx (0, 0) = 2 > 0, the
point (0, 0) is a local minimum. Since f (−3, −2) = −5 < f (0, 0) = 0 the
point (0, 0)is not a global minimum. Thus, f has no global extrema
Like functions in one variable, a function f (x, y) can have both a global
maximum and a global minimum; a global maximum but no global minima;
8
a global minimum but no global maxima; or none. So are there conditions
that guarantee that a function has a global maximum and global minimum?
In single variable calculus we saw that a function f (x) continuous on a closed
(i.e., including the endpoints) and bounded (i.e. of finite length) interval has
both a global maximum and a global minimum. A similar result is true for
functions of two variables. However, we need to define what we mean by
“bounded” and “closed” in 2D case.
A closed set in IR2 is one which contains its boundary and with no holes
in its interior. For example, the disk x2 + y 2 ≤ 1 is a closed set whereas
x2 + y 2 < 1 is not since the boundary, which is the circumference of the circle
x2 + y 2 = 1, is not included. Similarly, 0 < x2 + y 2 ≤ 1 is not closed since it
has a hole at the origin. A bounded set in IR2 is one that can be contained
in a disk (x − a)2 + (y − b)2 < R.
Using these definitions, we have the following theorem for multivariable func-
tions:
Example 13.8.7
Find the absolute extrema of the function f (x, y) = x + y − xy in the closed
triangle with vertices at (0, 0), (0, 2) and (4, 0).
Solution.
Since D is closed and bounded and f is continuous on D, Theorem 13.8.2
guarantees that f has global extrema in D.
9
Step 1. The critical points are solutions to the equations fx (x, y) = 0 and
fy (x, y) = 0. That is, 1 − y = 0 and 1 − x = 0. The only critical point is (1, 1)
and f (1, 1) = 1.
Step 2. Along the line from (0, 0) to (0, 2), the function f (0, y) = y has
a maximum value of 2 at (0, 2) and a minimum value of 0 at (0, 0). Along
the line from (0, 0) to (4, 0) the function f (x, 0) = x has a maximum value
of 4 at (4, 0) and a minimum of 0 at (0, 0). Along the line from (4, 0) to
2
(0, 2), i.e., y = 2 − x2 , we have f (x, y) = f (x, 2 − x2 ) = 12 x − 23 + 87 for
0 ≤ x ≤ 4, a quadratic function with minimum at x = 32 , where f ( 32 , 54 ) = 87
and a maximum at x = 4, where f (4, 0) = 4.
Step 3. The absolute maximum of f on D is f (4, 0) = 4 and the absolute
minimum is f (0, 0) = 0
10