Skip to main content

Section 8.6 Why the Second Derivative Test Works

Where do the conditions of TheoremΒ 8.12 come from? The key idea is to take the directional derivative twice. At a critical point every direction looks flat to the first derivative, so we ask the second derivative how the surface curves as we walk away from the point in each direction. The video in FigureΒ 8.25 animates the argument; the equations that appear in it are derived in detail below.
Figure 8.25. Slicing a surface through a critical point in a rotating unit direction \(\mathbf{u}\text{.}\) The second directional derivative \(D^2_{\mathbf{u}}f\) is the curvature of the slice: one sign for all directions gives a local extremum, both signs give a saddle point, and completing the square shows that the discriminant \(H = f_{xx}f_{yy} - f_{xy}^2\) decides between the two.

Slicing the surface in a direction \(\mathbf{u}\).

Suppose \(f(x,y)\) has continuous first and second partial derivatives near a critical point \((a,b)\text{,}\) so that \(f_x(a,b) = f_y(a,b) = 0\text{.}\) Fix a unit vector \(\mathbf{u} = (u_1, u_2)\) and walk away from the critical point along the line through \((a,b)\) in the direction of \(\mathbf{u}\text{.}\) The height of the surface above this line is the single-variable function
\begin{equation} g(t) = f(a + t u_1,\; b + t u_2),\tag{8.19} \end{equation}
which is exactly the slice of the surface cut by the vertical plane through \((a,b)\) containing \(\mathbf{u}\text{.}\) In the video this slice is the highlighted curve, drawn green where it curves upward and red where it curves downward.

The first directional derivative.

By the chain rule, with \(x = a + t u_1\) and \(y = b + t u_2\) (so that \(dx/dt = u_1\) and \(dy/dt = u_2\)),
\begin{equation} g'(t) = \frac{\partial f}{\partial x}\frac{dx}{dt} + \frac{\partial f}{\partial y}\frac{dy}{dt} = f_x\, u_1 + f_y\, u_2 = D_{\mathbf{u}}f .\tag{8.20} \end{equation}
This is the ordinary directional derivative of \(f\) in the direction \(\mathbf{u}\text{.}\) At the critical point, \(g'(0) = f_x(a,b)\, u_1 + f_y(a,b)\, u_2 = 0\) for every choice of \(\mathbf{u}\text{:}\) each slice has a horizontal tangent line at \(t = 0\text{.}\) This is why the first derivative alone cannot distinguish a minimum from a maximum from a saddle, and why we must differentiate once more.

The second directional derivative.

Apply \(D_{\mathbf{u}}\) to the function \(D_{\mathbf{u}}f\text{.}\) Differentiating (8.20) with the chain rule again, and using the equality of the mixed partials (\(f_{xy} = f_{yx}\text{,}\) which holds because the second partials are continuous),
\begin{align} g''(t) \amp = \frac{\partial}{\partial x}\!\left(f_x u_1 + f_y u_2\right) u_1 + \frac{\partial}{\partial y}\!\left(f_x u_1 + f_y u_2\right) u_2\notag\\ D^2_{\mathbf{u}}f \amp = f_{xx}\, u_1^2 + 2 f_{xy}\, u_1 u_2 + f_{yy}\, u_2^2 .\tag{8.21} \end{align}
The number \(g''(0) = D^2_{\mathbf{u}}f(a,b)\) is the curvature of the slice at the critical point: if it is positive the slice is concave up in the direction \(\mathbf{u}\text{,}\) and if it is negative the slice is concave down. By the single-variable second derivative test applied to \(g\text{,}\) the critical point is
  • a local minimum if \(D^2_{\mathbf{u}}f(a,b) \gt 0\) for every direction \(\mathbf{u}\text{,}\)
  • a local maximum if \(D^2_{\mathbf{u}}f(a,b) \lt 0\) for every direction \(\mathbf{u}\text{,}\)
  • a saddle point if \(D^2_{\mathbf{u}}f(a,b)\) is positive for some directions and negative for others, since the surface then rises along some lines through \((a,b)\) and falls along others.
Writing \(\mathbf{u} = (\cos\theta, \sin\theta)\text{,}\) equation (8.21) becomes a function of the direction angle,
\begin{equation} D^2_{\mathbf{u}}f = f_{xx}\cos^2\theta + 2 f_{xy}\cos\theta\sin\theta + f_{yy}\sin^2\theta ,\tag{8.22} \end{equation}
which is the curve plotted against \(\theta\) in the video. For \(z = x^2 + y^2\) it is the constant \(2\) (always positive: a minimum); for \(z = -(x^2+y^2)\) it is the constant \(-2\) (always negative: a maximum); and for \(z = x^2 - y^2\) it equals \(2\cos 2\theta\text{,}\) which changes sign four times as \(\mathbf{u}\) makes a full turn: a saddle point.

Completing the square: the discriminant appears.

Checking the sign of (8.21) one direction at a time is impossible; there are infinitely many directions. Instead, suppose \(f_{xx} \neq 0\text{,}\) multiply (8.21) by \(f_{xx}\text{,}\) and complete the square in \(u_1\text{:}\)
\begin{align} f_{xx}\cdot D^2_{\mathbf{u}}f \amp = f_{xx}^2 u_1^2 + 2 f_{xx} f_{xy}\, u_1 u_2 + f_{xx} f_{yy}\, u_2^2\notag\\ \amp = \left(f_{xx} u_1 + f_{xy} u_2\right)^2 + \left(f_{xx} f_{yy} - f_{xy}^2\right) u_2^2 .\tag{8.23} \end{align}
(Expanding the square in (8.23) reproduces the first line: the cross terms match, and the \(f_{xy}^2 u_2^2\) produced by the square is subtracted off again by the second term.) Every quantity on the right-hand side is now a perfect square except the coefficient
\begin{equation} H = f_{xx} f_{yy} - f_{xy}^2 ,\tag{8.24} \end{equation}
the discriminant (the Hessian determinant of (8.8)). The sign of \(D^2_{\mathbf{u}}f\) in every direction at once is therefore controlled by just the two numbers \(H\) and \(f_{xx}\text{,}\) evaluated at the critical point.

Reading off the four cases.

  • Case \(H \gt 0\text{.}\) The right-hand side of (8.23) is a sum of two nonnegative terms, and it cannot vanish: if \(u_2 = 0\) then \(u_1 \neq 0\) and the first term is \(f_{xx}^2 u_1^2 \gt 0\text{,}\) while if \(u_2 \neq 0\) the second term is positive. Hence \(f_{xx}\cdot D^2_{\mathbf{u}}f \gt 0\) for every direction, so \(D^2_{\mathbf{u}}f\) has the same sign as \(f_{xx}\) in every direction. (Note \(H \gt 0\) forces \(f_{xx} \neq 0\text{,}\) since \(f_{xx} = 0\) would give \(H = -f_{xy}^2 \le 0\text{.}\)) If \(f_{xx} \gt 0\text{,}\) every slice is concave up and \(f(a,b)\) is a local minimum; if \(f_{xx} \lt 0\text{,}\) every slice is concave down and \(f(a,b)\) is a local maximum.
  • Case \(H \lt 0\text{.}\) The two terms in (8.23) now compete. If \(f_{xx} \neq 0\text{,}\) taking \(\mathbf{u} = (1,0)\) gives \(f_{xx}\cdot D^2_{\mathbf{u}}f = f_{xx}^2 \gt 0\text{,}\) while choosing \(\mathbf{u}\) proportional to \((-f_{xy}, f_{xx})\) kills the perfect square and gives \(f_{xx}\cdot D^2_{\mathbf{u}}f = H\, u_2^2 \lt 0\text{.}\) So \(D^2_{\mathbf{u}}f\) takes both signs and \((a,b)\) is a saddle point. (If \(f_{xx} = 0\) and \(f_{yy} \neq 0\text{,}\) run the same argument with the roles of \(u_1\) and \(u_2\) exchanged; if \(f_{xx} = f_{yy} = 0\text{,}\) then \(H \lt 0\) means \(f_{xy} \neq 0\text{,}\) and \(D^2_{\mathbf{u}}f = 2 f_{xy} u_1 u_2\) visibly changes sign between the directions where \(u_1 u_2 \gt 0\) and where \(u_1 u_2 \lt 0\text{.}\))
  • Case \(H = 0\text{.}\) Equation (8.23) degenerates to a single perfect square, which vanishes along the direction proportional to \((-f_{xy}, f_{xx})\text{.}\) In that direction the second derivative gives no information, and the behavior of \(f\) is decided by higher-order terms: the test is inconclusive.
These are precisely conditions (i)–(iv) of TheoremΒ 8.12. One technical remark: the argument above examines only straight-line slices through \((a,b)\text{,}\) which by itself is not quite enough (a function can increase along every line yet fail to have a local minimum). The full proof replaces \(f\) near \((a,b)\) by its second-order Taylor expansion; continuity of the second partials guarantees that when \(H \neq 0\) the quadratic form \(D^2_{\mathbf{u}}f\) keeps its sign uniformly on a small disk around \((a,b)\text{,}\) which upgrades the line-by-line conclusion to a genuine local one.
You have attempted of activities on this page.