SECOND-PARTIALS TEST

Let $g$ be function of one variable and suppose that $g^{\prime }(x_0)=0$. According to the second-derivative test, $g$ has

a local minimum at $x_0$ if MATH

a local maximum at $x_0$ if MATH

We have a similar test for functions of two variables. As one might expect, the test is somewhat more complicated to state and definitely more difficult to prove.

THEOREM THE SECOND-PARTIALS TEST

Suppose that $f$ has continuous second-order partials in a neighborhood of $(x_0,y_0)$ and that MATH. Set
MATH
and form the discriminant $D=B^2-AC$.

1. If $D>0$, then $(x_0,y_0)$ is a saddle point.

2. If $D<0$, then $f$ has

a local minimum at $(x_0,y_0)$ if $A>0,$

a local maximum at $(x_0,y_0)$ if $A<0.$

The test is geometrically evident for functions of the form
MATH

The graph of such a function is a paraboloid:
MATH

The gradient is $0$ at the origin $(0,0)$. Moreover
MATH
and $D=B^2-AC=-AC.$ If $D>0$, then $A$ and $C$ have opposite signs and the surface has a saddle point.

Suppose now that $D<0.$ If $A>0$, then $C>0$ and the surface has a minimum point; if $A<0,$ then $C<0$ and the surface has a maximum point.

In the examples that follow we apply the second-partials test to a variety of functions.

Example 1. For the function
MATH
we have
MATH
Setting both partials equal to zero, we have
MATH
The only simultaneous solution to these equations is $x=1,y=4$. The point $(1,4)$ is thus the only stationary point.

The second partials are constant:
MATH
Thus $A=4,B=-1,C=2,$ and
MATH
Since $A>0,$ it follows from the second-partials test that
MATH
is a local minimum.

Example 2. The function
MATH
has partial derivatives
MATH
Setting both of these partials equal to zero, we have
MATH
The only simultaneous solution to these equations is $x=0,y=-1.$ The point $(0,-1)$ is thus the only stationary point.

The second partials are
MATH
Evaluating these partials at the point $(0,-1)$, we find that $A=0$, $B=3,C=0,$ and thus
MATH
By the second-partials test, $(0,-1)$ is a saddle point.

We could have determined that $(0,-1)$ is a saddle point by comparing the value of $f$ at $(0,-1)$ with its value at nearby points $(h,-1+k):$
MATH
For small $k>0$, this expression is positive if $h>0$ and negative if $h<0.$

Example 3. The function
MATH
has partial derivatives
MATH
Setting both partials equal to zero, we have
MATH

The only simultaneous solutions are $x=1,y=1$ and $x=0,y=0$. The points $(1,1)$ and $(0,0)$ are the only stationary points.

The second partials are
MATH
At $(1,1)$, we have $A=6,B=-3,C=6$, and thus
MATH
Since $A>0$, we know that
MATH
is a local minimum. At $(0,0)$, we have $A=0,B=-3,C=0$. Thus
MATH
The origin is a saddle point.

Example 4. Here we test the function


MATH
on the open square $0<x<\pi ,0<y<\pi .$

In the first place
MATH
Setting both of these partials equal to zero, we have
MATH
Together these equations imply that $\cos \,x=\cos \;y$. Since both $x$ and $y$ lie between $0$ and $\pi $, we can conclude that $x=y$. The condition
MATH
now gives
MATH
Into this last equation we substitute the identity MATH and thereby obtain the relation
MATH
This is a quadratic in $\cos \,x$ with solutions
MATH
We throw out the solution $-1$ because $x$ has to lie strictly between $0$ and $\pi $. The other possibility, $\cos \,x=\frac 12$, gives $x=\frac \pi 3$. Since $x=y$, we also have $y=\frac \pi 3$. This shows that MATH is the only stationary point.

The second partials are
MATH

MATH

At MATH we have
MATH
and thus
MATH
Since $A<0$, we can conclude that
MATH
is a local maximum.

The second-derivative test applies to points $x_0$ where $g^{\prime }(x_0)=0$ but MATH If MATH, the second-derivative test provides no information. The second-partials test suffers from a similar limitation. It applies to points $(x_0,y_0)$ where MATH but $D\ne 0.$ If $D=0,$ the second-partials test provides no information. Consider, for example, the functions
MATH
Each of these functions has zero gradient at the origin, and in each case $D=0.$ Yet,

(1) for $F$, $(0,0)$ gives a local minimum;

(2) for $G$, $(0,0)$ gives a local maximum;

(3) for $H$, $(0,0)$ is a saddle point.

Statements (1) and (2) are obvious. To confirm (3), note that $H(0,0)=0$, but in every neighborhood of $(0,0)$ the function $H$ takes on both positive and negative values:

$H(x,0)>0$ for $x\ne 0$ while $H(0,y)<0$ for $y\ne 0$.

MAXIMA AND MINIMA WITH SIDE CONDITIONS

When we ask for the distance from a point $(x_{0},y_{0})$ to a line $Ax+By+C=0,$ we are asking for the minimum value of
MATH
with $(x,y)$ subject to the side condition $Ax+By+C=0.$ When we ask for the distance from a point MATH to a plane $Ax+By+Cz+D=0,$ we are asking for the minimum value of
MATH
with $(x,y,z)$ subject to the side condition $Ax+By+Cz+D=0.$

Our interest here is to present techniques for handling problems of this sort in general. In the two-variable case, the problems will take the form of maximizing (or minimizing) some expression $f(x,y)$ subject to a side condition $g(x,y)=0$. In the three-variable case, we will seek to maximize (or minimize) some expression $f(x,y,z)$ subject to a side condition $g(x,y,z)=0$. We begin with two simple problems-

Problem 1. Maximize the product $xy$ subject to the side condition $x+y-1=0.$

Solution. The condition $x+y-1=0$ gives $y=1-x$. Our initial problem can therefore be solved simply by maximizing the product $h(x)=x(1-x)$. The derivative MATH is $0$ only at $x=1/2$. Since MATH, we know from the second-derivative test that MATH is the desired maximum.

Problem 2. Find the maximum volume of a rectangular solid given that the sum of the lengths of its edges is $12a.$

Solution. We denote the dimensions of the solid by $x,y,z.$ The volume is given by
MATH
The stipulation on the edges requires that
MATH
Solving this last equation for $z$, we find that
MATH
Substituting this expression for $z$ in the volume formula, we have
MATH
Since $x,y,$ and $z=3a-(x+y)$ must all remain positive, our problem is to find the maximum value of $V$ on the interior of the triangle bounded by the lines $x=0,y=0$ and $x+y=3a.$

The first partials are
MATH

MATH

Setting both partials equal to zero, we have
MATH
Since $x$ and $y$ are assumed positive, we can divide by $x$ and $y$ and get

$3a-2x-y=0$ and $3a-x-2y=0$.

Solving these equations simultaneously, we find that $x=y=a.$ The point $(a,a)$, which does lie within the triangle, is the only stationary point. The value of $V$ at that point is $a^3$. The conditions of the problem make it clear that this is a maximum.

The last two problems were easy. They were easy in part because the side conditions were such that we could solve for one of the variables in terms of the other(s). In general this is not possible and a more sophisticated approach is required.

The Method of Lagrange

Throughout the discussion $f$ will be a function of two or three variables continuously differentiable on some open set $U$. We take
MATH
as a curve that lies entirely in $U$ and has at each point a nonzero tangent vector $r^{\prime }(t)$. The basic result is this:

if $x_0$ maximizes (or minimizes) $f(x)$ on $C$,

then $\nabla f(x_0)$ is perpendicular to $C$ at $x_0.$

Proof. Choose $t_0$ so that


MATH
The composition $f(r(t))$ has a maximum (or minimum) at $t_0$. Consequently, its derivative
MATH
must be zero at $t_0$:
MATH
This shows that
MATH
Since $r^{\prime }(t_0)$ is tangent to $C$ at $x_0$, $\nabla f(x_0)$ is perpendicular to $C$ at $x_0.$

We are now ready for the side condition problems. Suppose that $g$ is a continuously differentiable function of two or three variables defined on a subset of the domain of $f$. Lagrange made the following observation:

if $x_0$ maximizes (or minimizes) $f(x)$ subject to the side condition $g(x)=0$, then $\nabla f(x_0)$ and $\nabla g(x_0)$ are parallel. Thus, if $\nabla g(x_0)\ne 0$, then there exists a scalar $\lambda $, such that
MATH

Such a scalar $\lambda $ has come to be called a Lagrange multiplier.

Proof. Let us suppose that $x_0$ maximizes (or minimizes) $f(x)$ subject to the side condition $g(x)=0$. If $\nabla g(x_0)=0$ , the result is trivially true: every vector is parallel to the zero vector.

In the two-variable case we suppose the side condition $g(x,y)=0$ and MATH

The side condition defines a curve $C$ that has a nonzero tangent vector at $(x_0,y_0).$ Since $(x_0,y_0)$ maximizes (or minimizes) $f(x,y)$ on $C$, we know that $\nabla f((x_0,y_0)$ is perpendicular to $C$ at $(x_0,y_0).$ Since $\nabla g(x_0,y_0)$ is also perpendicular to $C$ at $(x_0,y_0)$ , the two gradients are therefore parallel.

In the three-variable case we have the side condition $g(x,y,z)=0$ and MATH The side condition defines a surface $F$ that lies in the domain of $f$. Now let $C$ be a curve that lies on $F$ and passes through $(x_0,y_0,z_0)$ with nonzero tangent vector. We know that $(x_0,y_0,z_0)$ maximizes (or minimizes) $f(x,y,z)$ on $C$. Consequently, MATH is perpendicular to $C$ at $(x_0,y_0,z_0)$ . Since this is true for each such curve $C$, MATH must be perpendicular to $F$ itself. But MATH is also perpendicular to $F$ at $(x_0,y_0,z_0)$ . It follows that MATH and MATH are parallel.

We come now to some problems that are susceptible to Lagrange's method. In each case $\nabla g$ is not $0$ where $g$ is $0$ and therefore we can focus entirely on those points $x$ that satisfy a Lagrange condition
MATH

Problem 3. Maximize and minimize

$f(x,y)=xy$ on the unit circle $x^2+y^2=1.$

Solution. Since $f$ is continuous and the unit circle is closed and bounded, it is clear that both a maximum and a minimum exist. To apply Lagrange's method we set
MATH
We want to maximize and minimize

$f(x,y)=xy$ subject to the side condition $g(x,y)=0$.

The gradients are
MATH
Setting
MATH
we obtain
MATH
Multiplying the first equation by $y$ and the second equation by $x$, we find that
MATH
and thus
MATH

The side condition $x^2+y^2=1$ now implies that $2x^2=1$ and therefore that MATH . The only points that can give rise to an extreme value are
MATH
At the first and fourth points $f$ takes on the value $1/2.$ At the second and third points $f$ takes on the value $-1/2.$ Clearly then $1/2$ is the maximum value and $-1/2$ the minimum value.

Problem 4. Find the minimum value taken on by the function

$f(x,y)=x^2+(y-2)^2$ on the hyperbola $x^2-y^2=1$.

Solution. This minimum is simply the square of the distance from the point $(0,2)$ to the hyperbola and thus clearly exists. Now set
MATH
We want to minimize

$f(x,y)=x^2+(y-2)^2$ subject to the side condition $g(x,y)=0.$

Here
MATH
The Lagrange condition MATH gives
MATH
which we can simplify to
MATH

The side condition $x^2-y^2=1$ shows that $x$ cannot be zero. Dividing $x=\lambda x$ by $x$, we get $\lambda =1$. This means that $y-2=-y$ and therefore $y=1$. With $y=1$, the side condition gives $x=\pm \sqrt{2}.$ The points to be checked are therefore $(-\sqrt{2},1)$ and $(\sqrt{2},1)$. At each of these points $f$ takes on the value $3$. This is the desired minimum.

Remark. The last problem could have been solved more simply by rewriting the side condition as $x^2=1+y^2$ and eliminating $x$ from $f(x,y)$ by substitution. It would then have been only a matter of minimizing MATH

Problem 5. Maximize

$f(x,y,z)=xyz$ subject to the side condition $x^3+y^3+z^3=1$

with MATH

Solution. The set of all points $(x,y,z)$ that satisfy the side condition can be shown to be closed and bounded. Since $f$ is continuous, we can be sure that the desired maximum exists. We begin by setting
MATH
so that the side condition becomes $g(x,y,z)=0$. We seek those triples $(x,y,z)$ that simultaneously satisfy a Lagrange condition

MATH and the side condition $g(x,y,z)=0$.

The gradients are


MATH
The Lagrange condition MATH gives
MATH
Multiplying the first equation by $x$, the second by $y$, and the third by $z $, we get
MATH
and consequently
MATH
We can exclude$\lambda =0$ because, if $\lambda =0$, then $x,y$, or $z$ would have to be zero. That would force $xyz$ to be $0$, and $0$ is obviously not a maximum. Having excluded $\lambda =0$, we can divide by $\lambda $ and get $x^3=y^3=z^3$ and thus $x=y=z$. The side condition $x^3+y^3+z^3=1$ now gives
MATH
The desired maximum is $\frac 13$ .

Problem 6. Show that, of all the triangles inscribed in a fixed circle, the equilateral triangle has the largest perimeter.

Solution. It is intuitively clear that this maximum exists and geometrically clear that the triangle that offers this maximum contains the center of the circle in its interior or on its boundary. We denote by $x,y,z$ the central angles that subtend the three sides. It can verified by trigonometry that the perimeter of the triangle is given by the function
MATH
As a side condition we have
MATH
To maximize the perimeter we form the gradients
MATH
The Lagrange condition MATH gives
MATH
and therefore
MATH
With $x,y,z$ all in $(0,\pi ]$, we can conclude that $x=y=z.$ Since the central angles are equal, the sides are equal. The triangle is therefore equilateral.

The Lagrange equation can be replaced by a cross-product equation: points that satisfy MATH satisfy
MATH
In two variables this reduces to
MATH

Problem 7. Maximize and minimize $f(x,y)=xy$ on the unit circle $x^2+y^2=1.$

Solution. This problem was solved earlier by means of the Lagrange equation. This time we will use the cross-product equation instead. As before we set
MATH
so that the side condition takes the form $g(x,y)=0$. Since
MATH
we have
MATH
This gives $x^2=y^2.$

As before, the side condition $x^2+y^2=1$ now implies that $2x^2=1$ and therefore that MATH. The points under consideration are
MATH
At the first and fourth points $f$ takes on the value $1/2.$ At the second and third points $f$ takes on the value $-1/2$. The first is a maximum and the second a minimum.

Exercise

  1. Find the extreme value of $z=xy$ subject to the condition $x+y=1.$ (Maximum value is $\frac{1}{4};$ no minimum)

  2. Find the maximum and minimum distances from the origin to the curve MATH (Maximum is $2$, minimum is $1$)

  3. Assume $a$ and $b$ are fixed positive numbers.

    1. Find the extreme values of $z=x/a+y/b$ subject to the condition $x^{2}+y^{2}=1.$ (Maximum is MATH at MATH minimum is MATH at MATH

    2. Find the extreme values of $z=x^{2}+y^{2}$ subject to the condition $x/a+y/b=1.$ (Minimum is at MATH at MATH no maximum)

  4. Find the extreme values of MATH subject to the side condition $x-y=\pi /4.$ (Maximum is $1+\sqrt{2}/2$ at the points MATH where $n$ is any integer; minimum is $1-\sqrt{2}/2$ at the points MATH where $n$ is any integer)

  5. Find the extreme values of the scalar field $f(x,y,z)=x-2y+2z$ on the sphere MATH (Maximum is $3$ at (MATHminimum is $-3$ at (-MATH

  6. Find the points of the surface $x^{2}-xy=1$ nearest to the origin. ($(0,0,1)$ and $(0,0,-1)$)

  7. Find the shortest distance from the point $(1,0)$ to the parabola $y^{2}=4x.$ ($1$)

This document created by Scientific WorkPlace 4.0.