Maxima and Minima

Critical Points

Just as in Calculus I, we can use derivatives to find maxima and minima for functions of two variables. Recall that the candidates for these optimal points are the critical points, where the first derivative is zero or does not exist, as shown below.

Critical points

However, not all critical points correspond to extrema, like the one furthest to the right in the figure above. Thus, once we've found all the critical points, we'll have to test them to determine whether they correspond to maxima, minima, or neither. In Calculus I, we used the First Derivative Test and the Second Derivative Test, but here we'll just use the Second Derivative Test.

Maxima and minima are defined as follows: if f(x,y)f(a,b)f(x,y)≤f(a,b) at all points near (a,b)(a,b), then f(a,b)f(a,b) is a local max. Similarly, if f(x,y)f(a,b)f(x,y)≥f(a,b) at all points near (a,b)(a,b), then f(a,b)f(a,b) is a local min.

Critical Points

A critical point occurs at (a,b)(a,b) if

  1. fx(a,b)=0f_x(a,b)=0 and fy(a,b)=0f_y(a,b)=0

OR

  1. at least one of the partial derivatives does not exist.

Find the critical points of f(x,y)=4+x3+y33xyf(x,y)=4+x^3+y^3-3xy.

Solution

Find the first derivatives: fx(x,y)=3x23yfy(x,y)=3y23x\begin{aligned} f_x (x,y) &= 3x^2-3y\ f_y (x,y) &= 3y^2-3x \end{aligned}

Since these exist everywhere, we simply need to find where they equal zero: 3x23y=0y=x23x^2-3y = 0 \longrightarrow y=x^2

If y=x2y=x^2, then 3y23x=03x43x=03x(x31)=0    x=0,1\begin{aligned} 3y^2-3x &= 0\ 3x^4-3x &= 0\ 3x(x^3-1) &= 0\ \implies x = 0,1 \end{aligned}

Since y=x2y=x^2, these xx values correspond to yy values of 00 and 11, respectively. Thus the critical points are (0,0) and (1,1).\ans{(0,0) \textrm{ and } (1,1).}

Just like in the two-dimensional case, not all critical points are maxima or minima, which is why we need the second derivative test.

Saddle point

The figure above shows a saddle point, so named because it resembles a saddle. At this point, the two partial derivatives are both zero, but it is neither a maximum or minimum.

Second Derivative Test

Suppose the second-order partial derivatives of ff are continuous near (a,b)(a,b) and fx(a,b)=fy(a,b)=0f_x(a,b)=f_y(a,b)=0.

Definition

The discriminant DD is D(a,b)=fxx(a,b) fyy(a,b)(fxy(a,b))2D(a,b) = f_{xx} (a,b)\ f_{yy} (a,b) - \left(f_{xy} (a,b)\right)^2

Basically, if the discriminant is positive, the surface does the same thing in all directions (rises in all directions or falls in all directions); in this case, we use one of the second derivatives to determine which it does. If the discriminant is negative, the point is a saddle point. If the discriminant equals zero, the Second Derivative Test is inconclusive.

Second Derivative Test

Find the local maxima and minima of f(x,y)=4+x3+y33xyf(x,y)=4+x^3+y^3-3xy.

Solution

We already found the critical points: (0,0) and (1,1)(0,0) \textrm{ and } (1,1)

Next, find the discriminant and evaluate it at the critical points: D(x,y)=fxx(x,y) fyy(x,y)(fxy(x,y))2=36xy9D(0,0)=9 Saddle PointD(1,1)=27 and fxx(1,1)=6>0 Minimum\begin{aligned} D (x,y) &= f_{xx} (x,y)\ f_{yy} (x,y) - \left(f_{xy} (x,y)\right)^2\ &= 36xy-9\ \ D (0,0) &= -9 \longrightarrow \textrm{ Saddle Point}\ D (1,1) &= 27 \textrm{ and } f_{xx} (1,1) = 6 > 0 \longrightarrow \textrm{ Minimum} \end{aligned}

We conclude that there is a saddle point at (0,0)(0,0) and a local minimum at (1,1)(1,1).

Find the local maxima and minima of f(x,y)=3x2y+y33x23y2+2f(x,y)=3x^2y+y^3-3x^2-3y^2+2.

Surface with a max, min, and two saddle points

Solution

First, find the critical points. Note that the first partial derivatives exist everywhere, so we need to find the points where fxf_x and fyf_y are zero. fx=6xy6x=0x(y1)=0x=0 or y=1fy=3x2+3y26y=0\begin{aligned} f_x &= 6xy-6x = 0 \longrightarrow x(y-1)=0 \longrightarrow x = 0 \textrm{ or } y=1\ f_y &= 3x^2+3y^2-6y = 0 \end{aligned}

Therefore, the critical points are (0,0)(0,0), (0,2)(0,2), (1,1)(1,1), and (1,1)(−1,1).

Next, find the discriminant and evaluate it at the critical points: D(x,y)=(6y6)2(6x)2=36y272y+3636x2D(0,0)=36>0 and fxx(0,0)=6MAXD(0,2)=36>0 and fxx(0,2)=6MIND(1,1)=36Saddle PointD(1,1)=3Saddle Point\begin{aligned} D (x,y) &= (6y-6)^2 - (6x)^2 = 36y^2-72y+36-36x^2\ \ D (0,0) &= 36 > 0 \textrm{ and } f_{xx} (0,0) = -6 \longrightarrow \textrm{MAX}\ D (0,2) &= 36 > 0 \textrm{ and } f_{xx} (0,2) = 6 \longrightarrow \textrm{MIN}\ D (1,1) &= -36 \longrightarrow \textrm{Saddle Point}\ D (-1,1) &= -3 \longrightarrow \textrm{Saddle Point} \end{aligned}

  1. Find any local extrema and saddle points of f(x,y)=4+2x2+3y2f(x,y) = 4+2x^2+3y^2.

  2. Minimum at (0,0)(0,0).

  3. Find any local extrema and saddle points of f(x,y)=x4+2y24xyf(x,y) = x^4+2y^2-4xy.

  4. Minima at (1,1)(1,1) and (1,1)(−1,−1); saddle point at (0,0)(0,0).

  5. Find any local extrema and saddle points of f(x,y)=x2+y24x+5f(x,y) = \sqrt{x^2+y^2-4x+5}.

  6. Minimum at (2,0)(2,0).

  7. Find any local extrema and saddle points of f(x,y)=x1+x2+y2f(x,y) = \dfrac{x}{1+x^2+y^2}.

  8. Minimum at (1,0)(−1,0); maximum at (1,0)(1,0).

  9. Find any local extrema and saddle points of f(x,y)=yexeyf(x,y) = ye^x-e^y.

  10. Saddle point at (0,0)(0,0).

Applications

Let xx, yy, and zz be nonnegative numbers that add up to 200200: x+y+z=200x+y+z=200

Find values of xx, yy, and zz that minimize x2+y2+z2.x^2+y^2+z^2.

Solution

Use the condition to write the quantity to be minimized as a function of two variables: z=200xyf(x,y)=x2+y2+(200xy)2z=200-x-y \longrightarrow f(x,y) = x^2+y^2+(200-x-y)^2

Next, take the first partial derivatives to find the critical points: fx=2x2(200xy)=4x+2y400fy=2y2(200xy)=4y+2x400\begin{aligned} f_x &= 2x-2(200-x-y) = 4x+2y-400\ f_y &= 2y-2(200-x-y) = 4y+2x-400 \end{aligned}

If 4x+2y400=04x+2y−400=0, y=2002xy=200−2x. Plug this into fyf_y: 4(2002x)+2x400=6x+400=0x=20034(200-2x)+2x-400 = -6x+400 = 0 \longrightarrow x = \dfrac{200}{3}

Using this, y=2002x=2003y=200-2x = \dfrac{200}{3}. Therefore, the one critical point of this function is (2003,2003)\left(\dfrac{200}{3},\dfrac{200}{3}\right).

Find the discriminant at this point: D(x,y)=(4)(4)(2)2=12>0 and fxx=4>0D (x,y) = (4)(4) - (2)^2 = 12 > 0 \textrm{ and } f_{xx} = 4 > 0

Therefore, this quantity is minimized when x=2003, y=2003,  and z=2003.\ans{x=\dfrac{200}{3},\ y=\dfrac{200}{3},\ \textrm{ and } z=\dfrac{200}{3}.}

A shipping company handles rectangular boxes if the sum of the length, width, and height of the box does not exceed 9696 inches. Find the dimensions of the box that meets this condition and has the largest volume.

Solution

The condition in this problem is x+y+z=96x+y+z=96. The volume, the quantity that we'd like to maximize, is V=xyzV=xyz. To write this as a function of two variables, we'll use the condition to eliminate zz: V(x,y)=xy(96xy)=96xyx2yxy2V(x,y)=xy(96-x-y) = 96xy-x^2y-xy^2

Take the first partial derivatives to find the critical points: Vx=96y2xyy2=y(962xy)Vy=96xx22xy=x(96x2y)\begin{aligned} V_x &= 96y-2xy-y^2 = y(96-2x-y)\ V_y &= 96x-x^2-2xy = x(96-x-2y) \end{aligned}

If y(962xy)=0y(96−2x−y)=0, then either y=0y=0 or y=962xy=96−2x. Plug each of these into VyV_y:

We have four critical points, but we can save ourselves some work by noticing that only with the fourth one [(32,32)][(32,32)] is the volume nonzero. We can test to verify that this is a local maximum by finding the discriminant and evaluating it at (32,32)(32,32):

Vxx=2y,Vyy=2x,Vxy=962x2yD(x,y)=(2y)(2x)(962x2y)2D(32,32)=3072>0 and Vxx(32,32)=6<0\begin{aligned} V_{xx} &= -2y, V_{yy} = -2x, V_{xy} = 96-2x-2y\ \ D (x,y) &= (-2y)(-2x)-(96-2x-2y)^2\ D (32,32) &= 3072 > 0 \textrm{ and } V_{xx} (32,32) = -6 < 0 \end{aligned}

Therefore, the volume is maximized at x=32, y=32,  and z=32.\ans{x=32,\ y=32,\ \textrm{ and } z=32.}

Build an aquarium with a volume of 200200 cubic feet; if the base (made of slate) costs 55 times as much as the sides (made of glass), find the dimensions that minimize the cost of the aquarium.

Solution

The condition in this problem is xyz=200xyz=200. The cost, the quantity that we'd like to minimize, is C=5xy+2xz+2yzC=5xy+2xz+2yz. To write this as a function of two variables, we'll use the condition to eliminate zz: C(x,y)=5xy+400y+400xC(x,y)=5xy+\dfrac{400}{y}+\dfrac{400}{x}

Take the first partial derivatives to find the critical points: Cx=5y400x2=0y=80x2Cy=5x400y2=0=5x400(80/x2)2=0x3=80x4.31\begin{aligned} C_x &= 5y-\dfrac{400}{x^2} = 0 \longrightarrow y=\dfrac{80}{x^2}\ C_y &= 5x-\dfrac{400}{y^2} = 0\ &= 5x-\dfrac{400}{(80/x^2)^2} = 0 \longrightarrow x^3 = 80 \longrightarrow x \approx 4.31 \end{aligned}

We can test to verify that this is a local minimum by finding the discriminant and evaluating it at (4.31,4.31)(4.31,4.31): Cxx=800x3,Cyy=800y3,Cxy=5D(x,y)=640,000x3y3(5)2D(4.31,4.31)=75>0 and Cxx(4.31,4.31)=10>0\begin{aligned} C_{xx} &= \dfrac{800}{x^3}, C_{yy} = \dfrac{800}{y^3}, C_{xy} = 5\ \ D (x,y) &= \dfrac{640,000}{x^3y^3}-(5)^2\ D (4.31,4.31) &= 75 > 0 \textrm{ and } C_{xx} (4.31,4.31) = 10 > 0 \end{aligned}

Therefore, the cost is minimized at x=4.31 ft, y=4.31 ft,  and z=10.77 ft.\ans{x=4.31\ ft,\ y=4.31\ ft,\ \textrm{ and } z=10.77\ ft.}

Suppose three houses are located at (0,0)(0,0), (2,0)(2,0), and (1,1)(1,1). A power substation must be located at a point such that the sum of the squares of the distances between the houses and the substation is minimized.

Solution

The sum of the squares of the distances is D=x2+y2+(x2)2+y2+(x1)2+(y1)2=3x2+3y26x2y+6\begin{aligned} D &= x^2+y^2+(x-2)^2+y^2+(x-1)^2+(y-1)^2\ &= 3x^2+3y^2-6x-2y+6 \end{aligned}

Take the first partial derivatives to find the critical points: Dx=6x6=0x=1Dy=6y2=0y=13\begin{aligned} D_x &= 6x-6 = 0 \longrightarrow x=1\ D_y &= 6y-2 = 0 \longrightarrow y = \dfrac{1}{3}\ \end{aligned}

We can test to verify that this is a local minimum by finding the discriminant and evaluating it at (1,13)\left(1,\dfrac{1}{3}\right): Dxx=6,Dyy=6,Dxy=0D(x,y)=36>0 and Dxx>0\begin{aligned} D_{xx} &= 6, D_{yy} = 6, D_{xy} = 0\ \ D (x,y) &= 36 > 0 \textrm{ and } D_{xx} > 0 \end{aligned}

Therefore, the substation should be positioned at (1,13).\ans{\left(1,\dfrac{1}{3}\right).}