Skip to main content
Logo image

Chapter 14 Related rates

Section 14.1 Quantities varying in tandem

Sometimes we have several quantities varying in tandem.

Example 14.1.1. Filling a balloon.

We are putting our portable air pump to work again, but this time we keep it on the high setting (0.75 m3min) as we fill a balloon. For simplicity, assume the balloon maintains a spherical shape at all times.
Let V(t) represent the volume of air accumulated in the balloon at time t, and take the initial volume to be V(0)=0. The air flow specification on our pump tells us
dVdt=0.75.
But as the volume of the balloon varies, so do other aspects of its geometry. For example, at what rate is the diameter of the balloon varying? With the volume varying at a constant rate, does the diameter vary at a constant rate as well?
Let D(t) represent the diameter of the balloon at time t. We can determine a formula for D(t) by obtaining a formula for V(t) and then relating volume to diameter. First, in the current scenario, V varies at a constant rate, so V(t) must be linear, with slope equal to its constant rate of variation:
V(t)=V0+0.75t.
However, we have taken V0=V(0)=0, so we have
V(t)=3t4.
On the other hand, using R to represent the radius of the balloon, we can relate V to D using the formula for the volume of a sphere:
V=4πR33=πD36.
Isolating D gives
D=6π3V1/3=6π3(3t4)1/3=92π3t1/3
This already answers one of our questions: since D(t) is not a linear function, the diameter of the balloon does not vary at a constant rate when the volume does.
To obtain the rate function that measures how the diameter varies over time, we can use Pattern 12.4.3 to directly compute a formula for dD/dt from our formula for D(t) above.
dDdt=ddt(92π3t1/3)=92π3ddt(t1/3)=92π313t2/3=16πt23
In Example 14.1.1, we were able to compute dD/dt by relating D to V and then using a formula for V(t) to obtain a formula for D(t) that we could differentiate. But there is a way to directly compute dD/dt without need for either a formula for V(t) or D(t). By definition, to compute a derivative value at t=t we would first approximate by average rate calculations over short time intervals containing t:
dVdt|t=tΔVΔtdDdt|t=tΔDΔt.
Notice what happens if we multiply ΔV/Δt by ΔD/ΔD (which is always equal to 1):
ΔVΔt=ΔVΔtΔDΔD=ΔVΔDΔDΔt.
How should we interpret ΔV/ΔD? It still represents an averate rate of variation, but not with respect to time — it represents how the volume varies (on average) as the diameter varies, and would be in units of metres-cubed per metre. We can interpret the formula
V=πD36
as expressing V as a function of the independent variable D:
V(D)=πD36.

Example 14.1.2. Average rate of change of volume with respect to diameter.

Suppose our balloon increases in diameter from 0.5 m to 1 m. Then the volume increases from
V(0.5)=π(0.5)36toV(1)=π136=π48=π6.
So we can say that over this increase in diameter, the volume increases at an average rate of
ΔVΔD=V(1)V(0.5)10.5=π/6π/481/2=7π240.92,
which says that during a period when the diameter increases 0.5 m to 1 m, the volume is increase at the approximate average rate of 0.92 m3 per metre increase in the diameter.
Now,
ΔVΔt=ΔVΔDΔDΔt
is true for all average rate calculations. So if V is differentiable as a function of D, and D is differentiable as a function of t, then for small enough Δt and small enough ΔD, we have
(✶)dVdD|D=DΔVΔDdDdt|t=tΔDΔt
(where D represents the diameter at time t=t), giving us
(✶✶)ΔVΔt(dVdD|D=D)(dDdt|t=t)
The derivative value
dVdt|t=t
is defined to be a value that ΔV/Δt values can be made arbitrarily close to by taking Δt small enough. As the approximations in (✶) become better the smaller we take Δt (because this also makes ΔD smaller), we can say that the approximation in (✶✶) becomes better the smaller we take Δt, and we conclude that
dVdt|t=t=(dVdD|D=D)(dDdt|t=t).
And since this is true at all points t=t (and corresponding D=D), we can say
dVdt=dVdDdDdt.

Example 14.1.3. Filling a balloon.

Let’s revisit Example 14.1.1 using our new pattern. We have
V=π6D3dVdD=π63D2=πD22,
which gives us
dVdt=dVdDdDdt=(πD22)dDdt.
Using our assumption that dV/dt is constant at 0.75, we can solve for dD/dt:
dDdt=(2πD2)dVdt=2πD234=32πD2.
This gives us a way to calculate dD/dt from known diameter values. For example, at the instant that the diameter of the balloon is D=3, the diameter is increasing at a rate of 1/6π metres per minute.

Section 14.2 The Chain Rule

The argument we used in Section 14.1 to relate dV/dt, dV/dD, and dD/dt works in general.

Example 14.2.2.

Suppose u=t+t1 and v=u2. Then,
dvdu=2ududt=1t2,
and so the Chain Rule leads to
dvdt=dvdududt=2u(1t2).
If we would rather have a formula for dv/dt that is solely in terms of the ultimate independent variable t, then we can substitute for u:
dvdt=2(t+t1)(1t2).
Let’s compare this result with what we get by substituting for u before calculating any derivative functions.
v=u2dvdt=2t+02t3=(t+t1)2=2(tt3)=t2+2+t2
And our first calculation from the chain rule gave us
dvdt=2(t+t1)(1t2)=2(tt1+t1t3)=2(tt3),
same as above.

Example 14.2.3. Filling a balloon.

Let’s return again to Example 14.1.1, but this time let’s assume it is the diameter that is increasing at a constant rate, say 0.5 mmin. (Assume it is a large balloon.) In Example 14.1.3 we calculated
dVdD=πD22,
and so combining this with our assumption
dDdt=0.5
we have
dVdt=dVdDdDdt=πD2212=πD24.
We can convert this into a formula in t by first obtaining a formula for D. As we have assumed that D varies at a constant rate, it must be a linear function of t with slope equal to the constant rate:
D(t)=D0+t2,
where D0 represents the initial diameter D0=D(0). So now we have
dVdt=π(D0+t/2)24.
We can often apply the Chain Rule in situations where it isn’t immediately apparent that it applies at all, by making a substitution.

Example 14.2.4. Derivative of a power of the sine function.

Consider
q(t)=sin3(t)=(sin(t))3.
None of the formulas or rules from Chapter 12 directly apply to this situation, and going all the way back to using an algebraic approach starting with a forward/backward difference approximation doesn’t sound like fun. Instead, we can recognize this as a situation for the chain rule by introducing an intermediate variable:
q=u3foru=sin(t).
Now we can differentiate separately:
dqdu=3u2dudt=cos(t).
Combining these in the Chain Rule and then substituting back in for u gives us
dqdt=dqdududt=3u2cos(t)=3sin2(t)cos(t).

Example 14.2.5. Derivative of a radical function.

Consider q(t)=t2+1. Taking the same sort of approach as the previous example, we introduce an intermediate variable to represent the expression inside the root:
q=u=u1/2foru=t2+1.
Now we differentiate separately:
dqdu=12u1/2dudt=2t=12u.
Combining these in the Chain Rule and then substituting back in for u gives us
dqdt=dqdududt=12u2t=2t2t2+1=tt2+1.
The chain rule now also gives us a way to handle reciprocal functions.

Example 14.2.6. Derivative of the reciprocal of a polynomial.

For
q(t)=1t2+3t5,
we have
q=1u=u1foru=t2+3t5.
Now we differentiate separately:
dqdu=u2dudt=2t+30=1u2.
Combining these in the Chain Rule and then substituting back in for u gives us
dqdt=dqdududt=1u2(2t+3)=2t+3(t2+3t5)2.

Justification.

We have
sec(t)=(cos(t))1.
Set q=u1 for u=cos(t) and differentiate:
dqdu=u2dudt=sin(t).
Combining these in the Chain Rule and then substituting back in for u gives us
ddt(sec(t))=dqdududt=1u2(sin(t))=sin(t)cos2(t)=1cos(t)sin(t)cos(t)=sec(t)tan(t).
The verification for csc(t) is similar.
Finally, we can also use the chain rule to verify our pattern for the derivative of a horizontal transformation. (See Pattern 12.3.12 and Pattern 12.3.14.) We will verify both patterns at once: suppose
q(t)=p(ktc),
so that q is both a horizontally scaling and a horizontal shift of function p. We may write
q=p(u)foru=ktc.
Since u is linear in t its derivative is just its slope, so that
dqdt=dpdududt=p(u)k=kp(ktc).
We can now compare to our previous results.
  • In the case of a horizontal shift with no scale (so that k=1), we have the same result as in Pattern 12.3.12.
  • In the case of a horizontal scale with no shift (so that c=0), we have the same result as in Pattern 12.3.14.

Section 14.3 Implicit differentiation

Because of Pythagoras, the points in the xy-plane that make up the unit circle centred at the origin can be described by the algebraic equation x2+y2=1.
Diagram illustrating that the coordinates of points on the unit circle satisfy a Pythagorean condition.
Figure 14.3.1. The coordinates of points on the unit circle satisfy a Pythagorean condition.
This curve is not the graph of a function, because it fails the Vertical Line Test. In fact, when we form this circle we are most likely not thinking about functions at all, but rather about geometry. With this perspective, we do not consider y to be a dependent variable — instead, x and y are two independent position variables, one that indicates a horizontal position and one that indicates a vertical position.
However, suppose we want to answer a question like What is the slope of the line tangent to this circle at the point (1/10,3/10)? This question is easy enough to answer using simple geometry, but we’d like to demonstrate a calculus solution because it suggests a general method called implicit differentiation.
The idea is that the lower half of the circle has nothing to contribute to solving this problem, and it is the fact that this circle has both a lower and an upper half that is causing the Vertical Line Test to fail. If we ignore the lower semicircle and implicitly assume that y is a function of x, then we may algebraically express it as such:
y=1x2.
Diagram of a tangent line to the upper unit semicircle.
Figure 14.3.2. A tangent line to the upper unit semicircle.
We could now apply the Chain Rule using u=1x2 to compute dy/dx, and substituting x=1/10 into the result would give the desired slope. However, there is a way we can proceed with explicitly expressing y as a formula in x.

Example 14.3.3. Computing a slope on a circle implicitly.

Beginning with circle equation
x2+y2=1,
implicitly assume that y is a function of x. Compute
dx2dx=2xdy2dx=dy2dydydxd1dx=0=2ydydx,
where in the middle we have applied the Chain Rule. With our assumption that y is a function of x, the equality
x2+y2=1
is no longer about geometry, but instead is an equality of functions. Two equal functions must have the same rate of variation, so the derivative of the left-hand side must equal the derivative of the right-hand side:
ddx(x2+y2)=d1dxdx2dx+dy2dx=02x+2ydydx=0,
using our previous calculations. If we would like to know the slope at a point like (1/10,3/10), just substitute x=1/10 and y=3/10:
210+610dydx=0610dydx=210dydx=106210dydx=13.
Note that we can confirm this result with geometry: the radius from the origin to our point on the circle has slope
riserun=3/101/10=3,
and the tangent at that point, being perpendicular to the radius, should have the negative-reciprocal slope 1/3.

Checkpoint 14.3.4. Another confirmation.

Use the Chain Rule to differentiate y=1x2, an confirm again that the slope of the tangent to the unit circle at point (1/10,3/10) is 1/3.

Example 14.3.7.

Consider the curve defined by y2=x3(2x). The point (1,1) lies on this curve, since at x=1 and y=1 we have
LHS=12RHS=13(21)=1=1.
What is the equation of the tangent to the curve at this point?
A tangent to a curve in the plane.
Figure 14.3.8. A tangent to the curve y2=x3(2x).
We can re-arrange this equation to
y22x3+x4=0.
Matching with the pattern of Procedure 14.3.5, we have
F(x,y)=y22x3+x4.
Differentiate implicitly:
dFdx=dy2dx2dx3dx+dx4dx=dy2dydydx23x2+4x3=2ydydx6x2+4x3.
At the point (1,1) we have
dFdx|x=1y=1=21dydx612+413=2dydx2.
Setting this equal to 0 and solving leads to dy/dx=1. The line with slope 1 that passes through the point (1,1) is simply the line y=x.
Why would we bother with this method when we can just isolate y and differentiate that explicit formula for y as a function of x? Because in more complicated examples it is often not practical (or even possible) to isolate y.

Example 14.3.9.

The curve
y76y5+5y2+2x2=8
pass through the point (2,1), as you can verify. It wouldn’t be practical to attempt to isolate y in this equation. But assuming that a small portion of the curve around that point satisfies the Vertical Line Test, we differentiate:
dFdx=dy7dx6dy5dx+5dy2dx+2dx2dx=dy7dydydx6dy5dydydx+5dy2dydydx+22x=7y6dydx65y4dydx+52ydydx+4x=(7y630y4+10y)dydx+4x.
Substituting x=2 and y=1 and setting this equal to d/dx(8)=0, we have
(7163014+101)dydx+42=013dydx=8dydx=813.
So the slope of the tangent to the curve at the point (2,1) is 8/13.

Section 14.4 Related rate problems

We began this chapter with an example of two quantities varying over time, but constrained to each other physically (or, really, geometrically) so that they were forced to vary in tandem. Unsurprisingly, the rates of variation of these two quantities were related. Here are some more examples of such related rates.

Example 14.4.1. Walking around a corner.

Two workers are carrying a three-metre ladder along a narrow catwalk high above the ground when they come to a right angle in the walkway. The lead worker rounds the corner, but her progress is limited by the trailing worker, who, terrified, is inching along at a rate of 1 mmin. At what rate is the lead worker able to walk at the instant that the trailing worker is still 1.5 m from the turn?
Solution.
Let x represent the trailing worker’s distance from the turning point, and let y represent the lead worker’s distance from that point.
A diagram depicting two workers on a walkway carrying a ladder around a corner.
Figure 14.4.2. Two workers on a walkway carrying a ladder around a corner.
The trailing worker’s rate of travel tells us that
dxdt=1,
where the rate is taken to be negative because that worker’s distance to the turn is decreasing. The two distances x and y are constrained by the right angle of the turn and the straight line of the ladder, so that the two distances must satisfy Pythagoras at each point in time that the two workers are on different legs of the cat walk:
x2+y2=32.
As both x and y vary with time, they are somehow functions of t. In this scenario we can differentiate with respect to t:
ddt(x2+y2)=d1dtdx2dt+dy2dt=0dx2dxdxdt+dy2dydydt=02xdxdt+2ydydt=0.
At the instant that x=1.5, we have
(1.5)2+y2=32y2=92.25y=332.
Substituting this along with x=1.5 and dx/dt=1 into our differentiation result above, we obtain
232(1)+2332dydt=033dydt=3dydt=33.
So at that instant the lead worker is able to travel at approximately 0.58 mmin.

Example 14.4.3. A rotating light.

A person walks along a straight path at a rate of travel of 1.2 ms. A searchlight is located on the ground 6 m from the path. At the point on the path closest to the searchlight is located a motion detector, and when the person passes this point the light turns on and is kept focused on the person. At what rate is the distance between the person and the searchlight varying at the instant when the person is 4.5 m past the motion detector? At what rate is the searchlight rotating at this instant?
Solution.
Let x represent the distance along the path from the motion detector to the person. Let z represent the straight-line distance from the the searchlight to the person. Let θ represent the amount the searchlight has rotated past the line between the motion detector and the searchlight.
A diagram depicting a light shining on a person walking on a path.
Figure 14.4.4. A light shining on a person walking on a path.
We are told that
dxdt=1.2,
and we are asked to determine dz/dt and dθ/dt at the instant that x=4.5.
The first part of the problem is essentially the same as Example 14.4.1. Distances x and z are constrained at every instant by Pythagoras:
x2+62=z2.
Differentiate implicitly:
ddt(x2+62)=dz2dtdx2dt+d62dt=dz2dtdx2dxdxdt+0=dz2dzdzdt2xdxdt=2zdzdtxdxdt=zdzdt.
At the instant that x=4.5, we have
(4.5)2+62=z2z=152.
So substituting all known values into our differentiation result, we have
So the distance from searchlight to person is increasing at a rate of 0.72 ms.
Now, for the rate of rotation of the light. We will use a cosine relationship, since we have not yet encountered the derivative of the tangent function.
cos(θ)=20z=20z1.
Differentiating, we have
ddt(cos(θ))=20dz1dt[ddθ(cos(θ))]dθdt=20dz1dzdzdtsin(θ)dθdt=20z2dzdtsin(θ)dθdt=20z2dzdt.
Note that it is not necessary to know the value of θ at the instant that x=4.5 in order to use this formula, since we may substitute
sin(θ)=xz
to obtain
xzdθdt=20z2dzdtdθdt=20xzdzdt.
We already know that z=7.5 at the instant that x=4.5, so now we calculate
dθdt=20(9/2)(15/2)1825=3275.
So at that instant the searchlight is rotating at approximately 0.427 rads.

Section 14.5 Logarithmic differentiation

Sometimes it is helpful to turn an explicit function formula into an implicit relationship between dependent and independent variables.

Example 14.5.1. A varying exponent.

Consider the exponential function q(t)=2t. One strategy for differentiating this function is to convert it into a horizontal transformation of the exponential function, and use Pattern 12.3.14. We have
q(t)=2t=etln2,
so since d(et)/dt=et, we have
q(t)=(ln2)etln2=(ln2)2t.
Another method is to purposefully turn the expression into a implicit one. In this case, introducing the natural logarithm allows us to simplify things before differentiating, because of the many convenient properties of the natural logarithm. In particular, if we set y=2t, then
lny=ln(2t)=tln2.
Differentiate both sides:
ddt(lny)=ddt(tln2)ddy(lny)dydt=(ln2)dtdt1ydydt=(ln2)1dydt=yln2.
Substituting y=2t back in, we have
dydt=2tln2,
which agrees with the result of our first method.
Before we consider the pattern of our second method from Example 14.5.1, let’s record the pattern of the result of that example.

Justification.

Assuming the derivative of p(t)=ln|(q(t))| can be easily computed, differentiate both sides of ln|y|=p(t):
ddt(ln|y|)=ddt(p(t))ddy(ln|y|)dydt=p(t)1ydydt=p(t)dydt=yp(t).
Since y=q(t), we then have
q(t)=q(t)p(t),
as desired.

Remark 14.5.5.

Recall that the domain of the logarithm is t>0. In Example 14.5.1, we were able to introduce the logarithm because 2t>0 for all t, which means that ln(2t) is defined for all t. In Procedure 14.5.4 we suggest introducing the extended logarithm function instead, so that y=q(t) becomes ln|y|=ln|q(t)| before differentiating, to be able to handle cases where q(t) is sometimes negative. The extra absolute value brackets generally won’t complicate things since we know how to differentiate the extended logarithm function (Pattern 12.5.4). Also, the absolute value brackets won’t interfere with the applying the properties of the logarithm to simplify ln(q(t)), since
|ab|=|a||b||ab|=|a||b|
are always true.

Example 14.5.6. Using the logarithm to simplify products and quotients.

Consider
y=sin(t)sin(2t)sin(3t)cos(4t)cos(5t)cos(6t).
Since the sine and cosine functions have both positive and negative outputs in their ranges, let’s introduce the extended logarithm function:
ln|y|=ln|sin(t)sin(2t)sin(3t)cos(4t)cos(5t)cos(6t)|=ln|sin(t)||sin(2t)||sin(3t)||cos(4t)||cos(5t)||cos(6t)|=ln(|sin(t)||sin(2t)||sin(3t)|)=ln(|cos(4t)||cos(5t)||cos(6t)|)=ln|sin(t)|+ln|sin(2t)|+ln|sin(3t)|=ln|cos(4t)|ln|cos(5t)|ln|cos(6t)|.
Consider the derivative of one of the terms in this expression, say ln|cos(5t)|. Setting q=ln|u| for u=cos(5t), we have
dqdu=1ududt=5sin(5t),
so that
dqdt=dqdududt=1u(5sin(5t))=5sin(5t)cos(5t)=5tan(5t).
Similar calculations for the other terms gives us
1ydydt=cot(t)+2cot(2t)+3cot(3t)=+4tan(4t)+5tan(5t)+6tan(6t).
Finally, substituting back in for y we have
q(t)=dydt=sin(t)sin(2t)sin(3t)cos(4t)cos(5t)cos(6t)(cot(t)+2cot(2t)+3cot(3t)=sin(t)sin(2t)sin(3t)cos(4t)cos(5t)cos(6t)(+4tan(4t)+5tan(5t)+6tan(6t)).
We can use the same process to compute the derivative of the tangent and cotangent functions.

Justification.

We will verify the first formula, and leave the second for the reader to verify.
Set y=tan(t) and consider
ln|y|=ln|tan(t)|=ln|sin(t)cos(t)|=ln|sin(t)|ln|cos(t)|.
Differentiate both sides:
ddt(ln|y|)=ddt(ln|sin(t)|)(ln|cos(t)|)1ydydt=1sin(t)ddt(sin(t))1cos(t)ddt(cos(t)).
Isolating for dy/dt and continuing with the differentiation process, we have
dydt=y(cos(t)sin(t)+sin(t)cos(t))=tan(t)(cos2(t)+sin2(t)sin(t)cos(t))=sin(t)cos(t)1sin(t)cos(t)=1cos2(t)=sec2(t),
as claimed.
Finally, the justification we provided for Pattern 12.4.3 only dealt with the case of positive exponents. But now that we have the Chain Rule we can use the method of Logarithmic differentiation to verify that Pattern 12.4.3 does indeed hold for arbitrary exponents.

Justification.

For y=tm we have
ln|y|=ln|tm|=ln|t|m=mln|t|.
Applying the formula for the derivative of the logarithm to both sides (in conjunction with the Chain Rule on the left), we have
1ydydt=mt.
Isolating dy/dt and substituting y=tm gives us
dydt=myt=mtmt=mtm1,
as claimed.