5.14 · AHL · HL onlyPaper 1Paper 2Paper 3

Implicit differentiation, related rates and optimisation

In a minute

Some equations, such as x2+xy+y2=12x^{2} + xy + y^{2} = 12, don't give yy as a function of xx. finds their gradient anyway: differentiate both sides, using the chain rule on every yy term. The same chain rule links over time and solves harder optimisation problems.

You'll be able to

  • Differentiate an equation in xx and yy implicitly, and use the gradient to find tangents.
  • Link rates of change over time with the chain rule, with the right signs and units.
  • Optimise a quantity using the chain rule or implicit differentiation.
  • Check the end points of the allowed interval, because the best value can lie there.
Before you start3 quick questions on what this builds on
Check yourself
Differentiate (3x2+1)5\left(3x^{2} + 1\right)^{5} with respect to xx.
Check yourself
Differentiate x2sin⁡xx^{2}\sin x with respect to xx.
Check yourself
Find the xx-coordinates of the stationary points of f(x)=x3−6x2+9x+4f(x) = x^{3} - 6x^{2} + 9x + 4.

Revise first: 5.6 Differentiation rules and standard functions and 5.8 Extrema, inflexion and optimisation

Implicit differentiation

In y=x3−2xy = x^{3} - 2x, yy is given directly in terms of xx. The curve x2+4y2=20x^{2} + 4y^{2} = 20 is different. It is an : xx and yy are mixed together, and making yy the subject is messy or impossible.

You can still find dydx\dfrac{\mathrm{d}y}{\mathrm{d}x} by . Think of yy as an unknown function of xx, and differentiate every term with respect to xx.

Terms in xx alone differentiate as usual. A term such as y2y^{2} is a of xx, so it needs the from the formula booklet:

In the formula booklet
y=g(u), where u=f(x)⇒dydx=dydu×dudxy = g(u), \text{ where } u = f(x) \Rightarrow \dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{\mathrm{d}y}{\mathrm{d}u} \times \dfrac{\mathrm{d}u}{\mathrm{d}x}
Learn this
ddx(yn)=nyn−1dydx,ddx(sin⁡y)=cos⁡y dydx\frac{\mathrm{d}}{\mathrm{d}x}\left(y^{n}\right) = ny^{n-1}\frac{\mathrm{d}y}{\mathrm{d}x}, \qquad \frac{\mathrm{d}}{\mathrm{d}x}\left(\sin y\right) = \cos y\,\frac{\mathrm{d}y}{\mathrm{d}x}

A term such as xyxy or x2yx^{2}y is a product of a function of xx and a function of yy. Use the , and keep the dydx\frac{\mathrm{d}y}{\mathrm{d}x} on the yy part: ddx(xy)=y+xdydx\dfrac{\mathrm{d}}{\mathrm{d}x}(xy) = y + x\dfrac{\mathrm{d}y}{\mathrm{d}x}.

1. Differentiate every term on both sides with respect to xx. A constant gives 00.

2. Move the terms containing dydx\frac{\mathrm{d}y}{\mathrm{d}x} to one side and everything else to the other.

3. Factorise out dydx\frac{\mathrm{d}y}{\mathrm{d}x} and divide.

Your answer will usually contain both xx and yy. That is expected: one xx-value can belong to several points of the curve.

Worked exampleThe curve CC has equation x2+4y2=20x^{2} + 4y^{2} = 20. (a) Find dydx\dfrac{\mathrm{d}y}{\mathrm{d}x} in terms of xx and yy. (b) Find the gradient of CC at the point (2,2)(2, 2).

Try it first, then reveal one step at a time.

  1. (a) Differentiate each term with respect to xx. The 4y24y^{2} term needs the chain rule, and the constant 2020 gives 00: 2x+8ydydx=02x + 8y\dfrac{\mathrm{d}y}{\mathrm{d}x} = 0.
Check yourself
Find dydx\frac{\mathrm{d}y}{\mathrm{d}x} for the curve y3+3y=x2+4xy^{3} + 3y = x^{2} + 4x.

To find a or normal at a point, find dydx\dfrac{\mathrm{d}y}{\mathrm{d}x} implicitly and substitute the point's xx and yy. Then use y−y1=m(x−x1)y - y_{1} = m(x - x_{1}), as in 5.4.

Worked exampleA curve has equation x2y+y3=2x+8x^{2}y + y^{3} = 2x + 8. (a) Show that the point (1,2)(1, 2) lies on the curve. (b) Find dydx\dfrac{\mathrm{d}y}{\mathrm{d}x} in terms of xx and yy. (c) Find the equation of the tangent to the curve at (1,2)(1, 2), in the form ax+by=cax + by = c where a,b,c∈Za, b, c \in \mathbb{Z}.

Try it first, then reveal one step at a time.

  1. (a) Substitute x=1x = 1, y=2y = 2. The left side is 12(2)+23=101^{2}(2) + 2^{3} = 10, and the right side is 2(1)+8=102(1) + 8 = 10. They agree.
Check yourself
The point (4,1)(4, 1) lies on the curve x2−3xy+y3=5x^{2} - 3xy + y^{3} = 5. Find the gradient there. Give your answer to 3 s.f.

Related rates of change

Pump air into a balloon and its volume and radius both grow with time. Their rates are linked: at a steady flow of air, the radius grows fast at first, then more slowly.

A problem that links two rates like this is a problem. The connects the rates. If VV depends on rr, and rr depends on time tt:

Learn this
dVdt=dVdr×drdt\frac{\mathrm{d}V}{\mathrm{d}t} = \frac{\mathrm{d}V}{\mathrm{d}r} \times \frac{\mathrm{d}r}{\mathrm{d}t}

A rate such as drdt\dfrac{\mathrm{d}r}{\mathrm{d}t} is positive when the quantity increases and negative when it decreases. Its units are per unit of time, such as cm s−1\text{cm s}^{-1} for drdt\frac{\mathrm{d}r}{\mathrm{d}t} or cm3 s−1\text{cm}^{3}\text{ s}^{-1} for dVdt\frac{\mathrm{d}V}{\mathrm{d}t}.

1. Name the variables. Write down each rate you know, with its sign, and the rate you want.

2. Write an equation linking the variables. It must be true at every moment, not just at the instant in the question.

3. Differentiate with respect to tt. Use the chain rule, or implicit differentiation when several variables change.

4. Only now substitute the values at the instant. Solve for the rate you want, and give its units.

Worked exampleA spherical balloon is inflated so that its volume increases at a constant 100 cm3 s−1100\text{ cm}^{3}\text{ s}^{-1}. Find the exact rate at which its radius is increasing when the radius is 55 cm.

Try it first, then reveal one step at a time.

  1. Let the radius be rr cm and the volume V cm3V\text{ cm}^{3} at time tt seconds. You know dVdt=100\dfrac{\mathrm{d}V}{\mathrm{d}t} = 100 and want drdt\dfrac{\mathrm{d}r}{\mathrm{d}t}.
Check yourself
An ice cube melts so that its volume falls by 24 cm324\text{ cm}^{3} each minute. It stays a cube, with edge xx cm. Find dxdt\frac{\mathrm{d}x}{\mathrm{d}t}, in cm per minute, when x=2x = 2.

When two lengths change together, link them with one equation, then differentiate it implicitly with respect to tt.

Worked exampleA ladder 1313 m long leans against a vertical wall, with its foot on horizontal ground. The foot slides away from the wall at 0.5 m s−10.5\text{ m s}^{-1}. Let xx m be the distance from the foot to the wall, and yy m the height of the top of the ladder. Find dydt\dfrac{\mathrm{d}y}{\mathrm{d}t} when x=5x = 5, and interpret its sign.

Try it first, then reveal one step at a time.

  1. You know dxdt=0.5\dfrac{\mathrm{d}x}{\mathrm{d}t} = 0.5, positive because xx is increasing. You want dydt\dfrac{\mathrm{d}y}{\mathrm{d}t}.
Check yourself
Car A drives north away from a junction at 15 m s−115\text{ m s}^{-1}. Car B drives east away from the same junction at 20 m s−120\text{ m s}^{-1}. When A is 8080 m and B is 6060 m from the junction, find the rate, in m s−1\text{m s}^{-1}, at which the distance between the cars is increasing.

On Paper 2 the instant may be given by a volume, not by the variable you differentiate with. Find that variable first, with your GDC if needed.

Cone-shaped tank, vertex down, 25 cm tall with top radius 10 cm, holding water of depth h with surface radius r 10 25 h r water
The water is a smaller cone, similar to the tank, so rh=1025\frac{r}{h} = \frac{10}{25}.
Worked exampleA tank is a cone with its vertex at the bottom. It is 2525 cm tall and the radius of its top is 1010 cm. Water flows in at 15 cm3 s−115\text{ cm}^{3}\text{ s}^{-1}. When the depth of water is hh cm, the water surface has radius rr cm. (a) Show that the volume of water is V=4π75h3V = \dfrac{4\pi}{75}h^{3}. (b) Find the rate at which the depth is increasing when the tank holds 300 cm3300\text{ cm}^{3} of water. Give your answer to 3 s.f.

Try it first, then reveal one step at a time.

  1. (a) The water forms a smaller cone, similar to the tank. So rh=1025\dfrac{r}{h} = \dfrac{10}{25}, which gives r=25hr = \tfrac{2}{5}h.

Optimisation with the chain rule and end points

In 5.8 you optimised by writing a quantity in one variable and setting its derivative to zero. HL problems add two things.

First, the quantity is often a , such as a distance with a square root in it. Differentiate it with the .

Second, the variable usually has an allowed interval, such as 0≤x≤30 \le x \le 3. The largest or smallest value can then sit at an end point, where f′(x)f'(x) need not be zero.

Worked exampleFind the exact shortest distance from the point A(4,0)A(4, 0) to the curve y=xy = \sqrt{x}.

Try it first, then reveal one step at a time.

  1. A general point on the curve is P(x,x)P\left(x, \sqrt{x}\right), with x≥0x \ge 0. By Pythagoras, AP=D=(x−4)2+(x)2=x2−7x+16AP = D = \sqrt{(x - 4)^{2} + \left(\sqrt{x}\right)^{2}} = \sqrt{x^{2} - 7x + 16}.

A shortcut: D≥0D \ge 0, so DD is smallest exactly where D2D^{2} is smallest. Minimising D2=x2−7x+16D^{2} = x^{2} - 7x + 16 avoids the square root. Take the root at the end.

Check yourself
Find the shortest distance from the point (0,3)(0, 3) to the curve y=x2y = x^{2}. Give your answer to 3 s.f.
Boat B 3 km from P on a straight shore; house H 3 km along the shore from P; landing point Q is x km from P B P Q H 3 x 3 − x shore row walk
Row from BB to QQ, then walk from QQ to HH.
Worked exampleMia is in a boat at BB, 33 km from the nearest point PP on a straight shore. Her house HH is on the shore, 33 km from PP. She rows at 4 km h−14\text{ km h}^{-1} to a point QQ on the shore between PP and HH, then walks to HH at 5 km h−15\text{ km h}^{-1}. Let PQ=xPQ = x km, where 0≤x≤30 \le x \le 3. (a) Show that her total time, in hours, is T(x)=9+x24+3−x5T(x) = \dfrac{\sqrt{9 + x^{2}}}{4} + \dfrac{3 - x}{5}. (b) Find the value of xx that minimises TT, and the minimum time.

Try it first, then reveal one step at a time.

  1. (a) By Pythagoras, BQ=9+x2BQ = \sqrt{9 + x^{2}} km, rowed at 4 km h−14\text{ km h}^{-1}. Then QH=3−xQH = 3 - x km, walked at 5 km h−15\text{ km h}^{-1}. Time is distance divided by speed, which gives T(x)T(x).
Check yourself
Let g(x)=x2−6x+13g(x) = \sqrt{x^{2} - 6x + 13} for 0≤x≤50 \le x \le 5. Find the greatest value of g(x)g(x).

Optimisation with implicit differentiation

The highest and lowest points of an implicit curve are where the tangent is horizontal, so finds them.

1. Differentiate implicitly and write dydx\dfrac{\mathrm{d}y}{\mathrm{d}x} as a fraction.

2. Set the numerator equal to zero. This gives a simple link between xx and yy.

3. Substitute it into the curve's equation to find the points. Check the denominator is not zero there.

Worked exampleThe curve x2+xy+y2=12x^{2} + xy + y^{2} = 12 is a closed loop. Find the coordinates of its highest point.

Try it first, then reveal one step at a time.

  1. Differentiate implicitly, with the product rule on xyxy: 2x+y+xdydx+2ydydx=02x + y + x\dfrac{\mathrm{d}y}{\mathrm{d}x} + 2y\dfrac{\mathrm{d}y}{\mathrm{d}x} = 0.
Check yourself
The curve x2−2xy+3y2=18x^{2} - 2xy + 3y^{2} = 18 is a closed loop. Find the greatest value of yy on the curve.

Implicit differentiation also handles a constraint. Instead of making one variable the subject, differentiate the constraint implicitly and use dydx\frac{\mathrm{d}y}{\mathrm{d}x} directly.

Worked exampleA rectangle has its sides parallel to the axes and its four corners on the ellipse x2+4y2=32x^{2} + 4y^{2} = 32. Its corner in the first quadrant is (x,y)(x, y), where 0≤x≤320 \le x \le \sqrt{32}. Find the maximum area of the rectangle.

Try it first, then reveal one step at a time.

  1. The rectangle is 2x2x wide and 2y2y tall, so its area is A=4xyA = 4xy.

You could instead write y=1232−x2y = \tfrac{1}{2}\sqrt{32 - x^{2}} and use the chain rule. Either method is valid.

Common mistakes

  • Forgetting the product rule on a term such as 3xy3xy. It differentiates to 3y+3xdydx3y + 3x\frac{\mathrm{d}y}{\mathrm{d}x}, not just 3dydx3\frac{\mathrm{d}y}{\mathrm{d}x}.
  • Leaving out the dydx\frac{\mathrm{d}y}{\mathrm{d}x} on a yy term, or keeping a constant. 5y5y differentiates to 5dydx5\frac{\mathrm{d}y}{\mathrm{d}x}, and a constant differentiates to 00.
  • Giving a falling quantity a positive rate. If a volume drops by 6 cm36\text{ cm}^{3} every second, write dVdt=−6\frac{\mathrm{d}V}{\mathrm{d}t} = -6.
  • Multiplying when you should divide. From dydt=dydx×dxdt\frac{\mathrm{d}y}{\mathrm{d}t} = \frac{\mathrm{d}y}{\mathrm{d}x} \times \frac{\mathrm{d}x}{\mathrm{d}t}, the rate dxdt\frac{\mathrm{d}x}{\mathrm{d}t} is dydt\frac{\mathrm{d}y}{\mathrm{d}t} divided by dydx\frac{\mathrm{d}y}{\mathrm{d}x}. Write the chain rule line before you put numbers in.
  • Putting a given volume in place of the height. If the instant is "when V=300V = 300", solve for hh first, then substitute hh.
  • Answering "how fast" with a negative number. The sign shows the direction of change; a speed is the size of the rate, so it is positive.

Exam tips

  • "Find dydx\frac{\mathrm{d}y}{\mathrm{d}x} in terms of xx and yy" means leave both letters in your answer. Do not try to make yy the subject first.
  • In a related rates question, write the chain rule line with every rate named, such as dhdt=dhdV×dVdt\frac{\mathrm{d}h}{\mathrm{d}t} = \frac{\mathrm{d}h}{\mathrm{d}V} \times \frac{\mathrm{d}V}{\mathrm{d}t}. That line usually earns the method mark, even if a later number slips.
  • On Paper 2, write down the equation you solve on your GDC and store the full value. Round only the final answer to 3 s.f., and give its units.
  • "Justify" a maximum or minimum with a reason in words: a sign change of the derivative, the second derivative, or a comparison with the end points.

Key takeaways

In booklety=g(u), where u=f(x)⇒dydx=dydu×dudxy = g(u), \text{ where } u = f(x) \Rightarrow \dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{\mathrm{d}y}{\mathrm{d}u} \times \dfrac{\mathrm{d}u}{\mathrm{d}x}
Learn thisddx(yn)=nyn−1dydx,ddx(sin⁡y)=cos⁡y dydx\frac{\mathrm{d}}{\mathrm{d}x}\left(y^{n}\right) = ny^{n-1}\frac{\mathrm{d}y}{\mathrm{d}x}, \qquad \frac{\mathrm{d}}{\mathrm{d}x}\left(\sin y\right) = \cos y\,\frac{\mathrm{d}y}{\mathrm{d}x}
Learn thisdVdt=dVdr×drdt\frac{\mathrm{d}V}{\mathrm{d}t} = \frac{\mathrm{d}V}{\mathrm{d}r} \times \frac{\mathrm{d}r}{\mathrm{d}t}
Learn thisImplicit differentiation: differentiate a yy term with respect to yy, then multiply by dydx\frac{\mathrm{d}y}{\mathrm{d}x}. Use the product rule on terms like xyxy.
Learn thisRelated rates: link the quantities with an equation true at all times, differentiate with respect to tt, then substitute the instant values.
Learn thisA decreasing quantity has a negative rate of change. A speed is the size of a rate, so it is positive.
Learn thisOn a closed interval, compare the values at the stationary points and at both end points.
Learn thisHighest or lowest point of an implicit curve: set the numerator of dydx\frac{\mathrm{d}y}{\mathrm{d}x} to zero.

Practise this

9 past-paper questions on 5.14 in the AA HL bank, each with a mark scheme and a worked explanation.

Practise 5.14 →