$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\kernel}{\mathrm{null}\,}$$ $$\newcommand{\range}{\mathrm{range}\,}$$ $$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$ $$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$ $$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$ $$\newcommand{\Span}{\mathrm{span}}$$

# Maxima and minima

Suppose a surface given by $$f(x,y)$$ has a local maximum at $$(x_0,y_0,z_0)$$; geometrically, this point on the surface looks like the top of a hill. If we look at the cross-section in the plane $$y=y_0$$, we will see a local maximum on the curve at $$(x_0,z_0)$$, and we know from single-variable calculus that $${\partial z\over\partial x}=0$$ at this point.

Likewise, in the plane $$x=x_0$$, $${\partial z\over\partial y}=0$$. So if there is a local maximum at $$(x_0,y_0,z_0)$$, both partial derivatives at the point must be zero, and likewise for a local minimum. Thus, to find local maximum and minimum points, we need only consider those points at which both partial derivatives are 0. As in the single-variable case, it is possible for the derivatives to be 0 at a point that is neither a maximum or a minimum, so we need to test these points further.

You will recall that in the single variable case, we examined three methods to identify maximum and minimum points; the most useful is the second derivative test, though it does not always work. For functions of two variables there is also a second derivative test; again it is by far the most useful test, though it doesn't always work.

Theorem 14.7.1

Suppose that the second partial derivatives of $$f(x,y)$$ are continuous near $$(x_0,y_0)$$, and $$f_x(x_0,y_0)=f_y(x_0,y_0)=0$$. We denote by $$D$$ the discriminant $$D(x_0,y_0)=f_{xx}(x_0,y_0)f_{yy}(x_0,y_0)-f_{xy}(x_0,y_0)^2$$.

If $$D>0$$ and $$f_{xx}(x_0,y_0) < 0$$ there is a local maximum at $$(x_0,y_0)$$; if $$D>0$$ and $$f_{xx}(x_0,y_0)>0$$ there is a local minimum at $$(x_0,y_0)$$; if $$D < 0$$ there is neither a maximum nor a minimum at $$(x_0,y_0)$$; if $$D=0$$, the test fails.

Example 14.7.2

Verify that $$f(x,y)=x^2+y^2$$ has a minimum at $$(0,0)$$.

SOLUTION

First, we compute all the needed derivatives:

$f_x=2x \qquad f_y=2y \qquad f_{xx}=2 \qquad f_{yy}=2 \qquad f_{xy}=0.$

The derivatives $$f_x$$ and $$f_y$$ are zero only at $$(0,0)$$. Applying the second derivative test there: $D(0,0)=f_{xx}(0,0)f_{yy}(0,0)-f_{xy}(0,0)^2= 2\cdot2-0=4>0,$ so there is a local minimum at $$(0,0)$$, and there are no other possibilities.

Example 14.7.3

Find all local maxima and minima for $$f(x,y)=x^2-y^2$$.

SOLUTION

The derivatives:

$f_x=2x \qquad f_y=-2y \qquad f_{xx}=2 \qquad f_{yy}=-2 \qquad f_{xy}=0.$

Again there is a single critical point, at $$(0,0)$$, and $D(0,0)=f_{xx}(0,0)f_{yy}(0,0)-f_{xy}(0,0)^2= 2\cdot-2-0=-4 < 0,$ so there is neither a maximum nor minimum there, and so there are no local maxima or minima. The surface is shown in figure 14.7.1.

Figure 14.7.1. A saddle point, neither a maximum nor a minimum.