Second Derivatives Test:
Suppose the second partial derivatives of f are continuous on a disk with center (a,b), and suppose that f_x(a,b)=0 and f_y(a,b)=0 [that is, (a,b) is a critical point of f]. Let
D=D(a,b)=f_{xx}(a,b)f_{yy}(a,b)-[f_{xy}(a,b)]^2
(a) If D>0 and f_{xx}(a,b)>0, then f(a,b) is a local minimum.
(b) If D>0 and f_{xx}(a,b)<0, then f(a,b) is a local maximum.
(c) If D<0 and f_{xx}(a,b)>0, then f(a,b) is not a local maximum or minimum.
Proof of part (a):
We compute the second-order directional derivative of f in the direction of \vec u = \langle h, k \rangle. The first-order derivative is given by:
D_uf=f_xh+f_yk \quad \mbox{(from a different theorem)}
Applying this theorem a second time, we have:
<br />
\begin{eqnarray}<br />
D^2_uf & = & D_u(D_uf)=\frac{\partial}{\partial x}(D_uf)h+\frac{\partial}{\partial y}(D_uf)k \nonumber \\<br />
& = & (f_{xx}h+f_{yx}k)h+(f_{xy}h+f_{yy}k)k \nonumber\\<br />
& = & f_{xx}h^2+2f_{xy}hk+f_{yy}k^2 \mbox{(by Clairaut's theorem)}\nonumber<br />
\end{eqnarray}<br />
If we complete the square in this expression, we obtain:
D_u^2f=f_{xx}\left(h+\frac{f_{xy}}{f_{xx}}k\right)^2+\frac{k^2}{f_{xx}}(f_{xx}f_{yy}-f^2_{xy}) \quad \mbox(<- Equation 1)
We are given that f_{xx}(a,b)>0 and D(a,b)>0. But f_{xx} and D=f_{xx}f_{yy}-f^2_{xy} are continuous functions, so there is a disk B with center (a,b) and radius \delta>0 such that f_{xx}>0 and D>0 whenever (x,y) is in B. Therefore, by looking at Equation 1, we see that D_u^2f(x,y)>0 whenever (x,y) is in B. This means that if C is the curve obtained by intersecting the graph of f with the vertical plane through P(a,b,f(a,b)) in the direction of \vec u, then C is concave upward on an interval of length 2\delta. This is true in the direction of every vector \vec u, so if we restrict (x,y) to lie in B, the graph lies above its horizontal tangent plane at P. Thus f(x,y)\geq f(a,b) whenever (x,y) is in B. This shows that f(a,b) is a local minimum.
Parts (b) and (c) have similar proofs.