Educerie

This whole subtopic is higher level. Nothing in it is on an SL paper.

Educerie · IB Diploma · Mathematics: analysis and approaches

IB Mathematics AA 5.14 · HL only

Implicit differentiation, related rates and optimisation

How do you differentiate a relationship you cannot solve for yy, how fast does one quantity change when another linked to it is changing, and where exactly is the best value of a model, including when it sits at the edge of what is allowed?

What you will learn

  • HL Understand implicit differentiation as differentiating an equation as it stands, with the chain rule on every term in y
  • HL Understand related rates as one equation differentiated with respect to time to link two rates
  • HL Know how to build an optimisation model from a description, using the chain rule or implicit differentiation
  • HL Know that the best value on an interval can lie at an end point, not only at a stationary point

You must be able to

  1. HL Find dy ÷ dx for an implicit curve and use it for the tangent or normal at a point
  2. HL Solve related rates problems with a linking equation, units and the correct sign
  3. HL Solve an optimisation problem in context and justify that the answer is a maximum or minimum
  4. HL Find the points where an implicit curve has a horizontal or vertical tangent
  5. HL Determine when the optimum is at an end point of the domain
  6. HL Find d²y ÷ dx² by implicit differentiation and use it to classify a stationary point

In the exam. most often on Paper 3 and Paper 2, less often on Paper 1. Paper 3: implicit differentiation and rates of change as steps inside a longer investigation, often a family of curves or a general result built up through "Show that" and "Hence" parts. Paper 2: related rates and optimisation in context, about 6 marks, with a GDC to solve the final equation. Paper 1 (no calculator): implicit differentiation for a gradient, tangent, normal or second derivative (3 to 5 marks a part), and related rates with exact answers such as 45π\tfrac{4}{5\pi}. "Find" and "Show that" are by far the commonest command terms here, so you must be able to reach a printed result as well as produce one.

1Implicit differentiation

Why not just solve for yy?

  • Take the circle x2+y2=25x^{2} + y^{2} = 25. Solving gives y=±25−x2y = \pm\sqrt{25 - x^{2}}: two functions, one for each half.
    • At x=3x = 3 there are two points, (3,4)(3, 4) and (3,−4)(3, -4). Their tangents have different gradients, so no single f(x)f(x) describes the whole curve.
  • For x3+y3=6xyx^{3} + y^{3} = 6xy, this course's algebra cannot solve for yy at all. We need a method that works on the equation itself.

The one habit

  • Differentiate every term with respect to xx. A term in xx behaves as usual. A term in yy is a function of a function, since yy depends on xx. So

ddx(g(y))=g′(y) dydx\dfrac{d}{dx}\big(g(y)\big) = g'(y)\,\dfrac{dy}{dx}.

  • In words: differentiate as though yy were the variable, then attach dydx\frac{dy}{dx}. A term mixing both, such as xyxy, also needs the product rule.
TermDerivative with respect to xxRule used
y3y^{3}3y2 dydx3y^{2}\,\frac{dy}{dx}chain rule
eye^{y}ey dydxe^{y}\,\frac{dy}{dx}chain rule
sin⁡y\sin ycos⁡y dydx\cos y\,\frac{dy}{dx}chain rule
ln⁡y\ln y1y dydx\frac{1}{y}\,\frac{dy}{dx}chain rule
xyxyy+x dydxy + x\,\frac{dy}{dx}product rule, then chain rule on yy
x2yx^{2}y2xy+x2 dydx2xy + x^{2}\,\frac{dy}{dx}product rule
xy2xy^{2}y2+2xy dydxy^{2} + 2xy\,\frac{dy}{dx}product rule, chain rule on y2y^{2}
a constant00

Gather every term containing dydx\frac{dy}{dx} on one side, factorise it out, and divide.

Worked example 1. Paper 1. Find dydx\frac{dy}{dx} for x2+y2=25x^{2} + y^{2} = 25, and the gradient at (3,4)(3, 4) and at (3,−4)(3, -4).

ddx(x2)+ddx(y2)=ddx(25)\frac{d}{dx}(x^{2}) + \frac{d}{dx}(y^{2}) = \frac{d}{dx}(25)2x+2y dydx=02x + 2y\,\frac{dy}{dx} = 0dydx=−xy\frac{dy}{dx} = -\frac{x}{y}at (3,4):dydx=−34\text{at } (3, 4):\quad \frac{dy}{dx} = -\frac{3}{4}at (3,−4):dydx=34\text{at } (3, -4):\quad \frac{dy}{dx} = \frac{3}{4}

The result has a yy in it. That is normal: a point on the curve needs both coordinates before you can read off a gradient. That is how one formula gives two gradients at x=3x = 3. Figure 1 draws both tangents.

Figure 1 · x² + y² = 25 and its tangents at x = 3 x y 3 −4 4 (3, 4) (3, −4) gradient −3/4 gradient 3/4 radius, gradient 4/3 dy/dx = −x/y uses both coordinates, so the upper and lower points get different gradients.
Figure 1 · One formula, dy ÷ dx = −x ÷ y, gives both tangents at x = 3

Check: the radius to (3,4)(3, 4) has gradient 43\frac{4}{3}, and −34-\frac{3}{4} is its negative reciprocal. So the tangent meets the radius at a right angle, as it must.

Worked example 2. Paper 1. The curve CC is given by x2y+xy2=12x^{2}y + xy^{2} = 12. Show that (1,3)(1, 3) lies on CC, and find the equation of the tangent at that point.

Both terms are products, so the product rule is used twice.

check: 12(3)+(1)(32)=3+9=12 ✓\text{check: } 1^{2}(3) + (1)(3^{2}) = 3 + 9 = 12 \ \checkmark2xy+x2 dydx+y2+2xy dydx=0product rule on each term2xy + x^{2}\,\frac{dy}{dx} + y^{2} + 2xy\,\frac{dy}{dx} = 0 \qquad \textcolor{#838c91}{\text{product rule on each term}}dydx(x2+2xy)=−(2xy+y2)gather the dydx terms\frac{dy}{dx}\left(x^{2} + 2xy\right) = -\left(2xy + y^{2}\right) \qquad \textcolor{#838c91}{\text{gather the }\frac{dy}{dx}\text{ terms}}dydx=−2xy+y2x2+2xy\frac{dy}{dx} = -\frac{2xy + y^{2}}{x^{2} + 2xy}at (1,3):dydx=−6+91+6=−157\text{at } (1, 3):\quad \frac{dy}{dx} = -\frac{6 + 9}{1 + 6} = -\frac{15}{7}tangent: y−3=−157(x−1), so y=36−15x7\text{tangent: } y - 3 = -\tfrac{15}{7}(x - 1), \ \text{so}\ y = \frac{36 - 15x}{7}

Worked example 3. Paper 1. The curve x3+y3=6xyx^{3} + y^{3} = 6xy passes through (3,3)(3, 3). Find the tangent and the normal there.

Figure 2 shows this curve. It has a loop and crosses itself at the origin, so no single y=f(x)y = f(x) covers it.

3x2+3y2 dydx=6y+6x dydxproduct rule on 6xy3x^{2} + 3y^{2}\,\frac{dy}{dx} = 6y + 6x\,\frac{dy}{dx} \qquad \textcolor{#838c91}{\text{product rule on }6xy}dydx(3y2−6x)=6y−3x2\frac{dy}{dx}\left(3y^{2} - 6x\right) = 6y - 3x^{2}dydx=2y−x2y2−2xdivide top and bottom by 3\frac{dy}{dx} = \frac{2y - x^{2}}{y^{2} - 2x} \qquad \textcolor{#838c91}{\text{divide top and bottom by 3}}at (3,3):dydx=6−99−6=−1\text{at } (3, 3):\quad \frac{dy}{dx} = \frac{6 - 9}{9 - 6} = -1tangent: y−3=−(x−3), so y=−x+6\text{tangent: } y - 3 = -(x - 3), \ \text{so}\ y = -x + 6normal: gradient 1, so y−3=x−3,y=x\text{normal: gradient } 1, \ \text{so}\ y - 3 = x - 3, \quad y = x
Figure 2 · x³ + y³ = 6xy x y −4 −2 2 4 6 −4 −2 2 4 6 (3, 3) tangent y = 6 − x normal y = x At (3, 3), dy/dx = −1. The normal y = x is also the curve's line of symmetry.
Figure 2 · The tangent and normal to x³ + y³ = 6xy at (3, 3)

The normal is the line y=xy = x, a line of symmetry of the curve. Swapping xx and yy leaves the equation unchanged, so the curve is its own mirror image in that line.

When only one coordinate is given

  • For "the tangent where x=3x = 3", substitute into the curve to find yy. Expect possibly more than one answer.
  • On the circle in example 1, x=3x = 3 gives y=4y = 4 or −4-4: two tangents (Figure 1). Find the gradient at each point separately.

Horizontal and vertical tangents

  • A tangent is horizontal where dydx=0\frac{dy}{dx} = 0. The numerator of your fraction is zero, with the denominator non-zero.
  • A tangent is vertical where the denominator is zero, with the numerator non-zero.
  • Each condition links xx and yy. Substitute it into the curve to find the points. Where numerator and denominator are both zero, the rule cannot decide, so confirm the other part is non-zero at every point you report.

Worked example 4. Paper 1. Find the points on x2−2xy+4y2=12x^{2} - 2xy + 4y^{2} = 12 where the tangent is horizontal, and where it is vertical.

2x−2y−2x dydx+8y dydx=02x - 2y - 2x\,\frac{dy}{dx} + 8y\,\frac{dy}{dx} = 0dydx=y−x4y−x\frac{dy}{dx} = \frac{y - x}{4y - x}horizontal: y−x=0, so y=x\text{horizontal: } y - x = 0, \ \text{so}\ y = xx2−2x2+4x2=12  ⇒  3x2=12  ⇒  x=±2substitute into the curvex^{2} - 2x^{2} + 4x^{2} = 12 \;\Rightarrow\; 3x^{2} = 12 \;\Rightarrow\; x = \pm 2 \qquad \textcolor{#838c91}{\text{substitute into the curve}}points (2,2) and (−2,−2); denominator 4y−x=3x≠0\text{points } (2, 2) \text{ and } (-2, -2); \ \text{denominator } 4y - x = 3x \ne 0vertical: 4y−x=0, so x=4y\text{vertical: } 4y - x = 0, \ \text{so}\ x = 4y16y2−8y2+4y2=12  ⇒  y=±116y^{2} - 8y^{2} + 4y^{2} = 12 \;\Rightarrow\; y = \pm 1points (4,1) and (−4,−1); numerator y−x=−3y≠0\text{points } (4, 1) \text{ and } (-4, -1); \ \text{numerator } y - x = -3y \ne 0

Second derivatives

  • To get d2ydx2\frac{d^{2}y}{dx^{2}}, differentiate the equation that still contains dydx\frac{dy}{dx} once more. This is usually easier than the quotient rule on the solved form.
  • Treat dydx\frac{dy}{dx} as a function of xx: a term y dydxy\,\frac{dy}{dx} needs the product rule, which creates (dydx)2\left(\frac{dy}{dx}\right)^{2}. Finish by substituting the earlier result for dydx\frac{dy}{dx}.

Worked example 5. Paper 1. For x2+y2=25x^{2} + y^{2} = 25, show that d2ydx2=−25y3\frac{d^{2}y}{dx^{2}} = -\frac{25}{y^{3}}, and state whether the curve is concave up or down at (3,4)(3, 4) and at (3,−4)(3, -4).

2x+2y dydx=0the first derivative, as in example 12x + 2y\,\frac{dy}{dx} = 0 \qquad \textcolor{#838c91}{\text{the first derivative, as in example 1}}2+2(dydx)2+2y d2ydx2=0differentiate again; product rule on y dydx2 + 2\left(\frac{dy}{dx}\right)^{2} + 2y\,\frac{d^{2}y}{dx^{2}} = 0 \qquad \textcolor{#838c91}{\text{differentiate again; product rule on }y\,\frac{dy}{dx}}d2ydx2=−1+(dydx)2y=−1+x2y2y=−x2+y2y3=−25y3use dydx=−xy\frac{d^{2}y}{dx^{2}} = -\frac{1 + \left(\frac{dy}{dx}\right)^{2}}{y} = -\frac{1 + \frac{x^{2}}{y^{2}}}{y} = -\frac{x^{2} + y^{2}}{y^{3}} = -\frac{25}{y^{3}} \qquad \textcolor{#838c91}{\text{use }\frac{dy}{dx} = -\frac{x}{y}}at (3,4):−2564<0, concave down\text{at } (3, 4):\quad -\frac{25}{64} < 0, \ \text{concave down}at (3,−4):+2564>0, concave up\text{at } (3, -4):\quad +\frac{25}{64} > 0, \ \text{concave up}

This agrees with Figure 1: the top half curves down, the bottom half up.

To classify a stationary point of an implicit curve, put dydx=0\frac{dy}{dx} = 0 into the second-derivative equation before solving for d2ydx2\frac{d^{2}y}{dx^{2}}. Most terms vanish and one remains (see Try it Q7).

In 5.15 the same method produces the derivatives of arcsin⁡x\arcsin x, arccos⁡x\arccos x, arctan⁡x\arctan x and axa^{x}.

2Related rates of change

In a related rates problem, several quantities vary with time and obey one equation. One rate is given and another is wanted, at one instant. You can link them in two ways:

  • A direct chain rule, when one quantity is written in terms of another: dAdt=dAdr×drdt\dfrac{dA}{dt} = \dfrac{dA}{dr}\times\dfrac{dr}{dt}.
  • A linking equation. When the quantities are tangled together, differentiate it with respect to tt, as in section 1 with tt replacing xx.

The method, in five steps.

  1. Draw the situation and give every changing quantity a letter. Keep the numbers for the special instant out of the diagram: they are true only for a moment.
  2. State the rate you are given and the rate you want, with units, as derivatives with respect to tt. A decreasing quantity has a negative rate.
  3. Find one equation joining the quantities. If it has an extra variable, remove it with something that stays true all the time: a fixed length, similar triangles, or right-angled trigonometry. Pythagoras handles sliding and rope problems.
  4. Differentiate with respect to tt.
  5. Only now put in the numbers for the instant, and solve for the wanted rate.

Worked example 6. Paper 1. A snowball melts so that its volume falls at 12 cm3 min−112\ \mathrm{cm^{3}\,min^{-1}}. It stays spherical. Find the rate at which its radius is changing, and the rate at which its surface area is changing, when the radius is 3 cm3\ \mathrm{cm}.

V=43πr3,dVdt=−12V = \tfrac{4}{3}\pi r^{3}, \qquad \frac{dV}{dt} = -12dVdt=4πr2 drdt  ⇒  −12=4π(9) drdt\frac{dV}{dt} = 4\pi r^{2}\,\frac{dr}{dt} \;\Rightarrow\; -12 = 4\pi(9)\,\frac{dr}{dt}drdt=−13π≈−0.106 cm min−1\frac{dr}{dt} = -\frac{1}{3\pi} \approx -0.106\ \mathrm{cm\,min^{-1}}S=4πr2,dSdt=8πr drdt=8π(3)(−13π)=−8S = 4\pi r^{2}, \qquad \frac{dS}{dt} = 8\pi r\,\frac{dr}{dt} = 8\pi(3)\left(-\frac{1}{3\pi}\right) = -8

The radius shrinks at about 0.106 cm min−10.106\ \mathrm{cm\,min^{-1}} and the surface area shrinks at 8 cm2 min−18\ \mathrm{cm^{2}\,min^{-1}}.

The second answer reuses the first: once drdt\frac{dr}{dt} is known, anything depending on rr follows by one more chain rule.

A steady rate for one quantity does not make the others steady. drdt\frac{dr}{dt} varies as 1r2\frac{1}{r^{2}}, so at r=1.5 cmr = 1.5\ \mathrm{cm} the same melting shrinks the radius four times as fast.

Worked example 7. Paper 1. A rectangular rubber sheet is stretched lengthways: its length xx grows at 1.5 cm s−11.5\ \mathrm{cm\,s^{-1}} while its width yy narrows at 0.5 cm s−10.5\ \mathrm{cm\,s^{-1}}. Find the rate of change of its area when x=18 cmx = 18\ \mathrm{cm} and y=5 cmy = 5\ \mathrm{cm}.

When two factors both move, the product rule gives one term per factor.

A=xy,dxdt=1.5,dydt=−0.5A = xy, \qquad \frac{dx}{dt} = 1.5, \quad \frac{dy}{dt} = -0.5dAdt=dxdt y+x dydtproduct rule, with respect to t\frac{dA}{dt} = \frac{dx}{dt}\,y + x\,\frac{dy}{dt} \qquad \textcolor{#838c91}{\text{product rule, with respect to }t}dAdt=(1.5)(5)+(18)(−0.5)=7.5−9=−1.5\frac{dA}{dt} = (1.5)(5) + (18)(-0.5) = 7.5 - 9 = -1.5

The area is falling at 1.5 cm2 s−11.5\ \mathrm{cm^{2}\,s^{-1}}, even though the length is growing. At that instant the narrowing removes more area than the stretching adds.

Worked example 8. Paper 1. A ladder 6.5 m6.5\ \mathrm{m} long leans against a vertical wall. The foot slides away from the wall at 0.3 m s−10.3\ \mathrm{m\,s^{-1}}. How fast is the top moving down the wall when the foot is 2.5 m2.5\ \mathrm{m} from the wall? Figure 3 sets it up.

Figure 3 · A 6.5 m ladder sliding down a wall 6.5 m x y dx/dt = 0.3 m/s dy/dt = ? x² + y² = 6.5² at every moment. At the instant asked about, x = 2.5 and y = 6.
Figure 3 · The ladder: x and y change, the 6.5 m does not
x2+y2=6.52=42.25Pythagoras; the ladder’s length never changesx^{2} + y^{2} = 6.5^{2} = 42.25 \qquad \textcolor{#838c91}{\text{Pythagoras; the ladder's length never changes}}2x dxdt+2y dydt=0differentiate with respect to t2x\,\frac{dx}{dt} + 2y\,\frac{dy}{dt} = 0 \qquad \textcolor{#838c91}{\text{differentiate with respect to }t}dydt=−xy dxdt\frac{dy}{dt} = -\frac{x}{y}\,\frac{dx}{dt}at the instant: x=2.5, so y=42.25−6.25=6;dxdt=0.3\text{at the instant: } x = 2.5, \text{ so } y = \sqrt{42.25 - 6.25} = 6; \quad \frac{dx}{dt} = 0.3dydt=−2.56(0.3)=−0.125\frac{dy}{dt} = -\frac{2.5}{6}(0.3) = -0.125

The top descends at 0.125 m s−10.125\ \mathrm{m\,s^{-1}}. The minus sign means yy is decreasing. In the final sentence give the speed and say "down". The algebra is that of example 1: the ladder's relation is a circle again.

Worked example 9. Paper 1. A conical tank has its vertex at the bottom, height 5 m5\ \mathrm{m} and top radius 2 m2\ \mathrm{m}. Water enters at 0.8 m30.8\ \mathrm{m^{3}} per minute.

Find the rate at which the depth is rising when the depth is 2.5 m2.5\ \mathrm{m}. Find also the rate at which the radius of the water surface is growing then.

The water forms a smaller cone with depth hh and surface radius rr, both changing (Figure 4). VV has two variables, so eliminate rr first.

Figure 4 · Water in a conical tank r h 5 m 2 m in at 0.8 m³/min The water is a small cone similar to the tank, so r/h = 2/5 at every depth: r = 2h/5.
Figure 4 · The water is a cone similar to the tank
rh=25, so r=2h5similar triangles, true at every moment\frac{r}{h} = \frac{2}{5}, \ \text{so}\ r = \frac{2h}{5} \qquad \textcolor{#838c91}{\text{similar triangles, true at every moment}}V=13πr2h=13π(2h5)2h=4πh375V = \tfrac{1}{3}\pi r^{2}h = \tfrac{1}{3}\pi\left(\frac{2h}{5}\right)^{2} h = \frac{4\pi h^{3}}{75}dVdt=4πh225 dhdtdifferentiate with respect to t\frac{dV}{dt} = \frac{4\pi h^{2}}{25}\,\frac{dh}{dt} \qquad \textcolor{#838c91}{\text{differentiate with respect to }t}0.8=(4π×6.2525)dhdt=π dhdtat h=2.5, dVdt=0.80.8 = \left(\frac{4\pi \times 6.25}{25}\right)\frac{dh}{dt} = \pi\,\frac{dh}{dt} \qquad \textcolor{#838c91}{\text{at }h = 2.5\text{, }\frac{dV}{dt} = 0.8}dhdt=0.8π=45π≈0.255 m per minute\frac{dh}{dt} = \frac{0.8}{\pi} = \frac{4}{5\pi} \approx 0.255\ \text{m per minute}drdt=25 dhdt=825π≈0.102 m per minute\frac{dr}{dt} = \frac{2}{5}\,\frac{dh}{dt} = \frac{8}{25\pi} \approx 0.102\ \text{m per minute}

Putting r=1r = 1 (its value at h=2.5h = 2.5) into VV before differentiating treats rr as fixed and gives the wrong equation. That is why step 5 comes last.

Worked example 10. Paper 1. A spotlight stands 80 m80\ \mathrm{m} from a long straight wall, level with the point O\mathrm{O} on the wall nearest to it. The beam turns at a steady 0.2 rad s−10.2\ \mathrm{rad\,s^{-1}}.

The spot of light on the wall is xx metres from O\mathrm{O}. The beam makes angle θ\theta with the line from the lamp to O\mathrm{O}. Find the speed of the spot when θ=π4\theta = \frac{\pi}{4}.

Right-angled trigonometry is the link. Use radians, so the derivative of tan⁡\tan holds.

x=80tan⁡θ,dθdt=0.2x = 80\tan\theta, \qquad \frac{d\theta}{dt} = 0.2dxdt=80sec⁡2θ dθdtchain rule; ddθ(tan⁡θ)=sec⁡2θ\frac{dx}{dt} = 80\sec^{2}\theta\,\frac{d\theta}{dt} \qquad \textcolor{#838c91}{\text{chain rule; }\frac{d}{d\theta}(\tan\theta) = \sec^{2}\theta}θ=π4:sec⁡2θ=2, so dxdt=80(2)(0.2)=32\theta = \frac{\pi}{4}:\quad \sec^{2}\theta = 2, \ \text{so}\ \frac{dx}{dt} = 80(2)(0.2) = 32

The spot moves at 32 m s−132\ \mathrm{m\,s^{-1}}. A steady turn gives a spot that speeds up as it moves away from O. At θ=0\theta = 0 the speed is only 16 m s−116\ \mathrm{m\,s^{-1}}.

When VV is given as a function of hh

  • If a question supplies V=f(h)V = f(h), the link already exists: dVdt=f′(h) dhdt\frac{dV}{dt} = f'(h)\,\frac{dh}{dt}, so dhdt=1f′(h)×dVdt\frac{dh}{dt} = \dfrac{1}{f'(h)}\times\dfrac{dV}{dt}.
  • The instant is often given as a volume, not a depth. Solve f(h)=f(h) = that volume first. Hold exact values (or three significant figures) to the end. Rounding too soon costs the last mark.

Worked example 11. Paper 2. Water runs into a flower vase at 6 cm3 s−16\ \mathrm{cm^{3}\,s^{-1}}. At depth h cmh\ \mathrm{cm} the volume is V=0.4h3−5h2+30h cm3V = 0.4h^{3} - 5h^{2} + 30h\ \mathrm{cm^{3}}, for 0≤h≤120 \le h \le 12. Find the rate at which the depth is increasing at the moment the vase holds 100 cm3100\ \mathrm{cm^{3}}.

0.4h3−5h2+30h=100  ⇒  h=6.880…GDC; the only real root0.4h^{3} - 5h^{2} + 30h = 100 \;\Rightarrow\; h = 6.880\ldots \qquad \textcolor{#838c91}{\text{GDC; the only real root}}dVdh=1.2h2−10h+30=18.00…at this h\frac{dV}{dh} = 1.2h^{2} - 10h + 30 = 18.00\ldots \quad\text{at this } hdVdt=dVdh×dhdt  ⇒  6=18.00 dhdt\frac{dV}{dt} = \frac{dV}{dh}\times\frac{dh}{dt} \;\Rightarrow\; 6 = 18.00\,\frac{dh}{dt}dhdt=0.333 cm s−1\frac{dh}{dt} = 0.333\ \mathrm{cm\,s^{-1}}

Typical slips: using 100100 as the depth in dVdh\frac{dV}{dh}, or putting h=100h = 100 into the formula. 100100 is a volume, so solve for the depth.

3Optimisation, including end points

At SL you found a greatest or least value by solving f′(x)=0f'(x) = 0 and checking the nature. HL adds two things the guide spells out:

  • The function is built from a description. Differentiating it may need the chain rule or implicit differentiation.
  • The domain has limits. The best value can lie at an end point, not at a stationary point.

The method.

  1. Name the quantity to optimise and the variable you will differentiate with respect to. Draw a figure if there is geometry.
  2. Use the constraint to remove other variables until one remains. Write down its domain.
  3. Differentiate and solve for the stationary points. Discard any outside the domain.
  4. Justify the nature (second derivative, or sign of the first derivative either side).
  5. Compare with the values at the end points. Then answer in context with units.

On a closed interval a≤x≤ba \le x \le b, the greatest and least values occur either at a stationary point inside the interval or at an end point. Evaluate them all.

Worked example 12. Paper 2. A power cable must run from a station AA on one bank of a straight river, 600 m600\ \mathrm{m} wide, to a factory BB on the other bank. The factory is 2000 m2000\ \mathrm{m} downstream of the point O\mathrm{O} directly across from AA.

Cable under water costs €50 per metre. Cable along the bank costs €30 per metre. The cable crosses to a point PP on the far bank, x mx\ \mathrm{m} from O\mathrm{O}, then follows the bank to BB (Figure 5). Find the xx that minimises the cost.

Figure 5 · Cable from A across the river to P, then along the bank to B A P B O 600 m x 2000 − x (bank, €30 per m) under water, €50 per m length √(600² + x²) O is directly opposite A. Choosing x trades expensive river cable for cheaper bank cable.
Figure 5 · The cable crosses to P, then follows the bank
C(x)=506002+x2+30(2000−x),0≤x≤2000C(x) = 50\sqrt{600^{2} + x^{2}} + 30(2000 - x), \qquad 0 \le x \le 2000C′(x)=50x360000+x2−30chain rule on the square rootC'(x) = \frac{50x}{\sqrt{360000 + x^{2}}} - 30 \qquad \textcolor{#838c91}{\text{chain rule on the square root}}C′(x)=0:50x=30360000+x2C'(x) = 0:\quad 50x = 30\sqrt{360000 + x^{2}}2500x2=900(360000+x2)square both sides (x≥0)2500x^{2} = 900\left(360000 + x^{2}\right) \qquad \textcolor{#838c91}{\text{square both sides (}x \ge 0\text{)}}1600x2=324000000,x2=202500,x=4501600x^{2} = 324000000, \quad x^{2} = 202500, \quad x = 450C(450)=50(750)+30(1550)=84000C(450) = 50(750) + 30(1550) = 84000end points: C(0)=90000,C(2000)≈104403\text{end points: } C(0) = 90000, \quad C(2000) \approx 104403

The cheapest cable costs €84,000, at x=450 mx = 450\ \mathrm{m}. The end-point values are larger, so 450450 wins over the whole interval. The sign of C′C' agrees: C′(0)=−30<0C'(0) = -30 < 0 and C′(2000)≈17.9>0C'(2000) \approx 17.9 > 0.

Now alter one fact: the factory is only 300 m300\ \mathrm{m} downstream. Then C(x)=506002+x2+30(300−x)C(x) = 50\sqrt{600^{2} + x^{2}} + 30(300 - x) on 0≤x≤3000 \le x \le 300.

The derivative has the same form and still vanishes only at x=450x = 450, outside the domain. On the interval C′(x)<0C'(x) < 0 throughout (C′(300)≈−7.6C'(300) \approx -7.6). So CC falls all the way, and the minimum is at the end point x=300x = 300: lay everything under water, straight to the factory.

C(300)=50450000≈33541all under waterC(300) = 50\sqrt{450000} \approx 33541 \qquad \textcolor{#838c91}{\text{all under water}}C(0)=30000+9000=39000straight across, then 300 m of bankC(0) = 30000 + 9000 = 39000 \qquad \textcolor{#838c91}{\text{straight across, then }300\ \mathrm{m}\text{ of bank}}

Figure 6 shows both cost curves. In the first, the minimum is the bottom of a valley. In the second, the valley lies beyond the right-hand edge, so the lowest allowed point is the edge.

Figure 6 · The cost C(x), in thousands of euros (a) B 2000 m downstream x (m) C (€ thousands) 450 1000 2000 84 90 100 min at x = 450 end point end point (b) B 300 m downstream x (m) C (€ thousands) 100 200 300 32 34 36 38 40 min at the end point x = 300 C decreasing all the way (a) The least cost is at a stationary point inside the domain. (b) The stationary point, x = 450, lies outside 0 ≤ x ≤ 300, so C keeps falling and the least cost is at the edge.
Figure 6 · The minimum at a stationary point, and at an end point

A stationary point outside the domain is not an answer. Writing 450450 and stopping would earn almost nothing in the second version.

Worked example 13. Paper 1. A cylinder is cut from a solid hemisphere of radius 3 cm3\ \mathrm{cm}. Its base lies on the flat face of the hemisphere and its axis passes through the centre of that face (Figure 7). Find the greatest possible volume of the cylinder.

Figure 7 · Cross-section of a cylinder inside a hemisphere 3 r h cylinder hemisphere, radius 3 The cylinder has radius r and height h. The amber triangle gives r² + h² = 9.
Figure 7 · A cylinder inside a hemisphere of radius 3

Let the cylinder have radius rr and height hh. The top rim touches the curved surface, so the right-angled triangle in the cross-section ties them together.

r2+h2=9, so r2=9−h2Pythagoras in the cross-sectionr^{2} + h^{2} = 9, \ \text{so}\ r^{2} = 9 - h^{2} \qquad \textcolor{#838c91}{\text{Pythagoras in the cross-section}}V=πr2h=π(9−h2)h=π(9h−h3),0<h<3V = \pi r^{2} h = \pi\left(9 - h^{2}\right)h = \pi\left(9h - h^{3}\right), \qquad 0 < h < 3dVdh=π(9−3h2)=0  ⇒  h2=3,h=3\frac{dV}{dh} = \pi\left(9 - 3h^{2}\right) = 0 \;\Rightarrow\; h^{2} = 3, \quad h = \sqrt{3}d2Vdh2=−6πh<0 at h=3, so a maximum\frac{d^{2}V}{dh^{2}} = -6\pi h < 0 \ \text{at}\ h = \sqrt{3}, \ \text{so a maximum}r2=9−3=6r^{2} = 9 - 3 = 6V=π×6×3=63 π≈32.6 cm3V = \pi \times 6 \times \sqrt{3} = 6\sqrt{3}\,\pi \approx 32.6\ \mathrm{cm^{3}}

The guide names "appropriate use of the chain rule or implicit differentiation". The implicit route reaches the same answer without solving the constraint for r2r^{2}. Keep rr and hh, and differentiate the constraint and the volume with respect to hh.

2r drdh+2h=0  ⇒  drdh=−hrdifferentiate r2+h2=9 implicitly2r\,\frac{dr}{dh} + 2h = 0 \;\Rightarrow\; \frac{dr}{dh} = -\frac{h}{r} \qquad \textcolor{#838c91}{\text{differentiate }r^{2} + h^{2} = 9\text{ implicitly}}dVdh=π(2rh drdh+r2)=π(r2−2h2)product rule on V=πr2h\frac{dV}{dh} = \pi\left(2rh\,\frac{dr}{dh} + r^{2}\right) = \pi\left(r^{2} - 2h^{2}\right) \qquad \textcolor{#838c91}{\text{product rule on }V = \pi r^{2}h}dVdh=0  ⇒  r2=2h2\frac{dV}{dh} = 0 \;\Rightarrow\; r^{2} = 2h^{2}2h2+h2=9  ⇒  h=3,r2=6back into the constraint: the same cylinder2h^{2} + h^{2} = 9 \;\Rightarrow\; h = \sqrt{3}, \quad r^{2} = 6 \qquad \textcolor{#838c91}{\text{back into the constraint: the same cylinder}}

Substituting first is shorter here. The implicit route earns its place when the constraint cannot easily be solved for one variable.

At either end of 0<h<30 < h < 3, the cylinder is a flat disc or a thin needle and V→0V \to 0. So the single stationary point must be the maximum.

For a whole sphere of radius 3 the same steps give h=23h = 2\sqrt{3} and V=123 πV = 12\sqrt{3}\,\pi. By symmetry, that is the hemisphere answer doubled.

Worked example 14. Paper 1. A farmer encloses a rectangular pen against a straight barn wall. She uses 120 m120\ \mathrm{m} of fence for three sections perpendicular to the wall (two ends and a divider) and one section parallel to it. Let each perpendicular section be x mx\ \mathrm{m}.

(a) Find the greatest area.

(b) The wall is only 45 m45\ \mathrm{m} long, so the side of the pen along it is at most 45 m45\ \mathrm{m}. Find the greatest area now.

parallel side y=120−3x,A(x)=x(120−3x)=120x−3x2,0<x<40\text{parallel side } y = 120 - 3x, \qquad A(x) = x(120 - 3x) = 120x - 3x^{2}, \quad 0 < x < 40A′(x)=120−6x=0  ⇒  x=20,y=60,A=1200(a); A′′=−6<0A'(x) = 120 - 6x = 0 \;\Rightarrow\; x = 20, \quad y = 60, \quad A = 1200 \qquad \textcolor{#838c91}{\text{(a); }A'' = -6 < 0}y≤45  ⇒  120−3x≤45  ⇒  x≥25,domain 25≤x<40(b)y \le 45 \;\Rightarrow\; 120 - 3x \le 45 \;\Rightarrow\; x \ge 25, \quad\text{domain } 25 \le x < 40 \qquad \textcolor{#838c91}{\text{(b)}}A′(x)=120−6x<0 for x≥25  ⇒  A is decreasingA'(x) = 120 - 6x < 0 \ \text{for}\ x \ge 25 \;\Rightarrow\; A \text{ is decreasing}A(25)=25(45)=1125A(25) = 25(45) = 1125

In (a) the best pen has area 1200 m21200\ \mathrm{m^{2}}. In (b) the old optimum x=20x = 20 is no longer allowed. The best allowed value is the end point x=25x = 25, where the pen uses the whole wall and has area 1125 m21125\ \mathrm{m^{2}}.

Worked example 15. Paper 1. Find the point on the curve y=x2y = x^{2} that is closest to A(3,0)A(3, 0), and the shortest distance.

For a point (x,x2)(x, x^{2}), the distance is D=(x−3)2+x4D = \sqrt{(x - 3)^{2} + x^{4}}. The square root is awkward, but D>0D > 0, so DD is least exactly where D2D^{2} is least. By the chain rule, dDdx=12D×d(D2)dx\frac{dD}{dx} = \frac{1}{2D}\times\frac{d(D^{2})}{dx}, so the two derivatives vanish together. Minimise D2D^{2}.

D2=(x−3)2+x4D^{2} = (x - 3)^{2} + x^{4}d(D2)dx=2(x−3)+4x3=2(2x3+x−3)=2(x−1)(2x2+2x+3)x=1 is a root, so x−1 is a factor\frac{d(D^{2})}{dx} = 2(x - 3) + 4x^{3} = 2\left(2x^{3} + x - 3\right) = 2(x - 1)\left(2x^{2} + 2x + 3\right) \qquad \textcolor{#838c91}{x = 1\text{ is a root, so }x - 1\text{ is a factor}}2x2+2x+3=0 has discriminant 4−24<0, so x=1 is the only stationary point2x^{2} + 2x + 3 = 0 \ \text{has discriminant } 4 - 24 < 0, \ \text{so } x = 1 \text{ is the only stationary point}d2(D2)dx2=2+12x2>0, so a minimum\frac{d^{2}(D^{2})}{dx^{2}} = 2 + 12x^{2} > 0, \ \text{so a minimum}D2=(1−3)2+1=5,D=5≈2.24D^{2} = (1 - 3)^{2} + 1 = 5, \quad D = \sqrt{5} \approx 2.24

The closest point is (1,1)(1, 1), at distance 5\sqrt{5}. Here xx can be any real number and D2→∞D^{2} \to \infty as x→±∞x \to \pm\infty, so the single minimum is the least value overall. On a restricted arc, compare with the ends as in examples 12 and 14.

Check: AA to (1,1)(1, 1) has gradient −12-\frac{1}{2} and the tangent there has gradient 22. They are perpendicular, as the shortest route to a smooth curve must be.

Practice questions

30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.