← Chapter 4 §4.7 Maxima/Minima Problems 极值问题 · Chapter 4 · Differentiation of Functions of Several Variables

Calculus Volume 3 · Chapter 4 · Section 4.7

Maxima/Minima Problems

Where a surface tops out, bottoms out, or does both at once — and how to find the highest and lowest points of a region.

Colour key minimum maximum saddle boundary key idea · 3D figures turn when you drag them · page links open the textbook

Level 1 · see itWhat a maximum, a minimum and a saddle look likebefore any test

The top of a hill

At the top of z=16x2y2z=\sqrt{16-x^2-y^2} (Figure 4.47), walk east or north: the ground is level either way.

Both slices through the top have slope 0, so fx=fy=0f_x=f_y=0 there, and the tangent plane is horizontal.

A smooth top or bottom is a place where the surface is flat in every direction.

The lowest value, 0, is on the rim x2+y2=16x^2+y^2=16 — the edge of the domain, where the surface is not flat at all.

The two slices through the top, and the flat tangent plane. Drag to turn.

Flat in every direction

Critical point · p387

(x0,y0)(x_0,y_0) is a critical point of ff if fx(x0,y0)=fy(x0,y0)=0f_x(x_0,y_0)=f_y(x_0,y_0)=0, or if fxf_x or fyf_y does not exist there.

Fermat's theorem (Theorem 4.16): a local maximum or minimum, where the partials exist, is at a critical point. Critical points are the only candidates — but not every candidate is an extremum.

z=x2+y2z=x^2+y^2: fx=fy=0f_x=f_y=0 at the bottom.
z=x2+y2z=\sqrt{x^2+y^2}: no partials at the tip, still a minimum.

Bowl, cap, saddle

Minimum: x2+y2x^2+y^2, D=4D=4.
Maximum: x2y2-x^2-y^2, D=4D=4.
Saddle: x2y2x^2-y^2, D=4D=-4.

All three have fx=fy=0f_x=f_y=0 at the origin. The saddle (Figure 4.48) rises along the xx-slice z=x2z=x^2 and falls along the yy-slice z=y2z=-y^2: a minimum one way, a maximum the other.

Contours tell them apart: closed rings round a top or bottom, crossing lines at a saddle.

One picture

Example 4.39b, g=13x3+y2+2xy6x3y+4g=\tfrac13x^3+y^2+2xy-6x-3y+4: a saddle at (1,52)(-1,\tfrac52), D=8D=-8, and a minimum at (3,32)(3,-\tfrac32), D=8D=8.

Find where the surface is flat; the discriminant says which kind of flat.

Level 2 · compute itCritical points, the test, the boundaryand three labs

Finding critical points

Recipe · p387 fx(x,y)=0,fy(x,y)=0 f_x(x,y)=0,\qquad f_y(x,y)=0

Solve the two equations together; then list any points where a partial derivative fails to exist.

Example 4.38b: g=x2+2xy4y2+4x6y+4g=x^2+2xy-4y^2+4x-6y+4

gx=2x+2y+4=0gy=2x8y6=0(1,1),  g(1,1)=5 \begin{aligned} g_x&=2x+2y+4=0\\ g_y&=2x-8y-6=0 \end{aligned}\quad\Longrightarrow\quad (-1,-1),\ \ g(-1,-1)=5

Example 4.38a: f=4y29x2+24y+36x+36f=\sqrt{4y^2-9x^2+24y+36x+36} has (2,3)(2,-3), and also every point of the hyperbola (x2)24(y+3)29=1\frac{(x-2)^2}{4}-\frac{(y+3)^2}{9}=1, where the partials do not exist.

The second derivative test

Theorem 4.17 · p390 D=fxx(x0,y0)fyy(x0,y0)(fxy(x0,y0))2 D=f_{xx}(x_0,y_0)\,f_{yy}(x_0,y_0)-\big(f_{xy}(x_0,y_0)\big)^2

at a critical point where fx=fy=0f_x=f_y=0.

Dfxxf_{xx}at (x0,y0)(x_0,y_0)
D>0D>0>0>0local minimum
D>0D>0<0<0local maximum
D<0D<0anysaddle point
D=0D=0anyno conclusion

D > 0 means the surface curves the same way in every direction; the sign of fxxf_{xx} says up or down. Steps (p391): critical points, then DD at each, then the table.

Absolute extrema on a closed region

Theorems 4.18–4.19 · p394

A continuous ff on a closed, bounded set DD has an absolute maximum and minimum, each at a critical point inside DD or on the boundary.

  1. Critical points inside DD; evaluate ff.
  2. Each boundary piece as a one-variable function; its critical points and endpoints.
  3. Largest value: absolute max. Smallest: absolute min.
Example 4.40a: every candidate and its value. 36 at (0,2)(0,2) beats all; 17 at (3,1)(3,1) is lowest.

On a closed region the winner is often on the edge, where fxf_x and fyf_y need not be zero.

Examples 4.38–4.41

Examplegivenresult
4.38a · p3874y29x2+24y+36x+36\sqrt{4y^2-9x^2+24y+36x+36}(2,3)(2,-3); partials undefined on (x2)24(y+3)29=1\frac{(x-2)^2}{4}-\frac{(y+3)^2}{9}=1
4.38b · p388x2+2xy4y2+4x6y+4x^2+2xy-4y^2+4x-6y+4(1,1)(-1,-1), value 5
4.39a · p3914x2+9y2+8x36y+244x^2+9y^2+8x-36y+24D=144D=144: minimum 16-16 at (1,2)(-1,2)
4.39b · p39313x3+y2+2xy6x3y+4\tfrac13x^3+y^2+2xy-6x-3y+4D=4x04D=4x_0-4: saddle (1,52)(-1,\tfrac52), minimum 294-\tfrac{29}{4} at (3,32)(3,-\tfrac32)
4.40a · p395x22xy+4y24x2y+24x^2-2xy+4y^2-4x-2y+24 on [0,4]×[0,2][0,4]\times[0,2]max 36 at (0,2)(0,2); min 17 at (3,1)(3,1)
4.40b · p397x2+y2+4x6yx^2+y^2+4x-6y on x2+y216x^2+y^2\le16min 13-13 at (2,3)(-2,3); max 16+81344.8416+8\sqrt{13}\approx44.84 on the circle
4.41 · p39948x+96yx22xy9y248x+96y-x^2-2xy-9y^2 on [0,50]×[0,25][0,50]\times[0,25]max 648 at (21,3)(21,3): $648,000

Figure 4.55 (p398) labels its points (125,165,2245)(\tfrac{12}{5},-\tfrac{16}{5},\tfrac{224}{5}) and (125,165,645)(-\tfrac{12}{5},\tfrac{16}{5},-\tfrac{64}{5}); the solution's values, 44.84 on the circle and 13-13 at (2,3)(-2,3), are the right ones.

Lab 1 · read D anywhere

surface

Drag the dot on the contour map, or jump to a critical point. Away from a critical point the tangent plane tilts; at one it lies flat. Try x³ − 3xy²: D=0D=0 at the origin and the test says nothing, yet it is a saddle with three valleys.

Lab 2 · walk the boundary

problem
0

The right-hand graph is ff along the whole boundary, one piece after another. Its highs and lows, the corners, and the inside critical point are the only places the answer can be.

Lab 3 · golf-ball profit

Example 4.41: xx thousand balls, yy hours of advertising, profit f=48x+96yx22xy9y2f=48x+96y-x^2-2xy-9y^2 thousand dollars, on 0x500\le x\le 50, 0y250\le y\le 25.

Surface drawn for 0y120\le y\le 12; past that the profit drops steeply.

Drag the plan. At the best plan both slices are flat: one more ball or one more hour gains nothing. The edges top out at 576 (no advertising) and 256 (no balls), below 648.

Common mistakes

MistakeResultFix
D<0D<0 read as a maximuma saddle called a topD<0D<0: saddle; only D>0D>0 gives an extremum
Deciding max/min from DD aloneCheckpoint 4.35: D=68D=68 is a maximum, not a minimumlook at fxxf_{xx} when D>0D>0
D=0D=0 read as "no extremum"Exercise 325: 9x4y49-x^4y^4 has a maximum at the originD=0D=0: the test is silent; look at ff
Skipping points where a partial fails to existthe tip of x2+y2+1\sqrt{x^2+y^2}+1 missed (Exercise 317)list them as critical points
Only interior critical points on a closed regionExample 4.40a: 17 found, the maximum 36 on the edge missedevery edge, and the corners
Reporting the parameter tt, not the point"t=54t=\tfrac54" for the point (4,54)(4,\tfrac54)substitute back into x(t),y(t)x(t),y(t)

Practice and answers

Exercises from p401; the book's key: p864, p870871.

Checkpoints 4.34–4.36
#taskanswer
4.34critical point of x3+2xy2x4yx^3+2xy-2x-4y(2,5)(2,-5)
4.35local extrema of x3+2xy6x4y2x^3+2xy-6x-4y^2saddle (43,13)(\tfrac43,\tfrac13), D=68D=-68; local max (32,38)(-\tfrac32,-\tfrac38), D=68D=68, value 9916\tfrac{99}{16}
4.36absolute extrema of 4x22xy+6y28x+2y+34x^2-2xy+6y^2-8x+2y+3 on [0,2]×[1,3][0,2]\times[-1,3]min f(1,0)=1f(1,0)=-1; max f(0,3)=63f(0,3)=63
Exercises
#functionanswer
311(3x2)2+(y4)2(3x-2)^2+(y-4)^2(23,4)(\tfrac23,4)
31315x33xy+15y315x^3-3xy+15y^3(0,0)(0,0), (115,115)(\tfrac1{15},\tfrac1{15})
315x25y2+8x10y13-x^2-5y^2+8x-10y-13maximum at (4,1,8)(4,-1,8)
317x2+y2+1\sqrt{x^2+y^2}+1minimum at (0,0,1)(0,0,1)
319x2y2x^2y^2test fails; absolute minimum 0 on the axes
3212xy+3x+4y2xy+3x+4ysaddle f(2,32)=6f(-2,-\tfrac32)=-6
323x2+4xy+y2x^2+4xy+y^2saddle (0,0,0)(0,0,0)
3259x4y49-x^4y^4D=0D=0; a maximum, f(0,0)=9f(0,0)=9
3273x22xy+y28y3x^2-2xy+y^2-8yminimum at (2,6)(2,6)
329y2+xy+3y+2x+3y^2+xy+3y+2x+3saddle (1,2)(1,-2)
331x2+2y2x2yx^2+2y^2-x^2ysaddles (±2,1)(\pm2,1); minimum (0,0)(0,0)
333e(x2+y2+2x)e^{-(x^2+y^2+2x)}maximum at (1,0)(-1,0)
335x2+10xy+y2x^2+10xy+y^2saddle (0,0)(0,0)
337120x+120yxyx2y2120x+120y-xy-x^2-y^2maximum at (40,40)(40,40)
339x2+x3xy+y35x^2+x-3xy+y^3-5saddle (14,12)(\tfrac14,\tfrac12); minimum (1,1)(1,1)
341yexeyye^x-e^ysaddle (0,0)(0,0)
343sinxsiny\sin x\sin y on (0,2π)2(0,2\pi)^2saddle (π,π)(\pi,\pi); max (π2,π2),(3π2,3π2)(\tfrac\pi2,\tfrac\pi2),(\tfrac{3\pi}2,\tfrac{3\pi}2); min (π2,3π2),(3π2,π2)(\tfrac\pi2,\tfrac{3\pi}2),(\tfrac{3\pi}2,\tfrac\pi2)
345x2+y22y+1x^2+y^2-2y+1 on x2+y24x^2+y^2\le4min (0,1,0)(0,1,0); max (0,2,9)(0,-2,9)
3472yx2+y2+1\frac{-2y}{x^2+y^2+1} on x2+y24x^2+y^2\le4min (0,1,1)(0,1,-1); max (0,1,1)(0,-1,1)
349points of x2yz=5x^2-yz=5 nearest the origin(±5,0,0)(\pm\sqrt5,0,0)
351largest package, length + girth 108 in18 by 36 by 18 in
353z=x2+y2+10z=x^2+y^2+10 nearest x+2yz=0x+2y-z=0(12,1,454)(\tfrac12,1,\tfrac{45}4); on the plane (4724,4712,23524)(\tfrac{47}{24},\tfrac{47}{12},\tfrac{235}{24})
355shoe revenue R(x,y)R(x,y)x=3x=3, y=6y=6
357soda can, height + circumference 120 cmV=64,000π20,372 cm3V=\tfrac{64{,}000}{\pi}\approx20{,}372\ \text{cm}^3
Level 3 · why it worksWhere the test comes fromshort arguments

Why D works

Near a critical point, with A=fxxA=f_{xx}, B=fxyB=f_{xy}, C=fyyC=f_{yy} there, ff is its quadratic part:

f(x0+h,y0+k)f(x0,y0)+12(Ah2+2Bhk+Ck2) f(x_0+h,y_0+k)\approx f(x_0,y_0)+\tfrac12\left(Ah^2+2Bhk+Ck^2\right)

Complete the square (for A0A\ne0):

Ah2+2Bhk+Ck2=A[(h+BAk)2+ACB2A2k2] Ah^2+2Bhk+Ck^2=A\left[\Big(h+\frac BA k\Big)^2+\frac{AC-B^2}{A^2}\,k^2\right]

If D=ACB2>0D=AC-B^2>0, the bracket is positive for every direction, so ff rises all round (A>0A>0) or falls all round (A<0A<0). If D<0D<0, the bracket is positive along k=0k=0 and negative along h=BAkh=-\frac BAk: a saddle. D is the discriminant of the quadratic: it asks whether the surface bends the same way in every direction.

When D = 0

ffD(0,0)D(0,0)at the origin
x4+y4x^4+y^40minimum
x4y4-x^4-y^40maximum
x4y4x^4-y^40saddle

All three have zero second derivatives at the origin, so the quadratic part is 0 and says nothing. The test only reads the quadratic part; when it vanishes, higher terms decide.

Why closed and bounded

Not bounded

x2+y2x^2+y^2 on the whole plane has no maximum: it grows without end.

Not closed

x2+y2x^2+y^2 on the open disc x2+y2<1x^2+y^2<1 approaches 1 but never reaches it: no maximum.

The extreme value theorem (Theorem 4.18) needs both. Then an absolute extremum inside DD is also a local one, so it is a critical point (Fermat); otherwise it is on the boundary. That is Theorem 4.19.

Where it is used next

WhereWhat changes
§4.8 Lagrange multipliersa curved boundary g(x,y)=cg(x,y)=c without a parametrization: f=λg\nabla f=\lambda\nabla g
Least squaresminimizing a sum of squares by setting partials to 0
Machine learninggradient descent walks downhill to a critical point; saddles slow it down

Every method is the same two steps: find where the surface is flat, then check the edges.