The Second Derivative Test   

Clearly, f( x,y) has a local maximum at a critical point ( p,q) only if every vertical slice of z = f(x,y) has a maximum at ( p,q) .

Similarly, f( x,y) has a local minimum at a critical point ( p,q) only if every vertical slice of z = f( x,y) has a minimum at ( p,q) .

However, it is possible for f( x,y) to have a minimum in one slice and a maximum in another slice.

If this is the case, then we say that f( x,y) has a saddle at ( p,q) , because the resulting surface resembles a saddle for a horse.

To determine if we get a maximum, a minimum, or a saddle point at a critical point ( p,q), we consider the vertical slice z(t) = f(p+mt, q+nt). Since x = p+mt and y = q+nt implies that x' (t) = m and y' (t) = n, the first derivative of z(t) is
 dz
dt
= f
x
 dx
dt
+ f
y
 dy
dt
= mfx+nfy
Moreover, m and n constant implies that
z" =  
d
dt
dz
dt
=
m  dfx
dt
+n  dfy
dt
=
m æ
è
fx
x
 dx
dt
+ fx
y
 dy
dt
ö
ø
+n æ
è
fy
x
 dx
dt
+ fy
y
 dy
dt
ö
ø
=
m( mfxx+nfxy ) +n( mfyx+nfyy )
Expanding and using the equality of the mixed partial derivatives then yields
z"(0) = m2fxx( p,q) + 2mnfxy( p,q) + n2fyy( p,q)
(2)

If fxx(p,q) = 0, then we can choose values of m and n such that z''  is negative in some slices and positive in others, thus implying that z=f(x,y) has a saddle at (p,q). If fxx(p,q) ¹ 0, then completing the square in m yields
z"(0) = fxx( p,q) æ
è
m  fxy( p,q)
fxx( p,q)
n ö
ø
2

 
 +   D( p,q)
fxx( p,q)
 n2
(3)
where D = fxxfyy - ( fxy) 2  is called the discriminant of f. (i.e., expanding (3) will result in (2) ).

If D( p,q) > 0, then z"(0) has the same sign as fxx( p,q) in all directions u = <m,n>, thus implying a maximum if  fxx( p,q) < 0 and a minimum if fxx( p,q) > 0. However, if D( p,q) < 0, then choosing m=1, n=0 yields z"(0) > 0, whereas choosing m = fxx( p,q) / fxx( p,q) n yields  z"(0) < 0, thus implying a saddle.  These observations lead to the following theorem:           

 

Second Derivative Test: If ( p,q) is a critical point of a function f( x,y) whose second derivatives exist at ( p,q) , then
 
Discriminant
2nd der
     
Result
D( p,q) > 0,
fxx( p,q) > 0
 
f( x,y) has a local minimum at ( p,q)
D( p,q) > 0,
fxx( p,q) < 0
 
f( x,y) has a local maximum at ( p,q)
D( p,q) < 0,
 
 
f( x,y) has a saddle  at ( p,q)
 
However, if D( p,q) = 0, then no information about f( x,y) is obtained. 
EXAMPLE 2    Identify the extrema and saddle points of f(x,y) = x2-y2.      

Solution: Since fx = 2x and fy = -2y, the only critical point is ( 0,0) . However, fxx = 2, fyy = -2, and fxy = 0, so that the discriminant of f is
D = fxxfyy-( fxy) 2 = ( 2) ( -2)-02 = -4 < 0
Thus, f( x,y) = x2-y2 has a saddle at ( 0,0) .

EXAMPLE 3    Find the extrema and saddle points of f(x,y) = x3-3xy+y3.   

Solution: In example 1, we showed that the critical points of f are ( 0,0) and ( 1,1) . Since fx(x,y) = 3x2-3y and fy( x,y) = -3x+3y2, the second derivatives of f( x,y) are
fxx = 6x,        fxy = -3,        fyy = 6y
Thus, the discriminant is
D( x,y) = ( 6x) ( 6y)  - ( -3)2 = 36xy-9
At ( 0,0) , we have D( 0,0) = 0 - 9 = -9 < 0. Thus, f has a saddle at ( 0,0) . At ( 1,1) , we have
D( 1,1) = 36·1·1 - 9 = 27 > 0
However, fxx( 1,1) = 6 > 0, so f has a local minimum at ( 1,1) .

       
EXAMPLE 4    Find the local extrema and saddle points of
f( x,y) = xsin(xy)
Solution: The first partial derivatives are
fx = sin(xy) + xycos(xy),   fy =  x2cos( xy)
Setting fy = 0 yields either x = 0 or cos( xy) = 0, the latter of which implies that
xy  =    p
2
  +  np
for any integer n.  At such points, we would have fx(x,y) either as 1 or -1 (but not 0). However, if y = 0, then
fx( x,0) = 0 + y
which implies that both fx = 0 and fy = 0 at (0, 0) (and nowhere else).  The second derivatives are
fxx
=
2ycos(xy) - xy2sin(xy)
fxy
=
fyx = 2xcos(xy) - x2ysin(xy)
fyy
=
-x3 sin(xy)
and fxx( 0,0) = fxy( 0,0) = fyy(0,0) = 0.  Thus, the discriminant is D( 0,0) = 0, so the second derivative test provides no information about the extrema or saddles of f( x,y) = xsin( xy) at (0,0) .

Maple Graphics Export

Although it appears that there is a saddle at (0,0) in example 4, there is no way of determining this using the second derivative test.  Indeed, g(x,y) = x4 + y4 is positive everywhere except for g(0,0) = 0, so clearly g(x,y) has a minimum at (0,0).  But gxx( 0,0) = gxy( 0,0) = gyy(0,0) = 0 implies that D(0,0) = 0, so this minimum cannot be identified using the second derivative test. 

Check your reading: Does p( x,y) = -x4 -y4 have any local extrema that can be identified using the second derivative test?