The Chain Rule
The chain rule differentiates a composite — a function
inside another function, like (3x + 1)^5. Here
an inner function g(x) = 3x + 1 feeds an outer function
f(u) = u^5. The rule:
\frac{d}{dx}\,f\!\big(g(x)\big) = f'\!\big(g(x)\big)\cdot g'(x)
In words: differentiate the outer function (leaving the inner one alone), then
multiply by the derivative of the inner function. Work from the outside in, and
multiply as you peel.
Why: rates multiply
Think of two linked gears. If the first gear turns 3 times for
every turn of the input, and the second turns 5 times for every
turn of the first, then the second turns 5 \times 3 = 15 times per
input turn. Rates of change multiply down a chain.
That's the chain rule. In Leibniz notation it reads almost like cancelling fractions, which
is exactly the intuition:
\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}
Drag the gear ratios below: the inner rate g' and the outer rate
f' multiply to give the overall rate
\frac{dy}{dx}.
A worked example
Differentiate y = (3x + 1)^5. Identify the layers:
- outer: f(u) = u^5, so by the
power rule
f'(u) = 5u^4;
- inner: g(x) = 3x + 1, so
g'(x) = 3.
Differentiate the outer (keeping the inner intact), then multiply by the inner's derivative:
\frac{dy}{dx} = 5\,(3x + 1)^4 \cdot 3 = 15\,(3x + 1)^4
The lonely \cdot 3 at the end is the whole point of the chain
rule — forget it and you'd be off by that factor. That extra factor is precisely the inner
gear's rate.
Nested machines
Another way to see it: a composite is two machines wired in series. The input
x runs through the inner machine
g, and that output runs through the outer machine
f. A small nudge at the input is amplified by
g', then amplified again by f' — the
two amplifications multiply.
Watch Sal explain it
Spotting the inner and outer functions is the skill to practise; the rest is one
multiplication. Here is the chain rule introduced: