Most functions you meet are built by nesting one function inside another. The chain rule
is the single tool that differentiates all of them — and almost everything in Unit 3 leans on it.
All it assumes are the basic rules from Unit 2.
A composite function is a function inside a function: \(f(g(x))\). To differentiate it, take the derivative of the outer function — leaving the inner one untouched — and then multiply by the derivative of the inner function. Why multiply? Because rates compound: if the inner \(u=g(x)\) changes twice as fast as \(x\), and the outer \(y=f(u)\) changes three times as fast as \(u\), then \(y\) changes \(3 imes 2=6\) times as fast as \(x\).
A function inside a function
The skill here isn’t reading off an answer — it’s learning to spot the pieces yourself.
Here’s the trick: imagine plugging in a number. The last operation you’d carry out is the
outer function; everything feeding into it is the
inner. Try it on each one.
1 of 6
Score: 0 / 0
Which is the inner function?
Why you multiply the rates
Here is \(y=\sin(2x)\): an outer \(\sin\) wrapped around an inner \(2x\). Drag the point along the curve.
The tangent slope you read off the graph is always exactly the product of the two rates —
the outer rate \(f'(u)=\cos u\) times the inner rate \(g'(x)=2\).
inner value \(u=2x\)
inner rate \(g'(x)=2\)2
outer rate \(f'(u)=\cos u\)
product \(f'(u)\cdot g'(x)\)
tangent slope on the graph
The rule, written down
In words: the derivative of the outside (with the inside left in place), times the derivative of the inside. The Leibniz form below says the same thing — the \(du\)’s “cancel,” a memory aid that becomes literal once you meet related rates.
Differentiate, step by step
Watch the chain rule applied to \(y=(x^2+1)^5\). Press step to advance.
press step
Chains within chains
When a function is nested three deep, you keep peeling — differentiate each layer in turn
and multiply them all together. Take \(y=\sin^2(3x)\), which is really \(\big(\sin(3x)\big)^2\): a square, around a sine, around \(3x\).
The whole idea on one card
Spot the composite: an outer function \(f\) wrapped around an inner function \(g(x)\)
Differentiate the outer, leaving the inner exactly where it is
Multiply by the derivative of the inner — the step everyone forgets
In Leibniz form the rates chain together, link by link
The ideas everything else builds on
Outside, then in
Differentiate the outer function first (inner left alone), then the inner.
The inner stays put inside the outer derivative — don’t simplify it away.
Chains nest
Three layers? Keep peeling, multiplying each layer’s derivative.
Your turn
Quick quiz
Eight fast checks across the whole lesson.
Question 1 of 8
Score: 0 / 0
Common mistakes & exam tips
Forgetting the inner derivative
The single most common error. \(\frac{d}{dx}(2x+1)^5\) is not \(5(2x+1)^4\) — you must multiply by the inner derivative \(2\), giving \(10(2x+1)^4\).
Simplifying the inner inside the outer derivative
In \(5(x^2+1)^4\) the inner \(x^2+1\) stays exactly as written. Don’t differentiate it in place; its derivative appears as a separate factor.
Confusing the chain rule with the product rule
\(f(x)\,g(x)\) is a product (use the product rule); \(f(g(x))\) is a composite (use the chain rule). Ask: are two functions multiplied, or is one inside the other?
Dropping the chain on trig, exp, and log
\(\frac{d}{dx}\sin(3x)=3\cos(3x)\), not \(\cos(3x)\). The inner \(3x\) still contributes its derivative \(3\).
Adding the derivatives instead of multiplying
The chain rule multiplies the outer and inner rates; it never adds them. \(f'(g(x))+g'(x)\) is meaningless here.
On the AP exam
When you see a function inside another — a power of a binomial, \(\sin\) of something, \(e\) to a something — reach for the chain rule.
The lost-point trap is the missing inner derivative. After differentiating the outer, always ask “times the derivative of the inside?”
The Leibniz form \(\frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dx}\) makes the chain explicit — it’s the setup you’ll reuse for related rates.
For nested chains, peel one layer at a time and keep a running product; don’t try to do it all in one move.
You can now differentiate anything built by nesting. Next: what happens when \(y\) is tangled up with \(x\)
and won’t come loose — you differentiate implicitly, applying the chain rule to every \(y\)-term.
Implicit Differentiation is next — or head back to the
Unit 3 Guide.