TExcelTAD
Home › Calculus Essentials › Related Rates

Related Rates

When several quantities are linked by an equation and they all change over time, their rates of change are linked too. Related-rates problems use that link: if you know how fast one quantity changes, you can find how fast another one does. The method is implicit differentiation with respect to time.

The method

  1. Draw a picture and name the changing quantities as functions of time tt.
  2. Write an equation relating them (geometry, physics, Pythagoras).
  3. Differentiate both sides with respect to tt (implicit differentiation), using the chain rule on every term.
  4. Substitute the values at the moment you care about, and solve for the unknown rate.

Tip: Only plug in numbers after differentiating. If you substitute a value that is changing before you differentiate, you freeze it into a constant and its rate disappears.

Example 1: a growing ripple

A stone hits a pond and a circular ripple spreads with radius growing at 0.5 m/s. How fast is the enclosed area growing when the radius is 3 m?

A=πr2dAdt=2πr⋅drdtat r=3, drdt=0.5:dAdt=2π⋅3⋅0.5=3π≈9.42 m2/s\begin{aligned} &A = \pi r^2 \\ &\frac{dA}{dt} = 2\pi r \cdot \frac{dr}{dt} \\ &\text{at } r = 3,\ \frac{dr}{dt} = 0.5{:} \quad \frac{dA}{dt} = 2\pi \cdot 3 \cdot 0.5 = 3\pi \approx 9.42\ \text{m}^2/\text{s} \end{aligned}

The area grows faster and faster even though the radius grows steadily, because the edge (2πr2\pi r) keeps getting longer.

Example 2: the sliding ladder

A 5 m ladder leans against a wall. Its foot slides away from the wall at 0.4 m/s. How fast does the top slide down when the foot is 3 m from the wall?

x2+y2=25(x=foot distance, y=height of top)2x⋅dxdt+2y⋅dydt=0  ⟹  dydt=−xy⋅dxdtat x=3:y=4,dydt=−34⋅0.4=−0.3 m/s\begin{aligned} &x^2 + y^2 = 25 && (x = \text{foot distance},\ y = \text{height of top}) \\ &2x \cdot \frac{dx}{dt} + 2y \cdot \frac{dy}{dt} = 0 \implies \frac{dy}{dt} = -\frac{x}{y} \cdot \frac{dx}{dt} \\ &\text{at } x = 3{:} \quad y = 4, \quad \frac{dy}{dt} = -\tfrac{3}{4} \cdot 0.4 = -0.3\ \text{m/s} \end{aligned}

The top moves down at 0.3 m/s. As y→0y \to 0 the formula says dydt→−∞\frac{dy}{dt} \to -\infty, which is the point where the model (a ladder that stays on the wall) breaks down.

python · try it yourself
import sympy as sp

t = sp.symbols('t')
x, y = sp.Function('x')(t), sp.Function('y')(t)
eq = sp.Eq(x**2 + y**2, 25)
d = sp.diff(eq.lhs - eq.rhs, t)          # differentiate both sides w.r.t. t
dy = sp.solve(d, sp.diff(y, t))[0]
print("dy/dt =", dy)
print("at x = 3, y = 4, dx/dt = 0.4:", dy.subs(sp.diff(x, t), 0.4).subs({x: 3, y: 4}))
dy/dt = -x(t)*Derivative(x(t), t)/y(t)
at x = 3, y = 4, dx/dt = 0.4: -0.300000000000000

Numeric evidence: simulate it

We can check Example 2 without any calculus: move the foot along in tiny time steps, recompute the height from Pythagoras, and measure how fast it changes.

python · try it yourself
import math

def height(t):
    x = 3 + 0.4 * t          # foot position, t seconds after the moment x = 3
    return math.sqrt(25 - x * x)

for dt in [0.5, 0.1, 0.01, 0.001]:
    rate = (height(dt) - height(-dt)) / (2 * dt)
    print(f"dt = {dt:<6} measured dy/dt = {rate:.6f} m/s")
print("related rates:            -0.300000 m/s")
dt = 0.5    measured dy/dt = -0.300588 m/s
dt = 0.1    measured dy/dt = -0.300023 m/s
dt = 0.01   measured dy/dt = -0.300000 m/s
dt = 0.001  measured dy/dt = -0.300000 m/s
related rates:            -0.300000 m/s

Example 3: filling a conical tank

Water flows at 2 m3/min2\ \text{m}^3/\text{min} into a cone-shaped tank (point down) 6 m tall with top radius 3 m. How fast does the water level rise when the water is 4 m deep?

similar triangles: rh=36  ⟹  r=h2V=13πr2h=13π(h2)2h=πh312dVdt=πh24⋅dhdtat h=4, dVdt=2:2=4π⋅dhdt  ⟹  dhdt=12π≈0.159 m/min\begin{aligned} &\text{similar triangles: } \frac{r}{h} = \frac{3}{6} \implies r = \frac{h}{2} \\ &V = \tfrac{1}{3}\pi r^2 h = \tfrac{1}{3}\pi \left(\tfrac{h}{2}\right)^2 h = \frac{\pi h^3}{12} \\ &\frac{dV}{dt} = \frac{\pi h^2}{4} \cdot \frac{dh}{dt} \\ &\text{at } h = 4,\ \frac{dV}{dt} = 2{:} \quad 2 = 4\pi \cdot \frac{dh}{dt} \implies \frac{dh}{dt} = \frac{1}{2\pi} \approx 0.159\ \text{m/min} \end{aligned}

The trick is eliminating rr using the fixed shape before differentiating, since rr is changing too.

In software

  • Cameras and screens: an object moving at speed vv at distance zz from a camera moves on screen at roughly f⋅v/zf \cdot v/z pixels per second (differentiate the projection xscreen=f⋅x/zx_\text{screen} = f \cdot x/z). It is why distant objects seem slow and why level-of-detail systems care about screen-space velocity (projection).
  • Systems metrics: if a queue holds Q=λ⋅WQ = \lambda \cdot W requests (Little's law) and traffic λ\lambda rises by 50 requests/s250\ \text{requests/s}^2 while latency WW stays at 0.2 s, the queue grows by 0.2⋅50=100.2 \cdot 50 = 10 requests per second. Capacity planning is related rates with dashboards.
  • Physics constraints: for a rope or a pendulum rod of fixed length, differentiating ∣p1−p2∣2=L2\lvert p_1 - p_2 \rvert^2 = L^2 in time gives the velocity constraint that constraint solvers enforce every frame (distance constraints).

Exercises

Exercise 1: Inflating balloon

Air is pumped into a spherical balloon at 100 cm3/s100\ \text{cm}^3/\text{s}. How fast does the radius grow when r=5 cmr = 5\ \text{cm}? (V=43πr3V = \frac{4}{3}\pi r^3)

Answer

drdt=1π≈0.318 cm/s\frac{dr}{dt} = \frac{1}{\pi} \approx 0.318\ \text{cm/s}

Solution
dVdt=4πr2⋅drdt100=4π⋅25⋅drdt=100π⋅drdt  ⟹  drdt=1π\begin{aligned} &\frac{dV}{dt} = 4\pi r^2 \cdot \frac{dr}{dt} \\ &100 = 4\pi \cdot 25 \cdot \frac{dr}{dt} = 100\pi \cdot \frac{dr}{dt} \implies \frac{dr}{dt} = \frac{1}{\pi} \end{aligned}

Exercise 2: Two cars

Car A drives north at 60 km/h, car B drives east at 80 km/h, both starting from the same crossing at the same time. How fast is the distance between them growing after 1 hour?

Answer

100 km/h100\ \text{km/h}

Solution
a=60t, b=80t,D2=a2+b22D⋅D′=2a⋅a′+2b⋅b′at t=1:a=60, b=80, D=100D′=60⋅60+80⋅80100=3600+6400100=100 km/h\begin{aligned} &a = 60t, \ b = 80t, \quad D^2 = a^2 + b^2 \\ &2D \cdot D' = 2a \cdot a' + 2b \cdot b' \\ &\text{at } t = 1{:} \quad a = 60, \ b = 80, \ D = 100 \\ &D' = \frac{60 \cdot 60 + 80 \cdot 80}{100} = \frac{3600 + 6400}{100} = 100\ \text{km/h} \end{aligned}

(Here D=100tD = 100t all the time, so the answer is constant.)

Exercise 3: Shadow of a walker

A street lamp is 6 m high. A 1.8 m tall person walks away from it at 1.4 m/s. How fast does the tip of their shadow move?

Answer

2 m/s2\ \text{m/s} (the shadow itself lengthens at 0.6 m/s0.6\ \text{m/s}).

Solution
x=person’s distance from the lamp, s=shadow lengthsimilar triangles: 6x+s=1.8s  ⟹  6s=1.8x+1.8s  ⟹  s=1.8x4.2=3x7dsdt=37⋅1.4=0.6 m/stip position x+s:ddt=1.4+0.6=2 m/s\begin{aligned} &x = \text{person's distance from the lamp}, \ s = \text{shadow length} \\ &\text{similar triangles: } \frac{6}{x + s} = \frac{1.8}{s} \implies 6s = 1.8x + 1.8s \implies s = \frac{1.8x}{4.2} = \frac{3x}{7} \\ &\frac{ds}{dt} = \tfrac{3}{7} \cdot 1.4 = 0.6\ \text{m/s} \\ &\text{tip position } x + s{:} \quad \frac{d}{dt} = 1.4 + 0.6 = 2\ \text{m/s} \end{aligned}

Exercise 4: Check the tank numerically

Simulate the conical tank from Example 3: compute the depth h(V)=(12V/π)1/3h(V) = (12V/\pi)^{1/3} and estimate dhdt\frac{dh}{dt} when h=4h = 4 using a central difference in time. Compare with 12π\frac{1}{2\pi}.

Answer

Both are about 0.159155 m/min0.159155\ \text{m/min}.

Solution
python · try it yourself
import math

V4 = math.pi * 4**3 / 12               # volume when h = 4
h = lambda V: (12 * V / math.pi) ** (1 / 3)
dt = 1e-4
rate = (h(V4 + 2 * dt) - h(V4 - 2 * dt)) / (2 * dt)   # V changes by 2 per minute
print(round(rate, 6), round(1 / (2 * math.pi), 6))
0.159155 0.159155

Test yourself

A square's side grows at 2 cm/s. How fast does its area grow when the side is 10 cm?

  1. 20 cm2/s20\ \text{cm}^2/\text{s}
  2. 4 cm2/s4\ \text{cm}^2/\text{s}
  3. 40 cm2/s40\ \text{cm}^2/\text{s}
  4. 100 cm2/s100\ \text{cm}^2/\text{s}

When should you substitute the numerical values in a related-rates problem?

  1. Before writing the equation
  2. Before differentiating
  3. After differentiating
  4. Never

For x2+y2=25x^2 + y^2 = 25 with xx and yy depending on tt, what does differentiating with respect to tt give?

  1. 2x+2y=02x + 2y = 0
  2. 2x⋅dxdt+2y⋅dydt=02x \cdot \frac{dx}{dt} + 2y \cdot \frac{dy}{dt} = 0
  3. x⋅dxdt=y⋅dydtx \cdot \frac{dx}{dt} = y \cdot \frac{dy}{dt}
  4. dxdt+dydt=0\frac{dx}{dt} + \frac{dy}{dt} = 0