Differentiate equations in x and y implicitly to find gradients, tangents and normals, solve related rates problems with the chain rule, and tackle harder optimisation problems with constraints.
IB Mathematics: Analysis and Approaches
Part of 5 Calculus
HL only
Key terms introduced here
Each is in the Maths AA glossary, with every other term in the subject.
Rates of change of two or more quantities that are linked by an equation, usually all with respect to time t. One rate is found from another with the chain rule, for example dtdV=drdV×dtdr.
Notes on 5.14 Implicit differentiation and related rates
28 min readLast reviewed
Not every curve is the graph of a single function y=f(x). A circle, an ellipse or the curve x2+xy+y2=7
The same idea, that the chain rule links the rates of change of connected quantities, solves problems about things that change over time. When water pours into a conical tank at a known rate, the depth rises at a rate that depends on how full the tank is; when a ladder slides down a wall, the speeds of its top and its foot are tied together by Pythagoras' theorem. These related rates problems, together with harder optimisation problems, are among the most direct applications of differential calculus to the physical world.
Explicit and implicit equations
An equation such as y=x3−2x gives y explicitly: it is written in the form y=f(x). An implicit equation connects
x2+y2=25,x2+xy+y2=7,x3+y3=6xy,exy=x+y
The first can be solved for y, but it gives two functions, y=25−x2
Implicit differentiation
Differentiating terms in y
The key idea of implicit differentiation is to treat y as an unknown function of x and differentiate every term with respect to x. A term in x alone is differentiated as usual. A term in y needs the chain rule, because y depends on x
dxd(y2)=dyd(y2)×dxdy=2ydxdy
In general, for any differentiable function g,
dxd(g(y))=g′(y)dxdy
Differentiate with respect to y as if y were the variable, then multiply by dxdy.
Term
Derivative with respect to x
Rule used
y3
3y2dxdy
The method
Differentiate every term on both sides of the equation with respect to x.
Collect all the terms containing dxdy on one side and everything else on the other.
Factorise out dxdy
The result usually contains both x and y. This is natural: a single value of x can correspond to several points on the curve, and the gradient is different at each of them.
The answer dxdy=−yx agrees with explicit differentiation. For the upper half, y=(25−x2)21
Tangents and normals to implicit curves
Once the gradient at a point is known, the tangent and the normal are found exactly as for explicit curves in 5.4: the tangent has gradient m, and the normal has gradient −m1.
The next example uses the curve x2+xy+y2=7, a tilted ellipse. Its equation can be solved for y with the quadratic formula, which allows its graph to be drawn as two halves, but implicit differentiation is far quicker for finding gradients.
Horizontal and vertical tangents
When dxdy=DN, the tangent is horizontal where N=0
Curves involving exponential and trigonometric terms
The method is the same for any differentiable terms. Products such as x2y and composites such as exy simply need the product rule and the chain rule together.
Second derivatives by implicit differentiation
The second derivative of an implicitly defined curve is found by differentiating the expression for dxdy again with respect to x, remembering that y is still a function of x
YouTube
3Blue1Brown, Essence of calculus chapter 6. Watch how each side of x² + y² = 25 changes under a tiny step along the circle, which is what the "dy/dx" terms in implicit differentiation record.
Related rates of change
Rates linked by the chain rule
Many quantities change with time. If the radius r of a circular ripple grows with time t, then its area A=πr2 also changes with time, and the two rates of change are connected. By the chain rule,
dtdA=drdA×dtdr=2πrdtdr
Problems of this kind are called related rates of change: one rate is known, an equation links the quantities, and the chain rule gives the unknown rate.
A positive rate means the quantity is increasing; a negative rate means it is decreasing. A quantity that is "decreasing at 3 cm per second" has rate −3 cm s−1, and the sign must be carried through the calculation.
A strategy for related rates problems
Draw a diagram and label the quantities that change with variables, and fixed quantities with numbers.
Write down the rate that is given and the rate that is asked for, using dtd notation (for example, dtdV=100
An expanding balloon
Although the volume grows at a constant rate, the radius grows more and more slowly as the balloon gets bigger, because dtdr=4πr2100
A sliding ladder
When a ladder slides down a wall, its length stays fixed while the distances x (foot to wall) and y (top to ground) change. Pythagoras' theorem links them at every instant.
The length 5 m is fixed, while x, y and θ all change with time. At every instant x² + y² = 25.
The formula dtdy=−yxdtdx
Filling a conical tank
Volume problems often involve three variables, such as the volume, depth and surface radius of water in a container. A geometrical fact about the container, usually similar triangles, links two of them so that one can be eliminated before differentiating.
The water forms a smaller cone similar to the tank, so its radius and depth are always in the ratio 3 : 6, giving r = h/2.
The depth rises quickly when the tank is nearly empty and slowly when it is nearly full, because the water surface is small near the vertex and large near the top. This is the same effect, described with rates, as the shape of the depth–time graph for a cone in 2.3.
A moving shadow
Optimisation problems with constraints
The method of optimisation from 5.8 is unchanged: express the quantity to be maximised or minimised as a function of one variable, differentiate, and solve dxdQ=0, then confirm the nature of the stationary point. Harder problems differ in two ways. The quantity may depend on several variables linked by a constraint, which must be used to eliminate all but one; and the function to optimise may be awkward, such as a distance involving a square root.
Minimising a distance
The distance from a fixed point (a,b) to a point (x,y) on a curve is D=(x−a)2+(y−b)2
Maximising a volume with a constraint
Using implicit differentiation in optimisation
When the constraint is an implicit equation, it can be differentiated implicitly instead of being solved for one variable. This often keeps the algebra short and symmetric.
Minimising a journey time
When a journey crosses two regions with different speeds, the quickest route is not a straight line. The time for each part is distance divided by speed, and the total time is minimised.
Exam-style questions on implicit differentiation and related rates
Self-check
To do:
I can differentiate terms such as y3, xy, exy and siny
Questions on 5.14
26 exam-style questions on this subtopic, written in the style of the IB papers. The first has its markscheme open. Counted on
Question 1 · AA-0037516 marks
A painting hangs on a vertical wall. The bottom edge of the painting is 1.2 m above the eye level of a visitor and the top edge is 3.0 m above the eye level of the visitor. The visitor stands on level ground at a horizontal distance of x metres from the wall, where x>0.
The angle subtended at the visitor's eye by the painting is θ radians.
(a)
Show that θ=arctan(x3)−arctan(x1.2).
[2]2 marks
Markscheme (a)
the angle of elevation of the top edge is arctan(x3)A1
the angle of elevation of the bottom edge is arctan(x1.2)
(b)
Find the maximum value of θ and the value of x at which it occurs.
[3]3 marks
Markscheme (b)
attempt to find the maximum point on the graph of θ against x(M1)
x=1.90
(c)(i)
Find dxdθ.
[2]2 marks
Markscheme (c)(i)
attempt to use the chain rule on arctan(xk)
(c)(ii)
Hence show that the maximum value of θ occurs when x=3.6.
[3]3 marks
Markscheme (c)(ii)
setting their dxdθ=0
(d)
The visitor walks directly towards the wall at a constant speed of 0.5 m s−1.
Find the rate of change of θ when the visitor is 4 m from the wall.
[3]3 marks
Markscheme (d)
dtdx=−0.5
(e)
Find the range of values of x for which θ>0.3.
[3]3 marks
Markscheme (e)
attempt to solve θ=0.3 (may be seen on a graph) (M1)
x=0.704
Question 2 · AA-006597 marks
A lighthouse L stands 400 m from a straight shoreline. The point on the shoreline closest to L is O. The lighthouse beam rotates at a constant rate of 0.3 radians per second, and the beam meets the shoreline at the point P. At time t seconds, angle OL^P=θ
Question 3 · AA-0066827 marks
This question asks you to use derivatives to establish results about sums of inverse tangents, and to apply them to an infinite series.
(a)
By differentiating tany=x implicitly with respect to x, show that dxd(arctanx)=1+x21
Try a quick-fire question
One of 37 short multiple-choice questions on 5.14. Pick an answer to see why it's right or wrong.
The curve ey+xy=e passes through (0,1). What is dxdy at this point?
fails the vertical line test, and for many curves it is difficult or impossible to make
y
the subject. Implicit differentiation finds the gradient of such a curve directly from its equation, without solving for
y
.
x
and
y
without being solved for
y
. Examples are
and
y=−25−x2
, one for each half of the circle. The last two cannot be solved for
y
with standard functions at all. Each still defines a curve, and near most of its points the curve behaves like the graph of a function, so it has a gradient there.
:
Chain rule
siny
cosydxdy
Chain rule
e2y
2e2ydxdy
Chain rule
lny
y1dxdy
Chain rule
xy
xdxdy+y
Product rule, with dxd(y)=dxdy
x2y3
x2×3y2dxdy+2xy3
Product rule and chain rule
exy
exy(xdxdy+y)
Chain rule, then product rule
a constant, such as 25
0
alone. The term
xy
is a product of two functions of
x
, so it needs the
product rule
:
dxd(xy)=xdxdy+y×1
. In the same way,
y2
does not differentiate to
2y
: the factor
dxdy
from the chain rule is easily forgotten.
and divide to make it the subject.
To find the gradient at a point, substitute both coordinates, x and y.
. (a) Find
dxdy
in terms of
x
and
y
. (b) Find the gradient of the circle at each point. (c) Find the equation of the tangent at
(3,4)
.
Show the solution
(a) Differentiate both sides with respect to x:
2x+2ydxdy=0⇒dxdy=−yx
(b) At (3,4): dxdy=−43
(c) Using y−y1=m(x−x1):
y−4=−43(x−3)⇒4y−16=−3x+9⇒3x+4y=25
Check: the radius to (3,4) has gradient 34, and 34×(−43)=−1
gives
dxdy=−25−x2x=−yx
; for the lower half the same calculation gives the same formula. Implicit differentiation handles both halves at once.
keeps the product rule visible and makes sign errors less likely.
passes through the point
P(59,58)
. Find the equations of the tangent and the normal to the ellipse at
P
.
Show the solution
Check first that P is on the curve: 981/25+464/25=259+2516=1.
Differentiate implicitly:
92x+42ydxdy=0⇒dxdy=−92x×y2=−9y4x
At P:
dxdy=−9×584×59=−7236=−21
Tangent: y−58=−21(x−59)
Normal: the gradient is 2, so y−58=2(x−59)
. (b) Find the equation of the tangent and the equation of the normal to
C
at the point
(1,2)
.
Show the solution
(a) Differentiate each term with respect to x, using the product rule on xy:
2x+(xdxdy+y)+2ydxdy=0
Collect the terms in dxdy:
(x+2y)dxdy=−(2x+y)⇒dxdy=−x+2y2x+y
(b) Check: 1+2+4=7, so (1,2) lies on C. The gradient there is
dxdy=−1+42+2=−54
Tangent: y−2=−54(x−1), so 5y−10=−4x+4
Normal: gradient 45, so y−2=45(x−1)
x² + xy + y² = 7
(lower half)
tangent 4x + 5y = 14
normal 5x − 4y + 3 = 0
The tilted ellipse x² + xy + y² = 7 is not the graph of one function, yet it has a gradient at every point. The tangent at (1, 2) has gradient −4/5 and the normal is perpendicular to it.
(and
D=0
), and vertical where
D=0
(and
N=0
). In each case the condition gives a relation between
x
and
y
, which is solved together with the equation of the curve.
.
(a) Horizontal tangents need 2x+y=0, so y=−2x. Substitute into the curve:
x2+x(−2x)+(−2x)2=7⇒3x2=7⇒x=±37=±321
The points are (321,−3221) and (−321,3221), approximately (1.53,−3.06) and (−1.53,3.06). At these points x+2y=−21=0 and 21=0, so the gradient is genuinely 0.
(b) Vertical tangents need x+2y=0, so x=−2y. By the symmetry of the equation in x and y, 3y2=7, and the points are (−3221,321) and (3221,−321), approximately (−3.06,1.53) and (3.06,−1.53).
at
(1,0)
Show the solution
(a) Check: 1×2+8=10. Differentiate, using the product rule on x2y:
(x2dxdy+2xy)+3y2dxdy=0⇒dxdy=−x2+3y22xy
At (1,2): dxdy=−1+124=−134
(b) Check: 1×e0+0=1. Differentiate, using the product rule on xey and the chain rule on ey
(xeydxdy+ey)+dxdy=0⇒dxdy=−xey+1ey
At (1,0): dxdy=−1+11=−21
. The result contains
dxdy
, which is then replaced by its expression in
x
and
y
.
, and hence state the
concavity
of the upper half of the circle.
Show the solution
From the first example, dxdy=−yx. Differentiate with the quotient rule, treating y as a function of x:
dx2d2y=−y2y×1−xdxdy
Substitute dxdy=−yx:
dx2d2y=−y2y+yx2=−y3y2+x2=−y325
using x2+y2=25 in the last step. On the upper half, y>0, so dx2d2y<0
is increasing at a rate of
3
units per second, find the rate of increase of
y
when
x=1
.
Show the solution
Differentiate the equation with respect to x: dxdy=3x2+2. By the chain rule,
dtdy=dxdy×dtdx=(3x2+2)×3
At x=1: dtdy=5×3=15
, find
dtdr
).
Find an equation linking the two quantities. If a third variable appears, eliminate it with a further relationship such as similar triangles.
Differentiate the equation, either with respect to one of the variables and then with the chain rule, or implicitly with respect to t.
Substitute the values at the instant in question only after differentiating, and solve for the unknown rate. State the units.
; find
dtdr
when
r=10
. The volume of a sphere is
V=34πr3
, so
drdV=4πr2
. By the chain rule,
dtdV=drdV×dtdr⇒100=4πr2dtdr
At r=10: 100=400πdtdr, so
dtdr=4π1≈0.0796 cm s−1
(b) The surface area is S=4πr2, so drdS=8πr and
dtdS=drdS×dtdr=8π×10×4π1=20 cm2 s−1
decreases as
r
increases. A larger balloon needs much more air to increase its radius by the same amount.
; find
dtdy
when
x=3
. The equation linking
x
and
y
is
x2+y2=25
. Differentiate implicitly with respect to
t
:
2xdtdx+2ydtdy=0⇒dtdy=−yxdtdx
When x=3, y=25−9=4, so
dtdy=−43×0.5=−0.375 m s−1
The top is moving down the wall at 0.375 m s−1 (the negative sign shows y is decreasing).
(b) The angle satisfies x=5cosθ. Differentiate with respect to t:
dtdx=−5sinθdtdθ
When x=3 and y=4, sinθ=54, so
0.5=−5×54×dtdθ=−4dtdθ⇒dtdθ=−0.125 rad s−1
The angle is decreasing at 0.125 radians per second.
shows a limitation of the model. As the top approaches the ground,
y→0
and the predicted speed of the top grows without bound. In reality the top leaves the wall before this happens, so the model is only valid while the ladder stays in contact with the wall.
; find
dtdh
when
h=4
.
The water is a cone of radius r and depth h, so V=31πr2h. This has two changing variables, so eliminate r with similar triangles:
hr=63⇒r=2h
Then
V=31π(2h)2h=12πh3⇒dhdV=4πh2
By the chain rule, dtdV=dhdV×dtdh, so at h=4:
2=4π×16dtdh=4πdtdh⇒dtdh=2π1≈0.159 m per minute
, find
dtdh
when
h=4
". Then write the chain rule statement, such as
dtdV=dhdV×dtdh
, before substituting. This makes the method clear and earns method marks even if an arithmetic slip follows. Give units with the final answer.
the length of the shadow. Given
dtdx=1.2
.
The large triangle (lamp, foot of post, tip of shadow) is similar to the small triangle (head, feet, tip of shadow).
(a) By similar triangles, comparing height to base in each triangle:
x+s6=s1.8⇒6s=1.8x+1.8s⇒4.2s=1.8x⇒s=73x
Differentiate with respect to t:
dtds=73dtdx=73×1.2=3518≈0.514 m s−1
(b) The tip of the shadow is at distance x+s from the post, so its speed is
dtd(x+s)=1.2+3518=712≈1.71 m s−1
Both rates are constant: they do not depend on how far the person is from the post.
. Because the square root is an increasing function,
D
is smallest exactly where
D2
is smallest, and
D2
has no square root to differentiate.
Show the solution
A point on the curve is (x,x), with x≥0. The square of its distance from A is
D2=(x−3)2+(x−0)2=x2−6x+9+x=x2−5x+9
Differentiate and set the derivative equal to 0:
dxd(D2)=2x−5=0⇒x=25
The second derivative is 2>0, so this is a minimum. The point is (25,25)≈(2.5,1.58)
D=425−225+9=411=211≈1.66
At the closest point the line from A to the curve is a normal to the curve, which gives a check: the gradient of y=x at x=25
. (b) Find, in terms of
R
, the height of the cylinder of greatest volume, and show that its volume is
943πR3
.
Show the solution
(a) A cross-section through the axis shows a rectangle of width 2r and height h inside a circle of radius R. A right-angled triangle from the centre of the sphere to a corner of the rectangle has legs r and 2h and hypotenuse R, so
r2+(2h)2=R2⇒r2=R2−4h2
(b) The volume V=πr2h has two variables; the constraint from (a) eliminates r:
V=π(R2−4h2)h=πR2h−4πh3,0<h<2R
Here R is a constant. Differentiate with respect to h:
dhdV=πR2−43πh2=0⇒h2=34R2⇒h=32R=323R
Since dh2d2V=−23πh<0
V=π×32R2×32R=334πR3=943πR3
This is 31≈58% of the volume of the sphere.
, with its four vertices on the ellipse. Find the maximum area of the rectangle.
Show the solution
Let the vertex in the first quadrant be (x,y). The rectangle has width 2x and height 2y, so its area is A=4xy, with the constraint a2x2+b2y2=1.
Differentiate the constraint implicitly with respect to x:
a22x+b22ydxdy=0⇒dxdy=−a2yb2x
Differentiate the area with the product rule and set it equal to 0:
Substituting into the constraint, each fraction equals 21, so x=2a
Amax=4×2a×2b=2ab
For a circle (a=b) this gives a square of area 2a2, the largest rectangle in a circle.
along the beach and swims at
2 m s−1
. She runs
x
metres along the beach and then swims straight to
S
. (a) Show that the total time taken, in seconds, is
T(x)=7x+2(50−x)2+900
for
0≤x≤50
. (b) Find the value of
x
that minimises
T
, and the minimum time.
Show the solution
(a) Running x m at 7 m s−1 takes 7x s. She then has 50−x m left along the shore and 30 m out to sea, so by Pythagoras the swim is (50−x)2+302 m, which takes 2(50−x)2+900 s. Adding gives T(x).
(b) Differentiate, using the chain rule on the square root:
T′(x)=71−2(50−x)2+90050−x
Set T′(x)=0 and write d=50−x:
2d2+900d=71⇒7d=2d2+900⇒49d2=4d2+3600⇒d2=80
So d=80≈8.944 and x=50−80≈41.1
T=741.056+280+900≈5.865+15.652=21.5 s
Compare the end points: T(0)≈29.2 s (swimming all the way) and T(50)≈22.1 s (running to the nearest point), so x≈41.1 m gives the minimum. A graphic display calculator (GDC) sketch of T
T(x)
The time falls as the lifeguard runs further along the beach, reaches a minimum at about 41.1 m, then rises slightly. The best route runs most of the way but not all of it.
. [4 marks] (b) Verify that the point
(3,3)
lies on the curve, and find the equation of the tangent at this point. [3 marks] (c) Find the coordinates of the point, other than the origin, at which the tangent to the curve is horizontal. [5 marks]
Show the solution
(a) Differentiate implicitly (M1), using the product rule on 6xy (M1):
3x2+3y2dxdy=6xdxdy+6y(A1)
Collect the terms in dxdy and divide by 3:
(y2−2x)dxdy=2y−x2⇒dxdy=y2−2x2y−x2(A1, given answer)
(b) 27+27=54=6×3×3, so (3,3) lies on the curve. The gradient is 9−66−9=−1
(c) A horizontal tangent needs 2y−x2=0, so y=2x2
x3+8x6=6x×2x2=3x3⇒8x6=2x3⇒x3(x3−16)=0(A1)
Excluding the origin, x3=16, so x=316=232
, and car
B
is
300
m north of
O
, travelling north away from
O
at
15 m s−1
. (a) Find the distance between the cars at noon. [1 mark] (b) Find the rate at which the distance between the cars is increasing at noon. [4 marks] (c) A hot-air balloon rises vertically from a point
120
m from an observer on level ground, at a constant
3 m s−1
. Find the rate at which the distance from the observer to the balloon is increasing when the balloon is
90
m high. [3 marks]
Show the solution
(a) Let x and y be the distances of A and B from O, and D the distance between them. At noon D=4002+3002=500 m (A1).
(b) The quantities satisfy D2=x2+y2 (M1). Differentiate implicitly with respect to t (M1):
2DdtdD=2xdtdx+2ydtdy⇒dtdD=Dxdtdx+ydtdy
Substitute x=400, y=300, D=500, dtdx=20
dtdD=500400×20+300×15=50012500=25 m s−1(A1)
(c) With height h and distance L from the observer, L2=h2+1202
dtdL=Lhdtdh=15090×3=1.8 m s−1(A1)
with respect to
x
.
To do:
I can find dxdy for an implicit equation and evaluate it at a point on the curve.
To do:
I can find the equations of the tangent and the normal to an implicitly defined curve.
To do:
I can find the points where an implicit curve has horizontal or vertical tangents, substituting back into the curve's equation.
To do:
I can find dx2d2y implicitly, replacing dxdy by its expression.
To do:
I can solve related rates problems by writing the given rate and the rate asked for, finding the linking equation and applying the chain rule.
To do:
I can use similar triangles or Pythagoras' theorem to link the variables in a related rates problem.
To do:
I can solve optimisation problems with a constraint, including minimising a distance by minimising its square.