§ 01What Is a Composite Function?
Before you can apply the chain rule, you need to recognise when you have a composite function. That is the only real skill this page teaches, everything else follows automatically.
A composite function is simply a function inside another function. When you see sin(x²), the x² is sitting inside the sine. When you see e^(3x), the 3x is sitting inside the exponential. The chain rule is the rule for differentiating exactly these situations.
The crucial thing to get comfortable with is identifying the two layers:
e^(3x) outer: e^(□) inner: 3x
(x²+1)⁵ outer: (□)⁵ inner: x²+1
ln(cos x) outer: ln(□) inner: cos x
√(2x+3) outer: √(□) inner: 2x+3
If you can write a function as f(g(x)), something applied to something else, it is composite and needs the chain rule.
§ 02The Formula — and Why It Works
The chain rule has two equivalent forms. Both say the same thing; which one you use depends on what feels natural. We derive both from scratch.
Form 1 — Function notation (f and g)
If y = f(g(x)), then:
In plain English: differentiate the outer function (leaving the inner unchanged), then multiply by the derivative of the inner function.
Form 2 — Leibniz notation (u substitution)
If y = f(u) and u = g(x), then:
This form looks like a fraction cancelling, the du's appear to cancel. That is not a rigorous justification, but it is a useful memory aid. The Leibniz form is particularly helpful in longer problems where you want to track each step explicitly.
Why it works — an intuitive argument
Suppose x changes by a tiny amount Δx. This causes u = g(x) to change by roughly Δu ≈ (du/dx)·Δx. That change in u then causes y = f(u) to change by roughly Δy ≈ (dy/du)·Δu. Substituting:
A small change in x causes a change in u:
Δu ≈ (du/dx) · ΔxThat change in u causes a change in y:
Δy ≈ (dy/du) · ΔuSubstitute the first into the second:
Δy ≈ (dy/du) · (du/dx) · ΔxDivide both sides by Δx and take the limit as Δx → 0:
dy/dx = dy/du · du/dx The formal proof uses limits carefully to handle the case du = 0, but this argument shows exactly why the chain rule has the structure it does. The rates of change chain together — hence the name.§ 03The Inside/Outside Method — 3 Steps
For most chain rule problems you can work quickly with three mental steps. You do not need to introduce u formally unless the problem is complex.
Ask: what is the last operation applied? That is the outer function. What is inside it? That is the inner function.
Apply the usual rule to the outer function, but leave the inner function completely untouched inside.
Differentiate the inner function on its own, then multiply the whole thing by it.
Three quick examples
Inner: 3x + 2 → derivative: 3
Result: 4(3x+2)³ · 3 = 12(3x+2)³
Inner: 5x → derivative: 5
Result: cos(5x) · 5 = 5 cos(5x)
Inner: x² → derivative: 2x
Result: e^(x²) · 2x = 2x·e^(x²)
§ 04All the Notation Forms You Will Encounter
Different textbooks write the chain rule in different ways. They all mean exactly the same thing. This table shows every form so nothing surprises you in an exam.
| Form | What it says | When to use it |
|---|---|---|
| dy/dx = dy/du · du/dx | Leibniz chain — rates multiply | Long problems; makes each step visible |
| d/dx[f(g(x))] = f′(g(x))·g′(x) | Function notation — outer prime at inner, times inner prime | Quick work; most common in proofs |
| y′ = f′(u)·u′ | Prime notation with u substitution | Compact; common in textbooks |
| [outer deriv, inner untouched] × [inner deriv] | The inside/outside method in words | Mental arithmetic on simple forms |
Using u-substitution explicitly
For harder problems it helps to introduce u formally. Write u = inner function, express y in terms of u, find dy/du and du/dx separately, then multiply. This avoids errors in complex cases.
Let u = x² + 3x (the inner function). Then y = u⁷.
Find dy/du using the power rule on u⁷:
dy/du = 7u⁶Find du/dx:
du/dx = 2x + 3Multiply and substitute u back:
dy/dx = 7u⁶ · (2x+3) = 7(x²+3x)⁶ · (2x+3)§ 05Twelve Worked Exercises
Work each problem yourself before revealing the answer. The groups escalate from straightforward power composites to nested functions and combined rules.
Group A — Power and Polynomial Composites (Exercises 1–4)
- Outer function: (□)³. Inner function: 4x − 1.
- Differentiate the outer, leaving the inner untouched: 3(4x − 1)²
- Differentiate the inner: d/dx[4x − 1] = 4.
- Multiply: dy/dx = 3(4x−1)² · 4 = 12(4x−1)²
- Outer: (□)⁴, inner: x² + 5.
- Outer derivative (inner untouched): 4(x² + 5)³.
- Inner derivative: d/dx[x² + 5] = 2x.
- Multiply: dy/dx = 4(x²+5)³ · 2x = 8x(x²+5)³
- Rewrite: y = (3x+2)^(1/2). Outer: (□)^(1/2), inner: 3x+2.
- Outer derivative (inner untouched): (1/2)(3x+2)^(−1/2).
- Inner derivative: 3.
- Multiply: dy/dx = (1/2)(3x+2)^(−1/2) · 3 = 3 / (2√(3x+2)) dy/dx = 3 / (2√(3x+2))
- Outer: (□)⁵, inner: 2x³ − x.
- Outer derivative (inner untouched): 5(2x³−x)⁴.
- Inner derivative: 6x² − 1.
- Multiply and factorise: dy/dx = 5(2x³−x)⁴ · (6x²−1)
Group B — Trig and Exponential Composites (Exercises 5–8)
- Outer: sin(□), inner: 3x².
- Outer derivative (inner untouched): cos(3x²). The inner function stays inside, do not differentiate it yet.
- Inner derivative: 6x.
- Multiply: dy/dx = cos(3x²) · 6x = 6x cos(3x²)
- Outer: e^(□), inner: x³ − 2x.
- Key fact: d/du[eᵘ] = eᵘ. So the outer derivative leaves e^(x³−2x) unchanged: Outer deriv (inner untouched): e^(x³−2x)
- Inner derivative: 3x² − 2.
- Multiply: dy/dx = e^(x³−2x) · (3x²−2) = (3x²−2)e^(x³−2x)
- Write y = (cos x)². Outer: (□)², inner: cos x.
- Outer derivative (inner untouched): 2(cos x)¹ = 2 cos x.
- Inner derivative: d/dx[cos x] = −sin x.
- Multiply: dy/dx = 2 cos x · (−sin x) = −2 sin x cos x
- Recognise the double angle identity: 2 sin x cos x = sin(2x): dy/dx = −sin(2x) This result is used often, the derivative of cos²x equals −sin(2x), which also equals d/dx[½(1 + cos 2x)] by the double-angle substitution. ✓
- Outer: tan(□), inner: eˣ.
- Outer derivative (inner untouched): sec²(eˣ). Recall d/du[tan u] = sec²u.
- Inner derivative: d/dx[eˣ] = eˣ.
- Multiply: dy/dx = sec²(eˣ) · eˣ = eˣ sec²(eˣ)
Group C — Combined Rules and Nested Functions (Exercises 9–12)
- Product rule: u = x², v = e^(sin x). So u′ = 2x.
- Find v′ using the chain rule on e^(sin x). Outer: e^(□), inner: sin x: v′ = e^(sin x) · cos x
- Apply product rule u′v + uv′: dy/dx = 2x · e^(sin x) + x² · e^(sin x) · cos x
- Factorise the common factor x · e^(sin x): dy/dx = x·e^(sin x) · (2 + x cos x)
- Outer: ln(□), inner: x² + 1.
- Outer derivative (inner untouched): 1/(x² + 1). Recall d/du[ln u] = 1/u.
- Inner derivative: 2x.
- Multiply: dy/dx = 2x / (x² + 1)
- Write y = (sin(3x))². Three layers: (□)² wrapping sin(□) wrapping 3x.
- Outer derivative (leaving the rest untouched): 2 sin(3x).
- Now differentiate sin(3x), this is itself a chain rule. Outer sin(□), inner 3x: d/dx[sin(3x)] = cos(3x) · 3 = 3 cos(3x)
- Multiply everything: dy/dx = 2 sin(3x) · 3 cos(3x) = 6 sin(3x) cos(3x)
- Recognise 2 sin A cos A = sin(2A): dy/dx = 3 sin(6x)
- Let u = 1 + x² and v = √u = u^(1/2), so y = eᵛ.
- dy/dv = eᵛ = e^(√(1+x²)).
- dv/du = (1/2)u^(−1/2) = 1/(2√(1+x²)).
- du/dx = 2x.
- Chain all three together: dy/dx = dy/dv · dv/du · du/dx: = e^(√(1+x²)) · 1/(2√(1+x²)) · 2x
- Simplify: the 2 and 2 cancel: dy/dx = x·e^(√(1+x²)) / √(1+x²)
§ 06Common Mistakes
These errors appear in almost every set of chain rule exam scripts. Knowing them in advance is a genuine advantage.
Wrong: d/dx[sin(3x)] = cos(3x)
Correct: d/dx[sin(3x)] = cos(3x) · 3 = 3 cos(3x). The chain rule always requires that final multiplication. If you stop after differentiating the outer, you have only done half the job.
Wrong: d/dx[(x²+1)⁵] → starts by writing 5(2x)⁴ · 2x, substituting 2x (the inner derivative) before the outer derivative step
Correct: Outer derivative step: 5(x²+1)⁴. Then separately compute the inner derivative 2x. Multiply: 5(x²+1)⁴ · 2x = 10x(x²+1)⁴. Keep the two steps cleanly separate.
d/dx[sin(x)] does not need the chain rule: x is already the variable and there is no inner function to differentiate. The chain rule is only for composite functions where something other than x sits inside the outer function.
sin(x²) needs the chain rule (x² is inside sine (a composite). But x · sin(x) needs the product rule (two functions multiplied) not composite). The test: can you write it as f(g(x))? If yes, chain. If it is f(x) · g(x), product.
For y = sin²(3x), you need to apply the chain rule twice: once for the square, and again for the sin(3x) inside. After 2 sin(3x) · [derivative of sin(3x)], you must still compute d/dx[sin(3x)] = 3 cos(3x). A common slip is to write just cos(3x) and miss the factor of 3.
§ 0710-Question Quiz
Select one answer per question then press Submit to see your score with full explanations.