Calculus I › Differentiation rules › full formula sheet

d/dx [f(g(x))] = f′(g(x)) · g′(x)

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?

naive: cos(x²) at x=1
=
cos(1) ≈ 0.54
Differentiated the sine, ignored the x² inside.
true (definition)
=
2cos(1) ≈ 1.08
The x² inside runs twice as fast as x near x = 1, doubling every rate. Off by 2× — dead on arrival.

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?

Δy/Δx
=
(Δy/Δu) · (Δu/Δx)
Step 1 — the gear split. Let Δu = g(x+h)−g(x), Δy = f(u+Δu)−f(u). Then Δy/Δx = (Δy/Δu)(Δu/Δx) — the Δu’s cancel (for Δu ≠ 0).
dy/dx
=
limh→0 (Δy/Δu) · limh→0 (Δu/Δx)
Step 2 — split the limit. Legal when both pieces converge (they do — f and g are differentiable).
=
f′(u) · g′(x)
Step 3 — recognize the derivatives. As h → 0, Δu → 0 too (g is continuous), so Δy/Δu → f′(u) — the derivative of f at the inner value u = g(x). ∎

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:

  1. Identify the layers. In sin(3x²): outer = sin(u), inner = 3x². In (x²+1)³: outer = u³, inner = x²+1.
  2. Differentiate the outside, keep the inside: d/du [sin u] = cos u — write cos(3x²), not cos x.
  3. Multiply by the inside’s derivative: × d/dx [3x²] = × 6x. Final: 6x cos(3x²).
  4. Nested chains repeat: sin(ex²) has three layers — peel all three, multiplying each layer’s derivative.

Leibniz form

dy/dx = dy/du · du/dxSay it: the derivative of y with respect to x equals the derivative of y with respect to u times the derivative of u with respect to x

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.

Common mistake: stopping after the outside: d/dx [(x²+1)³] = 3(x²+1)² and done. The ×2x is missing — always ask “anything inside?” before you finish.

Worked examples

Four problems, easiest first. Peel outside-in, multiply every layer.

Example 1 — d/dx [(x²+1)³]

  1. Layers: outer u³, inner u = x²+1.
  2. Outside: 3u² = 3(x²+1)² — inside kept intact.
  3. Inside’s derivative: 2x. Multiply: = 6x(x²+1)².
Common mistake: writing 3(x²+1)² and stopping. Plug x = 0: true slope 0, the stopped answer gives 3. The ×2x matters.
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)]

  1. Layers: outer sin u, inner u = 3x.
  2. Outside: cos u = cos(3x).
  3. Inside’s derivative: 3. Multiply: = 3 cos(3x). (Why 3? The 3x inside oscillates 3× faster, so slopes triple.)
Common mistake: answering cos(3x). The inside runs at speed 3, not 1 — every rate triples.
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²]

  1. Layers: outer eu, inner u = x².
  2. Outside: eu = ex² (eu is its own derivative).
  3. Inside’s derivative: 2x. Multiply: = 2x ex².
Common mistake: answering ex² — treating it like plain ex. The exponent has an x² in it; the ×2x is mandatory.
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)

  1. Rewrite + layers: (2x+1)1/2; outer u1/2, inner u = 2x+1.
  2. Outside: (1/2)u−1/2 = (1/2)(2x+1)−1/2.
  3. 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.

Common mistake: “simplifying” (1/2)(2x+1)−1/2 without the ×2, getting 1/(2√(2x+1)). The inside’s derivative is part of the answer, not optional garnish.
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

  1. 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.
  2. Work the examples with the answers covered, then uncover one step at a time and compare.
  3. Finish with the final challenge — five mixed questions including the classic traps.
  4. 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