The top of the hill

Walk up a hill and at the very top, for one step, you are nei­ther climb­ing nor descend­ing. A func­tion behaves the same way: where it stops ris­ing and starts falling, it reaches a peak, a local max­i­mum. Find­ing such points answers real design ques­tions, such as the biggest box you can fold, the cheap­est tank you can build, or the short­est path. We will locate max­ima and min­ima with the first and sec­ond deriv­a­tive tests, find the absolute extremes on a closed inter­val, solve opti­mi­sa­tion prob­lems, and end with mixed prac­tice.

Local max­ima and min­ima

At a local max­i­mum or min­i­mum of a dif­fer­en­tiable func­tion, f′(c)=0f'(c) = 0; such a point is called a crit­i­cal point. But be care­ful, since not every crit­i­cal point is an extreme. For exam­ple, x3x^3 has f′(0)=0f'(0) = 0 yet it keeps on increas­ing.

First deriv­a­tive test. Watch the sign of f′f' as you pass through cc. If it changes from ++ to −-, you have a local max­i­mum; from −- to ++, a local min­i­mum. If it does not change at all, it is nei­ther (a point of inflec­tion).

Sec­ond deriv­a­tive test. Sup­pose f′(c)=0f'(c) = 0. If f′′(c)<0f''(c) < 0, it is a local max­i­mum; if f′′(c)>0f''(c) > 0, a local min­i­mum. If f′′(c)=0f''(c) = 0, the test tells you noth­ing, and you fall back on the first test.

Exam­ple 1. f(x)=x3−12x+5f(x) = x^3 - 12x + 5: f′=3(x2−4)f' = 3(x^2 - 4), so the crit­i­cal points are ±2\pm 2. Now f′′=6xf'' = 6x: f′′(−2)<0f''(-2) < 0 gives a local max f(−2)=21f(-2) = 21; f′′(2)>0f''(2) > 0 gives a local min f(2)=−11f(2) = -11.

Graph of f(x) = x cubed minus 12x plus 5, with a peak marked at the local maximum (-2, 21) and a valley marked at the local minimum (2, -11).
The crit­i­cal points x = -2 and x = 2 give a local max­i­mum and a local min­i­mum.

Absolute extremes on [a,b][a, b]

A con­tin­u­ous func­tion on a closed inter­val always reaches an absolute max­i­mum and min­i­mum, either at a crit­i­cal point or at an end­point. So the recipe is short: work out ff at all of these points and com­pare.

Exam­ple 2. f(x)=2x3−9x2+12xf(x) = 2x^3 - 9x^2 + 12x on [0,3][0, 3]: f′=6(x−1)(x−2)f' = 6(x - 1)(x - 2); f(0)=0f(0) = 0, f(1)=5f(1) = 5, f(2)=4f(2) = 4, f(3)=9f(3) = 9. So the absolute max is 99 at x=3x = 3, and the absolute min is 00 at x=0x = 0. Notice both are at end­points here.

Opti­mi­sa­tion

The hard­est step is usu­ally the first one. Use the given con­di­tion to write the quan­tity you want to opti­mise as a func­tion of just one vari­able. After that, dif­fer­en­ti­ate as usual.

Exam­ple 3. An open box is made from a 2424 cm square sheet by cut­ting equal squares of side xx from the cor­ners. V=x(24−2x)2V = x(24 - 2x)^2; V′=(24−2x)(24−6x)=0V' = (24 - 2x)(24 - 6x) = 0 gives x=4x = 4 (not 1212, which would leave no base at all). V(4)=4⋅256=1024V(4) = 4 \cdot 256 = 1024 cm³, a max­i­mum.

A 24 cm square sheet with a square of side x cut from each corner, leaving a base of side 24 - 2x; folded up with x = 4 it becomes an open box 16 by 16 by 4 cm of volume 1024 cubic cm.
Cut­ting squares of side x from the cor­ners and fold­ing up the sides; x = 4 gives the largest box.

Exam­ple 4. Of all rec­tan­gles with perime­ter 4040 cm, which has the largest area? A=x(20−x)A = x(20 - x), A′=20−2x=0A' = 20 - 2x = 0 at x=10x = 10, so the answer is the square.

Exam­ple 5. A closed cylin­dri­cal can holds 250π250\pi cm³. Which shape uses the least metal? πr2h=250π\pi r^2h = 250\pi gives h=250r2\displaystyle h = \tfrac{250}{r^2}; S=2πr2+500πr\displaystyle S = 2\pi r^2 + \tfrac{500\pi}{r}; S′=4πr−500πr2=0\displaystyle S' = 4\pi r - \tfrac{500\pi}{r^2} = 0 at r=5r = 5, h=10h = 10. So the height equals the diam­e­ter.

A closed cylinder of volume 250 pi cubic cm with radius 5 cm and height 10 cm, the height equal to the diameter of 10 cm, which gives the least surface area.
The can of least sur­face area: radius 5 cm, height 10 cm, equal to its diam­e­ter.

Exam­ple 6. Two pos­i­tive num­bers add to 1818. Make the prod­uct of one and the square of the other as large as pos­si­ble: P=x2(18−x)P = x^2(18 - x), P′=36x−3x2=0P' = 36x - 3x^2 = 0 at x=12x = 12, so the num­bers are 1212 and 66, with P=864P = 864.

Mixed prac­tice

  1. Find the local max­ima and min­ima: f(x)=x3−3x2−9x+4f(x) = x^3 - 3x^2 - 9x + 4; f(x)=x+4x\displaystyle f(x) = x + \tfrac{4}{x} for x>0x > 0.
  2. Find absolute extremes of f(x)=x4−8x2+3f(x) = x^4 - 8x^2 + 3 on [−1,3][-1, 3].
  3. Find absolute extremes of f(x)=sin⁡2xf(x) = \sin 2x on [0,π][0, \pi].
  4. Show that f(x)=x3f(x) = x^3 has no local extreme.
  5. Find two pos­i­tive num­bers whose sum is 3030 and whose prod­uct is great­est.
  6. A wire 3636 cm long is bent into a rec­tan­gle. Find the dimen­sions of max­i­mum area.
  7. A rec­tan­gle is inscribed in a semi­cir­cle of radius 55 with one side on the diam­e­ter. Find its largest area.
  8. An open tank with square base and vol­ume 3232 m³ is to be built. Find the dimen­sions that min­imise the area of sheet used.
  9. Find the points on y2=4xy^2 = 4x near­est to (5,0)(5, 0).
  10. The cost of pro­duc­ing xx items is C(x)=x3−30x2+300x+100C(x) = x^3 - 30x^2 + 300x + 100 and each sells for ₹228228. Find the out­put that max­imises profit.
  11. A 4040 m fence encloses a rec­tan­gu­lar plot against a straight wall (the wall forms one side). Find the largest area.
  12. Find the local max­i­mum value of f(x)=xe−xf(x) = xe^{-x}.

Answers to check against

Show answers
  1. f′=3(x−3)(x+1)f' = 3(x - 3)(x + 1): local max f(−1)=9f(-1) = 9, local min f(3)=−23f(3) = -23; local min at x=2x = 2, value 44.
  2. f′=4x(x2−4)f' = 4x(x^2 - 4); val­ues f(−1)=−4f(-1) = -4, f(0)=3f(0) = 3, f(2)=−13f(2) = -13, f(3)=12f(3) = 12: max 1212, min −13-13.
  3. Max 11 at π4\displaystyle \tfrac{\pi}{4}, min −1-1 at 3π4\displaystyle \tfrac{3\pi}{4}.
  4. f′=3x2≥0f' = 3x^2 \ge 0, so it never changes sign.
  5. 1515 and 1515.
  6. 9×99 \times 9 cm.
  7. Area 2x25−x22x\sqrt{25 - x^2} is largest at x=52\displaystyle x = \tfrac{5}{\sqrt{2}}: 2525.
  8. h=32x2\displaystyle h = \tfrac{32}{x^2}, S=x2+128x\displaystyle S = x^2 + \tfrac{128}{x}; S′=0S' = 0 at x=4x = 4: base 4×44 \times 4 m, height 22 m.
  9. D2=(x−5)2+4xD^2 = (x - 5)^2 + 4x, least at x=3x = 3: points (3,±23)(3, \pm 2\sqrt{3}).
  10. P=228x−C=−x3+30x2−72x−100P = 228x - C = -x^3 + 30x^2 - 72x - 100; P′=−3(x2−20x+24)=0P' = -3(x^2 - 20x + 24) = 0 at x=10±219x = 10 \pm 2\sqrt{19}; max at x=10+219≈18.7x = 10 + 2\sqrt{19} \approx 18.7, so 1919 items, since P(19)=2503>P(18)=2492P(19) = 2503 > P(18) = 2492.
  11. Sides x,40−2xx, 40 - 2x: area x(40−2x)x(40 - 2x) largest at x=10x = 10: 200200 m².
  12. f′=e−x(1−x)f' = e^{-x}(1 - x): max at x=1x = 1, value 1e\displaystyle \tfrac{1}{e}.