Skip to main content
\(\renewcommand{\chaptername}{Unit} \newcommand{\derivativehomeworklink}[1]{\href{http://db.tt/cSeKG8XO}{#1}} \newcommand{\chpname}{unit} \newcommand{\sageurlforcurvature}{http://bmw.byuimath.com/dokuwiki/doku.php?id=curvature_calculator} \newcommand{\uday}{ \LARGE Day \theunitday \normalsize \flushleft \stepcounter{unitday} } \newcommand{\sageworkurl}{http://bmw.byuimath.com/dokuwiki/doku.php?id=work_calculator} \newcommand{\sagefluxurl}{http://bmw.byuimath.com/dokuwiki/doku.php?id=flux_calculator} \newcommand{\sageworkfluxurl}{http://bmw.byuimath.com/dokuwiki/doku.php?id=both_flux_and_work} \newcommand{\sagelineintegral}{http://bmw.byuimath.com/dokuwiki/doku.php?id=line_integral_calculator} \newcommand{\sagephysicalpropertiestwod}{http://bmw.byuimath.com/dokuwiki/doku.php?id=physical_properties_in_2d} \newcommand{\sagephysicalpropertiesthreed}{http://bmw.byuimath.com/dokuwiki/doku.php?id=physical_properties_in_3d} \newcommand{\sageDoubleIntegralCheckerURL}{http://bmw.byuimath.com/dokuwiki/doku.php?id=double_integral_calculator} \newcommand{\myscale}{1} \newcommand{\ds}{\displaystyle} \newcommand{\dfdx}[1]{\frac{d#1}{dx}} \newcommand{\ddx}{\frac{d}{dx}} \newcommand{\ii}{\vec \imath} \newcommand{\jj}{\vec \jmath} \newcommand{\kk}{\vec k} \newcommand{\vv}{\mathbf{v}} \newcommand{\RR}{\mathbb{R}} \newcommand{\R}{ \mathbb{R}} \newcommand{\inv}{^{-1}} \newcommand{\im}{\text{im }} \newcommand{\colvec}[1]{\begin{bmatrix}#1\end{bmatrix} } \newcommand{\cl}[1]{ \begin{matrix} #1 \end{matrix} } \newcommand{\bm}[1]{ \begin{bmatrix} #1 \end{bmatrix} } \DeclareMathOperator{\rank}{rank} \DeclareMathOperator{\rref}{rref} \DeclareMathOperator{\vspan}{span} \DeclareMathOperator{\trace}{tr} \DeclareMathOperator{\proj}{proj} \DeclareMathOperator{\curl}{curl} \newcommand{\blank}[1]{[14pt]{\rule{#1}{1pt}}} \newcommand{\vp}{^{\,\prime}} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section10.2The Second Derivative Test

Objectives

This section will develop how to...

  • identify local extreme points of real-valued functions of two variables

We start with a review exercise from first-semester calculus.

Review10.2.1

Let \(f(x) = x^3-3x^2\text{.}\) Find the critical values of \(f\) by solving \(f'(x)=0\text{.}\) Determine if each critical value leads to a local maximum or local minimum by computing the second derivative. State the local maxima/minima of \(f\text{.}\) Sketch the function using the information you discovered.

Subsection10.2.1The Multi-Dimensional Second Derivative Test

We now generalize the second derivative test to all dimensions. We've already seen that the second derivative of a function such as \(z=f(x,y)\) is a square matrix. The second derivative test in Calculus I/II relied on understanding if a function was concave up or concave down. We need a way to examine the concavity of \(f\) as we approach a point \((x,y)\) from any of the infinitely many directions. Such a method exists, and leads to an eigenvalue/eigenvector problem. I'm assuming that most of you have never heard the word “eigenvalue.” We could spend an entire semester just studying eigenvectors. We'd need a few weeks to discover what they are from a exercise-based approach. Instead, here is an example of how to find eigenvalues and eigenvectors.

Definition10.2.1

Let \(A\) be a square matrix, so in 2D we have \(A=\begin{pmatrix}a\amp b\\c\amp d \end{pmatrix}\text{.}\) The identity matrix \(I\) is a square matrix with 1's on the diagonal and zeros everywhere else, so in 2D we have \(I = \begin{pmatrix}1\amp 0\\0\amp 1 \end{pmatrix}\text{.}\) The eigenvalues of \(A\) are the solutions \(\lambda\) to the equation \(|A-\lambda I|=0\text{.}\) Remember that \(|A|\) means, “Compute the determinant of \(A\text{.}\)” So in 2D, we need to find the value \(\lambda\) so that \(\left|\begin{pmatrix}a\amp b\\c\amp d \end{pmatrix} -\lambda \begin{pmatrix}1\amp 0\\0\amp 1 \end{pmatrix} \right|=\begin{vmatrix} a-\lambda \amp b\\c\amp d-\lambda \end{vmatrix}=0.\)

This definition extends to any square matrix. In 3D, the eigenvalues are the solutions to the equation \(\left|\begin{pmatrix}a\amp b\amp c\\d\amp e\amp f\\g\amp h\amp i \end{pmatrix} -\lambda \begin{pmatrix}1\amp 0\amp 0\\0\amp 1\amp 0\\0\amp 0\amp 1 \end{pmatrix} \right| = \begin{vmatrix} a-\lambda\amp b\amp c\\d\amp e-\lambda\amp f\\g\amp h\amp i-\lambda\end{vmatrix}=0.\)

An eigenvector of \(A\) corresponding to \(\lambda\) is a nonzero vector \(\vec x\) such that \(A\vec x=\lambda x\text{.}\)

As you continue taking more upper level science courses (in physics, engineering, mathematics, chemistry, and more) you'll soon see that eigenvalues and eigenvectors play a huge role. You'll start to see them in most of your classes. For now, we'll use them without proof to apply the second derivative test. In class, make sure you ask me to show you pictures with each exercise we do, so we can see how eigenvalues and eigenvectors appear in surfaces.

Consider the function \(f(x,y)=x^2-2x+xy+y^2\text{.}\) The first and second derivatives are

\begin{equation*} Df(x,y)=\begin{bmatrix}2x-2+y,x+2y \end{bmatrix} \text{ and } D^2f = \begin{bmatrix}2\amp 1 \\1\amp 2 \end{bmatrix} . \end{equation*}

The first derivative is zero (the zero matrix) when both \(2x-2+y=0\) and \(x+2y=0\text{.}\) We need to solve the system of equations \(2x+y=2\) and \(x+2y=0\text{.}\) Double the second equation, and then subtract it from the first to obtain \(0x-3y=2\text{,}\) or \(y=-2/3\text{.}\) The second equation says that \(x=-2y\text{,}\) or that \(x=4/3\text{.}\) So the only critical point is \((4/3,-2/3)\text{.}\)

We find the eigenvalues of \(D^2 f(4/3,-2/3)\) by solving the equation \(\begin{vmatrix}2-\lambda\amp 1 \\1\amp 2-\lambda\end{vmatrix} = (2-\lambda)(2-\lambda)-1=0.\)

In this example, the second derivative is constant, so the point \((4/3,-2/3)\) did not change the matrix. In general, the point will affect your matrix. See Sage to see a graph which shows the eigenvectors in which the largest and smallest second derivatives occur.

Expanding the left hand side gives us {\(4-4\lambda + \lambda^2 -1 = 0\)}. Simplifying and factoring gives us \(\lambda^2-4\lambda +3 = (\lambda-3)(\lambda -1) = 0\text{.}\) This means the eigenvalues are \(\lambda = 1\) and \(\lambda=3\text{.}\) Since both numbers are positive, the function is concave upwards in every direction. The critical point \((4/3,-2/3)\) corresponds to a local minimum of the function. The local minimum is the output \(f(4/3,-2/3) = (4/3)^2-2(4/3)+(4/3)(-2/3)+(-2/3)^2\text{.}\)

A link to the graph of \(f\) is provided on the right. The red vector \((1,1)\) points in the direction in which the second derivative is the largest value 3. The blue vector \((-1,1)\) points in the direction in which the second derivative is the smallest value 1. These vectors are called eigenvectors, and you can learn much more about them, in particular how to find them, in a linear algebra course. For this course, we just need to be able to find eigenvalues.

Exercise10.2.2

Consider the function \(f(x,y)=x^2+4xy+y^2\text{.}\)

(a)

Find the critical points of \(f\) by finding when \(Df(x,y)\) is the zero matrix.

(b)

Find the eigenvalues of \(D^2f\) at any critical points.

(c)

Use the 2nd derivative test to label each critical point as a local maximum, local minimum, or saddle point, and state the value of \(f\) at the critical point.

Exercise10.2.3

Consider the function \(f(x,y)=x^3-3x+y^2-4y\text{.}\)

(a)

Find the critical points of \(f\) by finding when \(Df(x,y)\) is the zero matrix.

(b)

Find the eigenvalues of \(D^2f\) at any critical points.

Hint

First compute \(D^2f\text{.}\) Since there are two critical points, evaluate the second derivative at each point to obtain 2 different matrices. Then find the eigenvalues of each matrix.

(c)

Label each critical point as a local maximum, local minimum, or saddle point, and state the value of \(f\) at the critical point.

Exercise10.2.4

Consider the function \(f(x,y)=x^3 + 3xy +y^3\text{.}\)

(a)

Find the critical points of \(f\) by finding when \(Df(x,y)\) is the zero matrix.

(b)

Find the eigenvalues of \(D^2f\) at any critical points.

(c)

Label each critical point as a local maximum, local minimum, or saddle point, and state the value of \(f\) at the critical point.

Subsection10.2.2Using the Multi-dimensional Second Derivative

You now have the tools needed to find optimal solutions to exercises in any dimension. Here's a silly exercise that demonstrates how we can use this.

Exercise10.2.5

Prof. Woodruff's daughter has asked for a Barbie princess cake. He purchased a metal pan that's roughly in the shape of a paraboloid \(z=f(x,y)=9-x^2-y^2\) for \(z\geq 0\text{.}\) To surprise her, he want to hide a present inside the cake. The present is a bunch of small candy that can pretty much fill a box of any size. He'd like to know how large (biggest volume) of a rectangular box he can fit under the cake, so that when she starts cutting the cake, she'll find her surprise present. The box will start at \(z=0\) and the corners of the box (located at \((x,\pm y)\) and \((-x,\pm y)\)) will touch the surface of the cake \(z=9-x^2-y^2\text{.}\)

(a)

What is the function \(V(x,y)\) that we are trying to maximize?

(b)

If you find all the critical points of \(V\text{,}\) you'll discover there are 9. However, only one of these critical points makes sense in the context of this exercise. Find that critical point.

(c)

Use the second derivative test to prove that the critical point yields a maximum volume.

(d)

What are the dimensions of the box? What's the volume of the box?

The only thing left for Prof. Woodruff to now determine how much candy he should buy to fill the box. He'll take care of that.

In this exercise, we'll derive the version of the second derivative test that is found in most multivariate calculus texts. The test given below only works for functions of the form \(f:\mathbb{R}^2\to\mathbb{R}\text{.}\) The eigenvalue test you have been practicing will work with a function of the form \(f:\mathbb{R}^n\to\mathbb{R}\text{,}\) for any natural number \(n\text{.}\)

Exercise10.2.6

Suppose that \(f(x,y)\) has a critical point at \((a,b)\text{.}\)

(a)

Find a general formula for the eigenvalues of \(D^2f(a,b)\text{.}\) Your answer will be in terms of the second partials of \(f\text{.}\)

(b)

Let \(D=f_{xx}f_{yy}-f_{xy}^2\text{.}\)

(i)

If \(D\lt 0\text{,}\) explain why \(f\) has a saddle point at \((a,b)\text{.}\)

(ii)

If \(D=0\text{,}\) explain why the second derivative test fails.

(iii)

If \(D>0\text{,}\) explain why \(f\) has either a maximum or minimum at \((a,b)\text{.}\)

(iv)

If \(D>0\text{,}\) and \(f_x(a,b)>0\text{,}\) does \(f\) have a local max or local min at \((a,b)\text{.}\) Explain.

(c)

The only critical point of \(f(x,y) = x^2+3xy+2y^2\) is at \((0,0)\text{.}\) Does this point correspond to a local maximum, local minimum, or saddle point? Give the eigenvalues (which should come instantly out of part 1). Find \(D\text{,}\) from part 2, to answer the question.

Subsection10.2.3Computational Practice

These are provided to help you achieve better skills in basic computational answers.

1
2
3
4
5
6
7
8
9