Chain Rule (AA SL)
The chain rule handles composite functions - one function nested inside another, like \((3x^2+1)^4\) or \(\cos(3x^2)\). It's one of the most heavily tested pieces of calculus in the course, because it shows up inside almost every harder differentiation question. This page covers the formula, worked examples, and the mistake that loses the most marks. It's part of the broader Differentiation topic.
16 questions on this sub-topic.
The formula
Covered under IB syllabus reference SL5.6, which lists the chain rule for composite functions alongside the derivatives of \(x^n\), \(\sin x\), \(\cos x\), \(e^x\) and \(\ln x\).
Chain rule
\[\dfrac{dy}{dx}=\dfrac{dy}{du}\times\dfrac{du}{dx}\]
Differentiate the outer function, then multiply by the derivative of the inner function.
✓ In the formula bookletPower rule (as a reminder)
\[\dfrac{d}{dx}(ax^n) = anx^{n-1}\]
You'll need this for the "outer function" step whenever the composite is a bracket raised to a power, such as \((3x^2+1)^4\).
Not in the formula bookletNeed the full derivative and integral reference table? See Differentiation.
Worked examples
Differentiate \(y = (3x^2 + 1)^4\).
Worked solution
The chain rule applies when one function sits inside another. Outer \(u^4\), inner \(u=3x^2+1\). M1
\(\dfrac{dy}{du}=4u^3\), \(\dfrac{du}{dx}=6x.\) A1
Multiply the rates: \[\dfrac{dy}{dx}=4(3x^2+1)^3\cdot 6x=24x(3x^2+1)^3.\] A1
Differentiate \(y = \cos(3x^2)\).
Worked solution
Write \(y=\cos u\) with inner function \(u=3x^2\). The chain rule states \(\dfrac{dy}{dx}=\dfrac{dy}{du}\cdot\dfrac{du}{dx}\). M1
\(\dfrac{dy}{du}=-\sin u\) (the derivative of cosine carries a minus sign) and \(\dfrac{du}{dx}=6x\). A1
\(\dfrac{dy}{dx}=-\sin(3x^2)\cdot 6x=-6x\sin(3x^2).\) A1
Consider \(y = \sin(3x).\)
(a) Find \(\dfrac{dy}{dx}\)
(b) Differentiate \(y = \cos(x^2).\)
Worked solution
(a) \(\sin(3x)\) is a composite, so chain rule: differentiate the sine and multiply by the derivative of the inner \(3x\). \(\dfrac{dy}{dx}=\cos(3x)\cdot 3\) M1
\(=3\cos(3x).\) A1
(b) Inner \(x^2\), derivative \(2x\); the derivative of \(\cos\) carries a minus sign. \(\dfrac{dy}{dx}=-\sin(x^2)\cdot 2x\) M1
\(=-2x\sin(x^2).\) A1
Common mistakes
- Forgetting the inner derivative in the chain rule. Differentiating \(\sin(3x-1)\) as \(\cos(3x-1)\) instead of \(3\cos(3x-1)\) drops the multiplier from the inner function \(3x-1\).
- Sign errors with negative or fractional exponents in the power rule. \(\dfrac{d}{dx}(x^{-2})=-2x^{-3}\), not \(2x^{-3}\) - the exponent's own sign carries through to the new coefficient.
- Misidentifying the inner and outer functions. In \(y=\cos(3x^2)\) the outer function is cosine and the inner is \(3x^2\) - swapping this order, or trying to differentiate \(3x^2\) and \(\cos u\) separately without the multiplication step, gives the wrong derivative entirely.
Ready to practise properly?
17 chain-rule questions, marked instantly like the real exam.
Quick answers
What is the chain rule?
If \(y=g(u)\) and \(u=h(x)\), then \(\dfrac{dy}{dx}=\dfrac{dy}{du}\times\dfrac{du}{dx}\). In practice: differentiate the outer function, keeping the inner function unchanged, then multiply by the derivative of the inner function.
How do you know when a function needs the chain rule?
Whenever one function is applied to another - a bracket raised to a power, a trig function of an expression, \(e\) to the power of an expression, or \(\ln\) of an expression - you have a composite function and need the chain rule.