Units

Unit 4: Local Extrema and Saddle Points

The Concept

We use the first derivative test and second derivative test to locate and distinguish between local minima, local maxima and saddle points for a function $z = f(x,y)$.

First derivative test

For functions of a single variable, $y = f(x)$, critical points in 2D are defined as the values of the function in which the derivative $\frac{df}{dx}$ equals zero or which does not exist. When dealing with functions of two variables, $z = f(x,y)$, the concept of critical points in 3D remains virtually identical, save for the fact that we must now deal with partial derivatives. Thus, for functions of two variables, $z = f(x,y)$, in order to find the critical points $(x_0, y_0)$, we need to solve a system of two equations: $\frac{\partial f}{\partial x}=0$ and $\frac{\partial f}{\partial y}=0$.

Second derivative test

Similarly, the most important quantity in the second derivative test is the Jacobian matrix, denoted as ‘$J$’. It is the matrix of all its second-order partial derivatives, i.e.,

$J=\begin{pmatrix} \frac{\partial^2 f}{\partial x^2} & \frac{\partial^2 f}{\partial x \partial y} \\ \frac{\partial^2 f}{\partial y \partial x} & \frac{\partial^2 f}{\partial y^2} \end{pmatrix}$ or $\begin{pmatrix} f_{xx} & f_{xy} \\ f_{yx}& f_{yy} \end{pmatrix}.$

Note that if mixed second-order derivatives ($f_{xy}, f_{yx}$) are continuous, then $f_{xy}=f_{yx}$ (Clairaut’s Theorem). We plug in the critical points from the first derivative into the Jacobian and calculate the determinant of the Jacobian matrix, denoted as ‘$D$’, i.e.,

$D=\begin{vmatrix} f_{xx}(x_0, y_0) & f_{xy}(x_0, y_0) \\ f_{yx}(x_0, y_0)& f_{yy}(x_0, y_0) \end{vmatrix}=f_{xx}(x_0, y_0) f_{yy}(x_0, y_0) - f_{xy}(x_0, y_0) f_{yx}(x_0, y_0)$

Then we use the following rules to conduct the second derivative test:

1. If $D>0$ and $f_{xx}(x_0, y_0)>0$, then $f$ has a local minimum at $(x_0, y_0)$.
2. If $D>0$ and $f_{xx}(x_0, y_0)<0$, then $f$ has a local maximum at $(x_0, y_0)$.
3. If $D<0$, then $f$ has a saddle point at $(x_0, y_0)$.
4. If $D=0$, then the test is inconclusive.

The Plot

Now, you should engage with the 3D plot below to understand local maximum, local minimum and saddle points[1]. Follow the steps below to apply changes to the plot and observe the effects:

1. Input a function of two variables into the $f(x,y)$ input function section.
2. Move the point on the plane around and the Jacobian determinant will automatically be calculated for you. The equation for each is provided, where the determinant of the jacobian represents the D value from the formula above.
3. Once you hover over a local maximum, local minimum or a saddle point, a text will appear notifying you of the answer.

Self-Checking Questions

Check your understanding by solving the following questions[2]:

Use the first and second derivative tests to identify any critical points and determine whether each critical point is a maximum, minimum, saddle point or none of these.

1. $f(x,y) = -x^3+4xy-2y^2+1$
2. $f(x,y) = 2xye^{-x2-y2}$

Use the graph to find the answers to these questions.