lecture 19

Now that we know about directional derivatives, we want to use them to answer the following question: where are the relative maximums and minimums of a
function f(x, y)? First, we recall the definition of a relative maximum/minimum.
Definition 1. We call (x0 , y0 ) a relative maximum (relative minimum, resp.)
if there is a neighborhood about (x0 , y0 ) such that
f(x0 , y0 ) > f(x, y)
(f(x0 , y0 ) 6 f(x, y), resp.),
for all (x, y) in that neighborhood.
In single variable calculus, we know that if f(x) has a relative maximum or
minimum at x0 , then f 0 (x0 ) = 0, assuming f is differentiable at x0 . This has the
following two variable analog.
Propisition 1. Suppose f is differentiable at (x0 , y0 ), and that f has a relative
maximum or minimum at (x0 , y0 ). Then
Du f(x0 , y0 ) = 0,
for all unit vectors u. Since, in this case,
Du f(x0 , y0 ) = ∇f(x0 , y0 ) · u,
equivalently, we could say that ∇f(x0 , y0 ) = h0, 0i, i.e., that fx (x0 , y0 ) = 0 and
fy (x0 , y0 ) = 0.
Geometrically speaking, if f attains a local max or min at a place where f is
differentiable, then the tangent plane to f is horizontal (meaning is parallel with
the xy-plane) at that place.
Definition 2. We call a point (x0 , y0 ) a critical point of f(x, y) if either ∇f(x0 , y0 ) =
h0, 0i or if f is not differentiable at (x0 , y0 ).
Considering proposition 1, we have the following obvious follow-up.
Propisition 2. If f attains a relative maximum or minimum at (x0 , y0 ), then
(x0 , y0 ) is a critical point of f.
So identifying critical points of f would tell us where relative maximums and
minimums could occur. But whether or not a critical point is a local max or min
(or maybe neither) is going to require more looking into.
In single variable calculus, to help answer this problem of classifying critical
points we developed the second derivative test. The idea being that if we could
determine the concavity of f at a critical point, then we could determine whether
we were dealing with a relative max or min (or possibly a saddle). Let’s see if we
can take the same approach here.
1
2
Assume that f is differentiable at (x0 , y0 ), and moreover, that the second partial
derivatives of f are continuous in a neighborhood (x0 , y0 ). Suppose (x0 , y0 ) is a
critical point of f.1 Let u = ha, bi be a unit vector, and consider
Du (Du f(x0 , y0 )) = fxx (x0 , y0 )a2 + 2fxy (x0 , y0 )ab + fyy (x0 , y0 )b2 .
If the above is positive, it can be interpreted to mean that at (x0 , y0 ) the function
f is concave up in the u-ward direction. If for every unit vector u we have that
Du (Du f) is positive in a neighborhood of (x0 , y0 ), then f is concave up in every
direction in a neighborhood of (x0 , y0 ). It stands to reason that (x0 , y0 ) is a local
min. In fact, considering the continuity conditions on the second partials of f, we
could deduce that (x0 , y0 ) is a local min from the fact that Du (Du f) is positive at
(x0 , y0 ) for all directions u. Vice versa, if Du (Du f) < 0 at (x0 , y0 ) for all u, it stands
to reason that (x0 , y0 ) is a local max.
Considering the above, we’re interested in the following: what conditions on the
constants A, B, and C ensure that the function
g(x, y) = Ax2 + 2Cxy + By2
is either always positive or always negative for (x, y) satisfying x2 + y2 = 1?2
Let h(x, y) = x2 + y2 . We take for granted the following. Of all pairs (X, Y)
satisfying X2 + Y 2 = 1, let (x, y) be the pair such that g(x, y) is minimal (maximal,
resp.). Then there is a real number λ such that
∇g(x, y) = λ∇h(x, y).
Claim 1. In this case, we have g(x, y) = λ.
Proof. The above equality of gradients gives us the following equations
2Ax + 2Cy = 2λx
|
{z
}
gx
2Cx + 2By = 2λy.
| {z }
(∗)
gy
So on the one hand,
xgx + ygy = 2Ax2 + 2Cxy + 2Cxy + 2By2 = 2g(x, y),
while on the other
xgx + ygy = 2λx2 + 2λy2 = 2λ
So g(x, y) = λ.
1To classify those critical points of f where f is not differentiable requires a finer analysis than
we can afford in this class.
2A is playing the part of f (x , y ), x is playing the part of a, and so on. I have a compulsion
xx
0
0
to consider x and y as variables.
3
So if we can show that λ > 0 (λ < 0, resp.), then we’ll know that g is always
greater than zero (g is always less than 0, resp.) for every (x, y) satisfying x2 +y2 =
1, since λ is the minimal (maximal, resp.) value of g.
In order to understand the relationship between λ and the coefficients A, B, C,
we look at (∗) from claim 1. These two equations imply that the vectors
hλ − A, Ci
hC, λ − Bi
differ by a scalar multiple. This implies that
"
#
λ−A
C
det
= 0,
C
λ−B
since the parallelogram spanned by the vectors has no area. This implies that
λ2 − (A + B)λ + (AB − C2 ) = 0,
implying that
p
(A + B)2 − 4(AB − C2 )
.
2
In order that λ > 0 (regardless of whether ± is taken) we need that
λ=
(A + B) ±
(A + B) > 0
AB − C2 > 0.
In order that λ < 0 (regardless of whether ± is taken) we need that
(A + B) < 0
AB − C2 > 0.
If AB−C2 < 0, then the max of g is positive while the min is negative on x2 +y2 = 1.
Translating all this back to our particular situation we get the following.
Theorem 1. (The Second Derivative Test) Suppose (x0 , y0 ) is a critical point of
f. Also, suppose f is differentiable at (x0 , y0 ), and moreover, that the second partial
derivatives of f are continuous in a neighborhood of (x0 , y0 ). Let
D(x, y) = fxx (x, y)fyy (x, y) − f2xy (x, y).
Then
(i) If D(x0 , y0 ) > 0 and fxx (x0 , y0 ) > 0, then (x0 , y0 ) is a local min.
(ii) If D(x0 , y0 ) > 0 and fxx (x0 , y0 ) < 0, then (x0 , y0 ) is a local max.
(iii) If D(x0 , y0 ) < 0, then (x0 , y0 ) is neither a local min or local max.
Example 1. Find the relative maximums and minimums of f(x, y) = x2 y + 3xy.
Solution. We begin by identifying the critical points of f. Since f is differentiable
everywhere, we need only to find those points (x, y) where ∇f(x, y) = h0, 0i. We
want all (x, y) satisfying
fx = 2xy + 3y = 0
fy = x2 + 3x = 0.
4
Note that fy = x(x + 3). So if fy = 0, either x = 0 or x = −3.
Suppose x = 0. Then the fx equation tells us that y = 0. So (0, 0) is a critical
point.
Now, suppose x = −3. Then the fx equation tells us that −6y + 3y = 0, i.e.,
that y = 0. So we have the critical point (−3, 0).
Now, we check these critical points using the second derivative test. Note
fxx = 2y
fyy = 0
fxy = 2x + 3.
In any case we see that both D(0, 0) and D(−3, 0) are both negative. Hence f has
no local maximums and no local minimums. It has two saddle points at (0, 0) and
(−3, 0).
Example 2. Find the relative maximums and minimums of f(x, y) = e−x
2
−2x−y2
.
Solution. As before, f is differentiable everywhere, so we concern ourselves with
identifying those (x, y) such that
fx (x, y) = (−2x − 2)f(x, y) = 0
fy (x, y) = (−2y)f(x, y) = 0.
Since f(x, y) > 0 for all (x, y), if fx = 0, it follows that x = −1. And, for the same
reason, it follows that y = 0. So (−1, 0) is the only critical point of f.
Now, we apply the second derivative test to classify the point (−1, 0). Note that
fxx (x, y)
=
(−2x − 2)2 f(x, y) − 2f(x, y) = ((2x + 2)2 − 2)f(x, y)
fyy (x, y)
=
(−2y)2 f(x, y) − 2f(x, y) = (4y2 − 2)f(x, y)
fxy (x, y)
=
(−2x − 2)(−2y)f(x, y)
So fxx (−1, 0) = −2f(−1, 0) < 0 and fyy (−1, 0) = −2f(−1, 0) < 0 and fxy (−1, 0) =
0. So D(−1, 0) = 4f2 (−1, 0) > 0. It follows that (−1, 0) is a local maximum.