Short answer: the chain rule differentiates a function inside another function: if y = f(g(x)), then dy/dx = f′(g(x)) · g′(x). In words: differentiate the outside, keep the inside unchanged, then multiply by the derivative of the inside.
How to spot a chain-rule problem
Ask: "Is there something other than plain x inside a bracket, a root, an exponent or a trig function?" If yes, you need the chain rule. sin x does not need it; sin(3x²) does. ex does not; e5x−1 does.
A reliable method is to name the layers before you differentiate:
- Write the inside as u (for example u = 3x²).
- Differentiate the outside as if u were x (d/du sin u = cos u).
- Multiply by du/dx (6x).
- Substitute u back: cos(3x²) · 6x = 6x cos(3x²).
If you are unsure whether the product or quotient rule is needed instead, read Chain rule, product rule or quotient rule? first.
Worked problems
Problem 1: y = (4x − 7)5
Outside: u5 → 5u4. Inside: u = 4x − 7 → u′ = 4.
dy/dx = 5(4x − 7)4 · 4 = 20(4x − 7)4.
Problem 2: y = √(x² + 1)
Rewrite: (x² + 1)1/2. Outside → ½u−1/2. Inside derivative: 2x.
dy/dx = ½(x² + 1)−1/2 · 2x = x / √(x² + 1).
Problem 3: y = esin x
Outside: eu → eu. Inside: sin x → cos x.
dy/dx = cos x · esin x.
Problem 4: y = ln(3x² + 2x)
Outside: ln u → 1/u. Inside derivative: 6x + 2.
dy/dx = (6x + 2) / (3x² + 2x).
Problem 5 (three layers): y = sin³(2x)
Layers: cube of sine of 2x, i.e. [sin(2x)]³. Work outside in:
- Cube: 3[sin(2x)]²
- Sine: cos(2x)
- Inside: 2
dy/dx = 3 sin²(2x) · cos(2x) · 2 = 6 sin²(2x) cos(2x).
Problem 6 (chain + product): y = x² · cos(5x)
Product rule first: (x²)′cos(5x) + x²(cos 5x)′. The second derivative needs the chain rule: (cos 5x)′ = −5 sin(5x).
dy/dx = 2x cos(5x) − 5x² sin(5x).
Mistakes that cost marks
- Forgetting the inner derivative. d/dx sin(4x) is 4cos(4x), not cos(4x). This is the single most common error.
- Changing the inside. d/dx (x³ + 1)² is 2(x³ + 1) · 3x², not 2(3x²).
- Stopping one layer early on three-layer functions like sin³(2x).
- Misreading notation: sin²x means (sin x)², while sin(x²) has x² inside.
Practice section
Try these on paper before checking the answers below.
- y = (2x + 3)6
- y = cos(x³)
- y = e−4x
- y = ln(cos x)
- y = √(1 − x²)
Show answers
- 12(2x + 3)5
- −3x² sin(x³)
- −4e−4x
- −tan x
- −x / √(1 − x²)
Then test yourself with the 10-question quiz below. If you keep missing the same type of question, the free calculus diagnostic shows which topics are costing you marks. More background: derivatives topic page and calculus readiness check.