Chain Rule (AA HL)

The chain rule differentiates a composite function, where one function is applied inside another. Write y=f(g(x))y=f(g(x)) as y=f(u)y=f(u) with u=g(x)u=g(x), and then dydx=dydu×dudx\dfrac{dy}{dx}=\dfrac{dy}{du}\times\dfrac{du}{dx}. It also covers applying the rule twice and combining it with the standard derivatives of sin⁡x\sin x, cos⁡x\cos x, exe^x and ln⁡x\ln x. It's part of the broader Differentiation topic.

12 questions on this sub-topic.

Syllabus

CodeSyllabus content
SL5.6Derivative of xnx^n, sin⁡x\sin x, cos⁡x\cos x, exe^x and ln⁡x\ln x. Differentiation of a sum and a multiple of these functions. The chain rule for composite functions. The product and quotient rules.

Official IB source: Mathematics: analysis and approaches subject brief (PDF, ibo.org).

Skills practised on this page:

The formula

The chain rule itself is in the formula booklet - the skill is spotting the inner function and remembering to differentiate it too.

Chain rule

dydx=dydu⋅dudx\dfrac{dy}{dx} = \dfrac{dy}{du}\cdot\dfrac{du}{dx}

Differentiate the outer function, leave the inner function alone, then multiply by the derivative of the inner function.

In the formula booklet

Spotting composite functions

If you could write the expression as f(u)f(u) with uu a simpler expression in xx - like u=3xu = 3x in sin⁡(3x)\sin(3x), or u=3x2+1u = 3x^2+1 in (3x2+1)5(3x^2+1)^5 - you're looking at a composite function and need the chain rule. Some expressions, like sin2⁡(3x)\sin^2(3x), need it applied twice.

Not in the formula booklet - recognition strategy

Need the full syllabus wording and formula-booklet reference table? See Differentiation.

Key terms

What is a composite function?

A composite function applies one function to the output of another, written f(g(x))f(g(x)). Here gg is the inner function and ff is the outer function.

e.g. In sin⁡(3x)\sin(3x), the inner function is 3x3x and the outer function is sine.

How do you identify the inner and outer functions?

Think about the order in which you would evaluate the expression. The part you work out first is the inner function.

e.g. For (3x2+1)5(3x^2+1)^5, you work out 3x2+13x^2+1 first, so that is the inner function and raising to the power 55 is the outer function.

What patterns come from the chain rule?

Differentiating the outer function and multiplying by the inner derivative gives patterns such as ddxsin⁡(ax)=acos⁡(ax)\dfrac{d}{dx}\sin(ax)=a\cos(ax) and ddxeax=aeax\dfrac{d}{dx}e^{ax}=ae^{ax}. For a logarithm, ddxln⁡f(x)=f′(x)f(x)\dfrac{d}{dx}\ln f(x)=\dfrac{f'(x)}{f(x)}.

e.g. ddxln⁡(5x2+2)=10x5x2+2\dfrac{d}{dx}\ln(5x^2+2)=\dfrac{10x}{5x^2+2}.

How do you apply the chain rule twice?

When a function has three layers, differentiate the outermost layer, then the next layer, then the innermost layer, and multiply all the results.

e.g. For y=sin3⁡(2x)y=\sin^3(2x), dydx=3sin2⁡(2x)×cos⁡(2x)×2=6sin2⁡(2x)cos⁡(2x)\dfrac{dy}{dx}=3\sin^2(2x)\times\cos(2x)\times2=6\sin^2(2x)\cos(2x).

Worked examples

1
Medium
No calc
[2 marks]

Differentiate y=(3x2+1)5.y = (3x^2 + 1)^5.

Worked solution

dydx=5(3x2+1)4⋅ddx(3x2+1)=5(3x2+1)4⋅6x.\dfrac{dy}{dx} = 5(3x^2+1)^4 \cdot \dfrac{d}{dx}(3x^2+1) = 5(3x^2+1)^4 \cdot 6x. M1
dydx=30x(3x2+1)4.\dfrac{dy}{dx} = 30x(3x^2+1)^4. A1

M1 Chain rule A1 Correct answer of 30x(3x2+1)430x(3x^{2}+1)^{4}
2
Hard
No calc
[3 marks]

Differentiate y=sin2⁡(3x).y=\sin^2(3x).

Worked solution

Chain rule (twice): let u=sin⁡3x.u = \sin 3x. M1
dydx=2sin⁡3x⋅cos⁡3x⋅3=6sin⁡3xcos⁡3x\dfrac{dy}{dx} = 2\sin 3x \cdot \cos 3x \cdot 3 = 6\sin 3x\cos 3x A1
dydx=3sin⁡6x.\dfrac{dy}{dx} = 3\sin 6x. A1

M1 Chain rule A1 Combine A1 Double-angle simplify
3
Easy
GDC
[2 marks]

Show that y=e2xy = e^{2x} is a solution of dydx=2y\dfrac{dy}{dx} = 2y.

Worked solution

dydx=2e2x.\tfrac{dy}{dx} = 2e^{2x}. M1
2y=2e2x2y = 2e^{2x}, so it satisfies the equation. A1 AG

Solve on the GDC - graph each side and use intersect, or an equation solver (TI‑84 PlySmlt2 / Solver · Casio EQUA · Nspire solve()).

M1 Differentiating y=e2xy=e^{2x} to obtain 2e2x2e^{2x} A1 Conclude
4
Medium
No calc
[4 marks]

y=sin⁡(3x).y = \sin(3x).

(a) Find dydx\dfrac{dy}{dx}.

(b) Differentiate y=cos⁡(x2).y = \cos(x^2).

Worked solution

(a) sin⁡(3x)\sin(3x) is a composite, so chain rule: differentiate the sine and multiply by the derivative of the inner 3x3x. dydx=cos⁡(3x)⋅3\dfrac{dy}{dx}=\cos(3x)\cdot 3 M1
dydx=3cos⁡(3x).\dfrac{dy}{dx} = 3\cos(3x). A1

(b) Inner x2x^2, derivative 2x2x; the derivative of cos\cos carries a minus sign. dydx=−sin⁡(x2)⋅2x\dfrac{dy}{dx}=-\sin(x^2)\cdot 2x M1
dydx=−2xsin⁡(x2).\dfrac{dy}{dx} = -2x\sin(x^2). A1

M1 Applying the chain rule with inner function 3x3x A1 Chain rule, part (a) M1 Applying the chain rule with inner function x2x^2 and a minus sign A1 Chain rule, part (b)

Common mistakes

  • Forgetting to multiply by the inner derivative. Differentiating sin⁡(3x)\sin(3x) as cos⁡(3x)\cos(3x) instead of 3cos⁡(3x)3\cos(3x) drops the "multiply by the derivative of the inner function" step - always check for a function inside a function.
  • Stopping after one application when two are needed. An expression like sin2⁡(3x)\sin^2(3x) is a function of a function of a function - differentiate the outer square, then the sine, then the 3x3x inside it, multiplying by each inner derivative in turn.
  • Confusing the chain rule with the product rule. (3x2+1)5(3x^2+1)^5 is one function raised to a power (chain rule), not two different functions multiplied together (product rule) - check whether you have one composite expression or two separate factors before choosing a method.

Quick questions

What is the chain rule?

dydx=dydu⋅dudx\dfrac{dy}{dx} = \dfrac{dy}{du}\cdot\dfrac{du}{dx}. Differentiate the outer function, leave the inner function alone, then multiply by the derivative of the inner function.

How do I know when to use the chain rule?

Whenever you're differentiating a composite function - a function inside another function, like sin⁡(3x)\sin(3x), (3x2+1)5(3x^2+1)^5, or e3x2−1e^{3x^2-1}. If substituting uu for the inner part would simplify the expression, you need the chain rule.

Why do I multiply by the derivative of the inner function?

The output depends on xx through the inner function. A small change in xx changes the inner function at rate dudx\dfrac{du}{dx}, which in turn changes yy at rate dydu\dfrac{dy}{du}, and the two rates multiply.

How do I differentiate e to the power 3x squared minus 1?

The outer function is eue^u with u=3x2−1u=3x^2-1, so dydx=e3x2−1×6x=6xe3x2−1\dfrac{dy}{dx}=e^{3x^2-1}\times6x=6xe^{3x^2-1}.

How do I differentiate a square root of a linear expression?

Write it as a power, then use the chain rule. For y=4x+1=(4x+1)12y=\sqrt{4x+1}=(4x+1)^{\frac12}, dydx=12(4x+1)−12×4=24x+1\dfrac{dy}{dx}=\dfrac12(4x+1)^{-\frac12}\times4=\dfrac{2}{\sqrt{4x+1}}.

Ready to practise properly?

12 chain-rule questions, marked instantly like the real exam.

Need a calculator refresher? See Using your GDC on the full Differentiation page.

← Back to Analysis & Approaches HL topics