Search

Chain rule

Follow a change through nested functions by multiplying their local rates.

A change through two functions

A change in \(x\) first changes \(u\), which then changes \(y\). The chain rule multiplies these two local rates. For a small change, the idea is

\[\Delta u\approx g^{\prime}(x)\Delta x,\qquad \Delta y\approx f^{\prime}(u)\Delta u.\]

These approximations motivate the rule; they are not its proof.

Rule

Chain rule

If \(g\) is differentiable at \(x\) and \(f\) is differentiable at \(g(x)\), then

\[\frac{d}{dx}f(g(x))=f^{\prime}(g(x))g^{\prime}(x).\]

Equivalently, with \(u=g(x)\) and \(y=f(u)\),

\[\frac{dy}{dx}=\frac{dy}{du}\frac{du}{dx}.\]

Evaluate the outer derivative at the inner output, then multiply by the inner derivative.

Proof (optional)

Fix \(x=a\) and write \(b=g(a)\). Differentiability of \(f\) means we can write

\[f(b+k)-f(b)=\bigl(f^{\prime}(b)+r(k)\bigr)k,\]

where \(r(k)\to0\) as \(k\to0\). For \(k\ne0\), define \(r(k)=[f(b+k)-f(b)]/k-f^{\prime}(b)\); set \(r(0)=0\), so the identity holds at zero too.

Put \(k=g(a+h)-g(a)\). Since differentiability implies continuity, \(k\to0\) as \(h\to0\). For \(h\ne0\),

\[\frac{f(g(a+h))-f(g(a))}{h} =\bigl(f^{\prime}(b)+r(k)\bigr)\frac{g(a+h)-g(a)}h.\]

Taking limits gives \(f^{\prime}(b)g^{\prime}(a)=f^{\prime}(g(a))g^{\prime}(a)\). We never divide by \(k\) in this last step, so the argument also covers nearby inputs with no inner change.

Filling a widening tank

A conical tank is filled so its water height rises steadily: \(h(t)=1+t/2\) metres, with \(t\) in seconds. The tank’s shape gives water-surface radius \(r=h/2\), so the cone-volume formula gives

\[V=\frac13\pi r^2h=\frac{\pi h^3}{12}.\]

Time changes the height; height changes the volume. By the power rule, \(dh/dt=1/2\) and \(dV/dh=\pi h^2/4\). The chain rule connects them:

\[\frac{dV}{dt}=\frac{dV}{dh}\frac{dh}{dt} =\frac{\pi h^2}{4}\cdot\frac12=\frac{\pi h^2}{8}.\]
Water rising in a widening conical tank Drag the water surface up or down to move through time. The height rises at half a metre per second. h
\(t=\) 1.00 \(\mathrm{s}\)\(h=\) 1.50 \(\mathrm{m}\)\(V=\) 0.88 \(\mathrm{m^3}\)
\(\frac{dV}{dt}=\) 1.77 \(\mathrm{m^2}\) × \(0.5\,\mathrm{m/s}=\) 0.88 \(\mathrm{m^3/s}\)

Drag the water surface up or down. Higher up, the same rise adds more volume. The strip shows how the height rate and surface area combine to give the inflow rate.

The height rises at the same speed throughout, but the required inflow increases as the tank widens. The factor \(dV/dh\) is the water-surface area: it converts a height rate into a volume rate.

Worked examples

Example 1

A power of an expression

For \(y=(2-x^3)^5\), choose \(u=2-x^3\), then \(y=u^5\). Differentiate each stage:

\[\frac{du}{dx}=-3x^2,\qquad \frac{dy}{du}=5u^4.\]

Combine them and replace \(u\):

\[\frac{dy}{dx}=5u^4(-3x^2)=-15x^2(2-x^3)^4.\]

The outer derivative alone gives a rate with respect to \(u\); multiplying by \(du/dx\) changes it to a rate with respect to \(x\).

Example 2

More than two layers

Let \(y=\sqrt{1+(2x-1)^2}\). The layers, from inside out, are \(2x-1\), its square plus \(1\), and the square root. The chain rule applies at each layer:

\[\begin{aligned} y^{\prime} &=\frac{1}{2\sqrt{1+(2x-1)^2}}\cdot2(2x-1)\cdot2\\ &=\frac{2(2x-1)}{\sqrt{1+(2x-1)^2}}. \end{aligned}\]

The expression under the root is at least \(1\), so the function and derivative are defined for every real \(x\).

Example 3

Combine the product and chain rules

For \(x\ne-1/2\), rewrite

\[R(x)=\frac{x^2}{(1+2x)^3}=x^2(1+2x)^{-3}.\]

The product rule handles the two factors; the chain rule handles the second factor:

\[\begin{aligned} R^{\prime}(x) &=2x(1+2x)^{-3}+x^2\bigl[-3(1+2x)^{-4}\cdot2\bigr]\\ &=\frac{2x(1+2x)-6x^2}{(1+2x)^4}\\ &=\frac{2x(1-x)}{(1+2x)^4}. \end{aligned}\]

The quotient rule gives the same result if applied to the original form, using the chain rule for its denominator. The domain restriction remains.

Quiz

Calculus for Engineers and Scientists

Find a post, puzzle, or idea.