Calculus I › Differentiation rules › full formula sheet
The chain rule
Derivatives of compositions multiply along the chain — peel from the outside in, and never forget the inside’s derivative.
Notation: f(g(x)) is a composition — g acts first, then f. f′(g(x)) means: differentiate f, then plug g(x) back in.
Before this lesson: Power rule · Definition of the derivative
Where it comes from
Compositions are everywhere: sin(x²), e3x, (x²+1)³ — a function inside another function. The tempting move is to differentiate just the outside: d/dx [sin(x²)] = cos(x²)?? Test it numerically at x = 1:
Before reading on: at x = 1 the naive guess cos(x²) predicts slope cos(1) ≈ 0.54. But the inside x² runs twice as fast as x there — how should that change the answer?
The intuition is gears: if y changes 3 units per unit of u, and u changes 2 units per unit of x, then y changes 3·2 = 6 units per unit of x. Rates multiply along the chain — that’s Leibniz’s dy/dx = dy/du · du/dx, and it’s the whole rule.
Derivation
Let y = f(u) with u = g(x), both differentiable. Write the change in y per change in x as a product of two rates:
Before reading on: if y changes 3 units per unit of u, and u changes 2 units per unit of x, how many units does y change per unit of x — and what operation combines the two rates?
Fine print: step 1 divides by Δu, which needs Δu ≠ 0. A fully rigorous proof handles the flat spots where Δu = 0 separately — the formula survives unchanged. These are the key steps; the bookkeeping is left to analysis courses.
How to use it
The procedure — outside in, like peeling an onion:
- Identify the layers. In sin(3x²): outer = sin(u), inner = 3x². In (x²+1)³: outer = u³, inner = x²+1.
- Differentiate the outside, keep the inside: d/du [sin u] = cos u — write cos(3x²), not cos x.
- Multiply by the inside’s derivative: × d/dx [3x²] = × 6x. Final: 6x cos(3x²).
- Nested chains repeat: sin(ex²) has three layers — peel all three, multiplying each layer’s derivative.
Leibniz form
Chain vs. product
(x²+1)³ is a chain (a function inside a power) — not a product. Ask: “is one thing plugged into another?” If yes, chain. If two things are multiplied, product.
Worked examples
Four problems, easiest first. Peel outside-in, multiply every layer.
Example 1 — d/dx [(x²+1)³]
- Layers: outer u³, inner u = x²+1.
- Outside: 3u² = 3(x²+1)² — inside kept intact.
- Inside’s derivative: 2x. Multiply: = 6x(x²+1)².
Your turn: d/dx [(x³−2)⁴]
Answer: 12x²(x³−2)³
Layers: outer u⁴, inner u = x³−2. Outside: 4u³ = 4(x³−2)³. Inside’s derivative: 3x². Multiply: 4·3x²(x³−2)³ = 12x²(x³−2)³.
Example 2 — d/dx [sin(3x)]
- Layers: outer sin u, inner u = 3x.
- Outside: cos u = cos(3x).
- Inside’s derivative: 3. Multiply: = 3 cos(3x). (Why 3? The 3x inside oscillates 3× faster, so slopes triple.)
Your turn: d/dx [cos(5x)]
Answer: −5 sin(5x)
Layers: outer cos u, inner u = 5x. Outside: −sin(5x). Inside’s derivative: 5. Multiply: −5 sin(5x). Write the minus first.
Example 3 — d/dx [ex²]
- Layers: outer eu, inner u = x².
- Outside: eu = ex² (eu is its own derivative).
- Inside’s derivative: 2x. Multiply: = 2x ex².
Your turn: d/dx [e3x²]
Answer: 6x e3x²
Layers: outer eu, inner u = 3x². Outside: e3x². Inside’s derivative: 6x. Multiply: 6x e3x².
Example 4 — d/dx [√(2x+1)] (the 2’s cancel — watch)
- Rewrite + layers: (2x+1)1/2; outer u1/2, inner u = 2x+1.
- Outside: (1/2)u−1/2 = (1/2)(2x+1)−1/2.
- Inside’s derivative: 2. Multiply: (1/2)·2·(2x+1)−1/2 = 1/√(2x+1).
The lesson: the chain factor doesn’t always survive visibly — here it cancelled the 1/2. Do the multiplication anyway; then simplify.
Your turn: d/dx [√(5x−3)]
Answer: 5/(2√(5x−3))
Rewrite: (5x−3)1/2; outer u1/2, inner u = 5x−3. Outside: (1/2)(5x−3)−1/2. Inside’s derivative: 5. Multiply: 5/(2√(5x−3)).
Memorization tips
- Outside-in, always: name the outer function, differentiate it, keep the inside frozen — then multiply by the inside’s derivative. Peel the onion.
- “Anything inside?” — ask it before you finish every derivative. It catches the forgotten ×2x every time.
- Leibniz form for setup: set u = inside, write dy/dx = dy/du · du/dx, compute the two easy rates, multiply. Great for messy innards.
- Nested = repeat: sin(ex²) peels three deep: cos(ex²) · ex² · 2x. Count your multiplications: three layers, three factors.
- Chain vs. product test: “plugged into” → chain; “multiplied by” → product. (x²+1)³ is plugged-in; x² sin x is multiplied.
- Keep the inside intact: d/dx [sin(3x)] = 3 cos(3x), not 3 cos x. The outside differentiates; the inside only contributes its rate.
Final challenge
Five mixed questions — nested chains, Leibniz form, and the forgotten-inside trap. Score 5/5 and the rule is yours.
← Back to the Calculus I formula sheet
How to learn a formula here
- Read each section in order — every section ends with a short quiz. Take it before moving on; the questions test exactly what you just read.
- Work the examples with the answers covered, then uncover one step at a time and compare.
- Finish with the final challenge — five mixed questions including the classic traps.
- Retake what you miss — every quiz reshuffles each attempt, and every answer explains itself.
Frequently asked questions
What is the chain rule?
The chain rule says d/dx[f(g(x))] = f′(g(x))·g′(x): differentiate the outside (keeping the inside), then multiply by the inside’s derivative. In Leibniz form: dy/dx = dy/du · du/dx.
Why do we multiply by the inside’s derivative?
Rates multiply along the chain — the gear intuition. If the inside runs twice as fast (x² near x = 1), every downstream rate doubles. Forgetting ×2x at x = 1 gives 0.54 instead of the true 1.08.
How do I spot a chain-rule problem?
Look for one function plugged into another: sin(x²), e^(3x), (x²+1)³, √(2x+1). Ask “is something inside something else?” — yes means chain.
What’s the most common chain-rule mistake?
Stopping after the outside: writing d/dx[(x²+1)³] = 3(x²+1)² without the ×2x. Always finish with “anything inside?” before boxing the answer.
How do nested chains like sin(e^(x²)) work?
Peel every layer outside-in, multiplying each layer’s derivative: cos(e^(x²)) · e^(x²) · 2x. Three layers → three factors. Miss one and the answer is wrong.
More from the codex
Support the codex
This page is free, with no account and no ads. If it helped you learn, consider supporting the indie dev behind it.
Questions or a bug to report? Email [email protected].