AP Calculus AB and BC
Chain Rule: Spot the Composition, Then Differentiate
The chain rule differentiates a composition like f(x) = g(h(x)) by differentiating the outer function, leaving the inside untouched, then multiplying by the derivative of the inside: g'(h(x)) times h'(x). The hard part is recognition: spotting one function nested inside another before you differentiate.
Recognition comes before the rule
The chain rule handles exactly one situation: a composition, where one function is fed into another. Written with symbols, a composition is , meaning you evaluate the inner function first and then run its output through the outer function . The rule itself is short: differentiate the outer function, leave the inside exactly as it is, then multiply by the derivative of the inside. CED Topic 3.1 introduces this as skill 1.C, choosing a procedure from how an expression is built, which is the tell that recognition matters more than memorizing the formula.
So the first question on any derivative is not how but what: is this a composition at all? Here is the test. Can you finish the derivative in one known step, a single power rule, or a single trig or exponential rule? If a function is raised to a power, the power rule ends it. If it is , one rule ends it. But is the sine of something more complicated than , and is a power of something more complicated than . That 'something more complicated' is an inner function, and its presence is the signal to reach for the chain rule.
This one rule quietly powers much of the rest of the course. Implicit differentiation (Topic 3.2) is the chain rule applied to as a function of , related rates (Topic 4.4) differentiate a composition with respect to time, and -substitution in integration runs the chain rule backward. Getting recognition solid here pays off repeatedly.
Name the outer and inner function
Every chain-rule problem starts by splitting the composition into an outer function and an inner function. The cleanest way to find them is to picture evaluating the expression at a number, say , and to watch the order of operations. Whatever you would do last is the outer function; everything you did before it is the inner function.
The last-operation test
For , you would compute first and raise to the fourth power last, so the outer function is 'raise to the fourth power' and the inner function is . For , you would compute first and take cosine last, so cosine is the outer function and is the inner.
Naming the two pieces out loud, outer is cosine, inner is , is worth the few seconds it takes. Most wrong answers on this topic come from students who start differentiating before they have decided which function is on the outside.
The three-step method
Once you can name the outer and inner functions, the procedure is always the same three steps.
- Differentiate the outer function, keeping the inner function untouched inside it.
- Differentiate the inner function on its own.
- Multiply the two results together.
The same idea in Leibniz notation, which the College Board states directly in Topic 3.1, uses for the inner function:
Read left to right, dy/du is the outer derivative and du/dx is the inner derivative. Whichever notation you use, the structure is identical: outer derivative times inner derivative. For a composition nested three or more layers deep, the pattern simply continues, one derivative factor per layer, which is why a deeply nested function like produces a product of several factors.
Trig compositions and the sin^2 trap
Trig functions are the most common outer functions you will meet in composition problems, and they carry a notation trap worth defusing now. The expressions and look almost the same and differentiate in completely different ways, because they are built differently.
| Expression | How it is built | Derivative |
|---|---|---|
| sine of (outer sine, inner ) | ||
| (outer square, inner ) |
In the outer function is sine, so its derivative is with the inside untouched, then times the inner derivative . In , which means , the outer function is squaring, so its derivative is with the inside untouched, then times the inner derivative . Same-looking notation, opposite outer functions.
The habit that keeps trig compositions clean: when you differentiate the outer trig function, its inside stays exactly as it was, and only then do you multiply by the derivative of that inside. These are the three you will use most, with standing for the inner function and its derivative:
| Outer function | Chain-rule derivative |
|---|---|
Where students lose points
Most points lost on this topic trace back to a small number of repeatable mistakes.
- Forgetting the inner derivative. Writing the derivative of as and stopping drops the factor. This is the single most common chain-rule error.
- Changing the inside while differentiating the outside. When you differentiate the outer function, the inner function stays exactly as it is: the derivative of keeps intact as , not .
- Missing a layer. A function like has three nested layers, so the chain rule fires twice. Peel one layer at a time.
- Confusing with . Read the notation before you differentiate.
- Dropping the chain rule inside a product or quotient. In the factor still needs its own chain-rule derivative .
Quick check
After every chain-rule derivative, ask: did I multiply by the derivative of the inside? If the inside was anything more complicated than , that factor must be there.
Worked examples
Worked example
A polynomial raised to a power
Differentiate .
- Spot the composition. The last thing you would do when evaluating is raise to the fourth power, so the outer function is and the inner function is , giving .
- Differentiate the outer function, leaving the inside alone. Since , we have , so .
- Differentiate the inner function: .
- Multiply the two pieces: .
Worked example
A trig composition
Differentiate .
- Spot the composition. You compute first and take cosine last, so the outer function is and the inner function is .
- Differentiate the outer function, keeping the inside intact. The derivative of is , so . Notice the inside stays exactly as ; only the cosine changes.
- Differentiate the inner function: .
- Multiply: .
Worked example
A nested composition with three layers
Differentiate .
- Read the notation first. means : the sine of , then squared. That is three functions nested together, square the sine of triple .
- Peel from the outside in. The outermost operation is squaring, so start there: the derivative of is , giving , with the inside left untouched.
- Move one layer in, to the sine. The derivative of is , so this layer contributes , again leaving its own inside untouched.
- Move to the innermost layer. The derivative of is .
- Multiply all three layers together: .
, which equals by the double-angle identity.
Frequently asked questions
How do I know whether to use the chain rule or the product rule?
Look at how the expression is built. The chain rule is for a composition, one function inside another, like . The product rule is for two functions multiplied, like . If you see a function tucked inside another function, it is the chain rule; if you see two separate factors multiplied, it is the product rule. Many problems use both, so check each piece.
Is the same as ?
No. means , so the outer function is squaring and its derivative is . means the sine of , so the outer function is sine and its derivative is . Read the notation carefully before you differentiate.
What does the chain rule look like in Leibniz notation?
If y is a function of u and u is a function of x, then dy/dx equals dy/du times du/dx. Here u is the inner function, dy/du is the outer derivative, and du/dx is the inner derivative. This is the form the AP CED lists in Topic 3.1.