Skip to main content

Section 8.3 The Second Derivative Test

Note that the expression \(f_{xx}f_{yy} - f_{xy}^2\) is called the discriminant or the Hessian of the function \(f(x,y)\) and can be easily remembered when written in the following form:
\begin{equation} H(x,y) = \begin{vmatrix} f_{xx} \amp f_{xy} \\ f_{xy} \amp f_{yy} \end{vmatrix} = f_{xx}f_{yy} - f_{xy}^2.\tag{8.4} \end{equation}

Example 8.13. Finding Local Extrema and Saddle Points.

Find the local maximum and minimum values and saddle points of the function
\begin{equation} z = f(x,y) = x^4 + y^4 - 4xy.\tag{8.5} \end{equation}

Solution.

We begin by computing the partial derivatives:
\begin{equation} f_x = 4x^3 - 4y \quad \text{and} \quad f_y = 4y^3 - 4x.\tag{8.6} \end{equation}
We set both partials equal to zero, which gives us:
\begin{equation} x^3 = y \quad \text{and} \quad y^3 = x.\tag{8.7} \end{equation}
To solve these equations, we substitute the second equation into the first one:
\begin{align*} x^3 = (y^3)^3 = y^9 = y \amp\Rightarrow y(y^8 - 1) = 0 \Rightarrow y(y^4 - 1)(y^4 + 1) = 0\\ \amp\Rightarrow y(y^2 - 1)(y^2 + 1)(y^4 + 1) = 0\\ \amp\Rightarrow y(y - 1)(y + 1)(y^2 + 1)(y^4 + 1) = 0\\ \amp\Rightarrow y = -1, 0, 1. \end{align*}
Therefore, the two partials are zero at the points \((-1,-1)\text{,}\) \((1,1)\text{,}\) and \((0,0)\text{,}\) as shown in FigureΒ 8.15. Next we compute the Hessian and apply the second derivative test. We have \(f_{xx} = 12x^2\text{,}\) \(f_{yy} = 12y^2\text{,}\) and \(f_{xy} = f_{yx} = -4\text{,}\) so that
\begin{equation} H(x,y) = \begin{vmatrix} f_{xx} \amp f_{xy} \\ f_{xy} \amp f_{yy} \end{vmatrix} = f_{xx}f_{yy} - f_{xy}^2 = 144x^2y^2 - 16.\tag{8.8} \end{equation}
We now evaluate the Hessian at each critical point:
  • \(H(0,0) = -16 \lt 0 \Rightarrow\) the origin \((0,0)\) is a saddle point.
  • \(H(1,1) = 144 - 16 = 128 \gt 0\) and \(f_{xx}(1,1) = 12 \gt 0 \Rightarrow (1,1)\) is a local minimum.
  • \(H(-1,-1) = 144 - 16 = 128 \gt 0\) and \(f_{xx}(-1,-1) = 12 \gt 0 \Rightarrow (-1,-1)\) is a local minimum.
Check out the surface in FigureΒ 8.14.
Figure 8.14. The surface \(z = x^4 + y^4 - 4xy\) has a saddle point at \((0,0,0)\) and two local minima, at \((1,1,-2)\) and \((-1,-1,-2)\text{.}\)
Diagram Exploration Keyboard Controls
Key Action
Enter, A Activate keyboard driven exploration
B Activate menu driven exploration
Escape Leave exploration mode
Cursor down Explore next lower level
Cursor up Explore next upper level
Cursor right Explore next element on level
Cursor left Explore previous element on level
X Toggle expert mode
W Extra details if available
Space Repeat speech
M Activate step magnification
Comma Activate direct magnification
N Deactivate magnification
Z Toggle subtitles
C Cycle contrast settings
T Monochrome colours
L Toggle language (if available)
K Kill current sound
Y Stop sound output
O Start and stop sonification
P Repeat sonification output
Figure 8.15. The critical points of \(f(x,y) = x^4 + y^4 - 4xy\) are the intersections of the curves \(y = x^3\) and \(x = y^3\text{:}\) a saddle point at \((0,0)\) and local minima at \((1,1)\) and \((-1,-1)\text{.}\)

Example 8.16. Shortest Distance to a Plane.

Find the shortest distance from the point \((1,0,-2)\) to the plane \(x + 2y + z = 4\text{.}\)

Solution.

We begin by writing the distance between the point \((1,0,-2)\) and points \((x,y,z)\) on the plane:
\begin{equation} d = \sqrt{(x-1)^2 + y^2 + (z+2)^2}.\tag{8.9} \end{equation}
Then we use the fact that the points \((x,y,z)\) are on the plane, \(z = 4 - x - 2y\text{,}\) to express the distance as a function of \(x\) and \(y\) only:
\begin{equation} d = \sqrt{(x-1)^2 + y^2 + (6 - x - 2y)^2}.\tag{8.10} \end{equation}
We make the observation that to find the shortest distance we can minimize \(d^2\) rather than \(d\text{:}\)
\begin{equation} d^2 = f(x,y) = (x-1)^2 + y^2 + (6 - x - 2y)^2.\tag{8.11} \end{equation}
We calculate the partials and set them equal to zero:
\begin{align*} f_x \amp= 2(x-1) - 2(6 - x - 2y) = 4x + 4y - 14 = 0\\ f_y \amp= 2y - 4(6 - x - 2y) = 4x + 10y - 24 = 0. \end{align*}
We subtract the first equation from the second one:
\begin{equation} 6y = 10 \Rightarrow y = \frac{5}{3} \Rightarrow x = \frac{11}{6} \Rightarrow \text{The only critical point is } \left(\frac{11}{6}, \frac{5}{3}\right).\tag{8.12} \end{equation}
We compute the Hessian:
\begin{equation} H(x,y) = \begin{vmatrix} f_{xx} \amp f_{xy} \\ f_{xy} \amp f_{yy} \end{vmatrix} = f_{xx}f_{yy} - f_{xy}^2 = (4)(10) - (4)^2 = 24 \gt 0.\tag{8.13} \end{equation}
Since \(H \gt 0\) and \(f_{xx} = 4 \gt 0\text{,}\) the point \(\left(\frac{11}{6}, \frac{5}{3}\right)\) is a local minimum. However, we know that there is a point on the plane that has the shortest distance to \((1,0,-2)\text{,}\) which means \(\left(\frac{11}{6}, \frac{5}{3}\right)\) is in fact where the absolute minimum of the distance occurs. To find the shortest distance we plug the point \(\left(\frac{11}{6}, \frac{5}{3}\right)\) into the distance formula, which gives
\begin{equation} d = \sqrt{\left(\frac{5}{6}\right)^2 + \left(\frac{5}{3}\right)^2 + \left(\frac{5}{6}\right)^2} = \frac{5}{6}\sqrt{6}.\tag{8.14} \end{equation}
You have attempted of activities on this page.