Resources For Teachers For Tutors For Students & Parents Pricing
Year 12 Maths - Methods (Unit 3 & Unit 4) Differentiation

The chain rule

20 practice questions 0 video lessons Theory + worked examples
Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

The chain rule differentiates a composite function — a function of a function. If \(y=g(u)\) where \(u=f(x)\), then \(\dfrac{dy}{dx}=\dfrac{dy}{du}\times\dfrac{du}{dx}\): differentiate the outer function, then multiply by the derivative of the inside. It extends every standard derivative to powers, exponentials, logarithms and trig composites — the one thing never to forget is the inner factor \(f'(x)\).

A composite function is built in two stages: first \(x\mapsto u=f(x)\) (the inner function), then \(u\mapsto y=g(u)\) (the outer function). For example \(y=(3x^2+1)^5\) has inner \(u=3x^2+1\) and outer \(y=u^5\); \(y=e^{x^2}\) has inner \(x^2\) and outer \(e^{u}\).

The chain rule says the overall rate of change is the product of the rate of each stage: \(\dfrac{dy}{dx}=\dfrac{dy}{du}\times\dfrac{du}{dx}\). In practice this means: differentiate the outer function (leaving the inside alone), then multiply by the derivative of the inside, \(f'(x)\).

Applied to the standard functions it gives \(\dfrac{d}{dx}(f)^n=n(f)^{n-1}f'\), \(\dfrac{d}{dx}e^{f}=f'e^{f}\), \(\dfrac{d}{dx}\ln f=\dfrac{f'}{f}\), \(\dfrac{d}{dx}\sin f=f'\cos f\) and \(\dfrac{d}{dx}\cos f=-f'\sin f\). Answers should be written in simplest and factorised form.

Key idea. Differentiate the outside, then multiply by the derivative of the inside: \(\dfrac{dy}{dx}=\dfrac{dy}{du}\times\dfrac{du}{dx}\). Never drop the inner factor \(f'(x)\).
The two-stage composite x to u to yx maps to u equals f of x by the inner rate du/dx, then u maps to y equals g of u by the outer rate dy/du; the chain rule multiplies the two rates. x u = f(x) y = g(u) du/dx dy/du dy/dx = (dy/du) x (du/dx)
A composite differentiates stage by stage: multiply \(\dfrac{dy}{du}\) by \(\dfrac{du}{dx}\)
Tangent to y=sin(2x) at the originThe curve y equals sin(2x) through the origin with its tangent line of gradient 2, found by the chain rule. x y m = 2
A tangent gradient from the chain rule: \(\dfrac{d}{dx}\sin(2x)=2\cos(2x)=2\) at \(x=0\)

The chain rule (Leibniz form) for a composite \(y=g(u)\), \(u=f(x)\):

\[\frac{dy}{dx}=\frac{dy}{du}\times\frac{du}{dx}\]
dydx=dydu×dudx

Power of a function (reduce the index, then multiply by \(f'\)):

\[\frac{d}{dx}\big(f(x)\big)^{n}=n\big(f(x)\big)^{n-1}\,f'(x)\]
ddx(f)n=n(f)n-1f

Exponential and logarithmic composites:

\[\frac{d}{dx}e^{f(x)}=f'(x)\,e^{f(x)}\qquad \frac{d}{dx}\ln\big(f(x)\big)=\frac{f'(x)}{f(x)}\]
ddxef=fef

Trigonometric composites:

\[\frac{d}{dx}\sin\big(f(x)\big)=f'(x)\cos\big(f(x)\big)\qquad \frac{d}{dx}\cos\big(f(x)\big)=-f'(x)\sin\big(f(x)\big)\]
ddxsin(f)=fcos(f)
Factorise. After applying the rule, take out any common factor, e.g. \(\dfrac{d}{dx}(e^{x}+1)^{3}=3e^{x}(e^{x}+1)^{2}\).

How to apply the chain rule

  1. Spot the composite. Identify the inner function \(u=f(x)\) and the outer function \(y=g(u)\).
  2. Differentiate the outer. Find \(\dfrac{dy}{du}\), leaving the inside unchanged (e.g. \(\dfrac{d}{du}u^{n}=nu^{n-1}\), \(\dfrac{d}{du}e^{u}=e^{u}\)).
  3. Differentiate the inner. Find \(\dfrac{du}{dx}=f'(x)\) — this is the factor most often forgotten.
  4. Multiply and factorise. \(\dfrac{dy}{dx}=\dfrac{dy}{du}\times\dfrac{du}{dx}\); write \(u\) back in terms of \(x\) and take out any common factor.
Tangent check. To find a gradient or tangent at \(x=a\), differentiate with the chain rule, then substitute \(x=a\) into \(\dfrac{dy}{dx}\).
Example 1 — power of a polynomial
Differentiate \(y=(3x^2+1)^5\).
Solution

Composite: inner \(u=3x^2+1\), outer \(y=u^{5}\).

Differentiate the inner:
\(\dfrac{du}{dx}\)\(=\)\(6x\)
Differentiate the outer:
\(\dfrac{dy}{du}\)\(=\)\(5u^{4}\)
\(=\)\(5(3x^2+1)^{4}\)
Multiply and factorise, using \(\dfrac{dy}{dx}=\dfrac{dy}{du}\times\dfrac{du}{dx}\):
\(\dfrac{dy}{dx}\)\(=\)\(5(3x^2+1)^{4}\times 6x\)
\(=\)\(30x(3x^2+1)^{4}\)
\(\therefore\ \dfrac{dy}{dx}=30x(3x^2+1)^{4}\)
30x(3x2+1)4
Example 2 — exponential \(e^{f(x)}\)
Differentiate \(y=e^{x^2}\).
Solution

Composite: inner \(u=x^{2}\), outer \(y=e^{u}\).

Differentiate the inner:
\(\dfrac{du}{dx}\)\(=\)\(2x\)
Differentiate the outer (the exponential is unchanged):
\(\dfrac{dy}{du}\)\(=\)\(e^{u}\)
\(=\)\(e^{x^2}\)
Multiply, using \(\dfrac{dy}{dx}=\dfrac{dy}{du}\times\dfrac{du}{dx}\):
\(\dfrac{dy}{dx}\)\(=\)\(e^{x^2}\times 2x\)
\(=\)\(2x\,e^{x^2}\)
\(\therefore\ \dfrac{dy}{dx}=2x\,e^{x^2}\)
2xex2
Example 3 — logarithm \(\ln(f(x))\)
Differentiate \(y=\ln(4x^2+1)\).
Solution

Composite: inner \(u=4x^{2}+1\), outer \(y=\ln u\).

Differentiate the inner:
\(\dfrac{du}{dx}\)\(=\)\(8x\)
Differentiate the outer, using \(\dfrac{d}{du}\ln u=\dfrac{1}{u}\):
\(\dfrac{dy}{du}\)\(=\)\(\dfrac{1}{u}\)
\(=\)\(\dfrac{1}{4x^2+1}\)
Multiply, using \(\dfrac{dy}{dx}=\dfrac{dy}{du}\times\dfrac{du}{dx}\):
\(\dfrac{dy}{dx}\)\(=\)\(\dfrac{1}{4x^2+1}\times 8x\)
\(=\)\(\dfrac{8x}{4x^2+1}\)
\(\therefore\ \dfrac{dy}{dx}=\dfrac{8x}{4x^2+1}\)
8x4x2+1
Example 4 — trig composite & a tangent
Find the gradient of \(y=\sin(2x)\) at \(x=0\), and the tangent there.
Solution

Composite: inner \(u=2x\), outer \(y=\sin u\).

Differentiate the inner:
\(\dfrac{du}{dx}\)\(=\)\(2\)
Differentiate the outer, using \(\dfrac{d}{du}\sin u=\cos u\):
\(\dfrac{dy}{du}\)\(=\)\(\cos u\)
\(=\)\(\cos(2x)\)
Multiply for \(\dfrac{dy}{dx}\):
\(\dfrac{dy}{dx}\)\(=\)\(\cos(2x)\times 2\)
\(=\)\(2\cos(2x)\)
Gradient — substitute \(x=0\):
\(\left.\dfrac{dy}{dx}\right|_{x=0}\)\(=\)\(2\cos 0\)
\(=\)\(2\)
Tangent — through \((0,0)\) with gradient \(2\), use \(y-y_{1}=m(x-x_{1})\):
\(y-0\)\(=\)\(2(x-0)\)
\(y\)\(=\)\(2x\)
\(\therefore\) Gradient \(=2\); tangent: \(y=2x\)
y=2x

Common pitfalls

Do not drop the inner factor. \(\dfrac{d}{dx}e^{4x}=4e^{4x}\), not \(e^{4x}\); \(\dfrac{d}{dx}(3x+2)^{5}=15(3x+2)^{4}\), not \(5(3x+2)^{4}\). The derivative of the inside always multiplies.
Reduce the index by one. For a power, use \(n(f)^{n-1}\), not \(n(f)^{n}\): \(\dfrac{d}{dx}(2x-1)^{4}=8(2x-1)^{3}\).
Mind the \(\cos\) sign. \(\dfrac{d}{dx}\cos\big(f(x)\big)=-f'(x)\sin\big(f(x)\big)\); the minus sign is part of the rule.

Frequently asked questions

What is the chain rule?

It differentiates a composite \(y=g(u)\), \(u=f(x)\): \(\dfrac{dy}{dx}=\dfrac{dy}{du}\times\dfrac{du}{dx}\). Differentiate the outer function, then multiply by the derivative of the inside.

How do you differentiate a power of a polynomial?

Use \(\dfrac{d}{dx}(f)^n=n(f)^{n-1}f'\). For example \(\dfrac{d}{dx}(3x^2+1)^5=5(3x^2+1)^4\times 6x=30x(3x^2+1)^4\).

How do you differentiate \(e^{f(x)}\)?

\(\dfrac{d}{dx}e^{f(x)}=f'(x)e^{f(x)}\): the exponential is unchanged and you multiply by the derivative of the exponent, e.g. \(\dfrac{d}{dx}e^{x^2}=2x\,e^{x^2}\).

How do you differentiate \(\ln(f(x))\)?

\(\dfrac{d}{dx}\ln(f(x))=\dfrac{f'(x)}{f(x)}\), e.g. \(\dfrac{d}{dx}\ln(4x^2+1)=\dfrac{8x}{4x^2+1}\).

How do you differentiate \(\sin\) and \(\cos\) of a function?

\(\dfrac{d}{dx}\sin(f)=f'\cos(f)\) and \(\dfrac{d}{dx}\cos(f)=-f'\sin(f)\), e.g. \(\dfrac{d}{dx}\sin(2x)=2\cos(2x)\).

What is the most common mistake?

Forgetting the inner factor \(f'(x)\). Always multiply by the derivative of the inside, and then factorise the result.