Skip to main content

The chain rule (SACE Stage 2 Mathematical Methods)

Syllabus dot point

“The chain rule differentiates composite functions by multiplying the derivative of the outer function by the derivative of the inner function.”

8 min read

Quick answer

The chain rule differentiates a composite function y=f(g(x))y=f(g(x)) by dydx=f′(g(x))⋅g′(x)\dfrac{dy}{dx}=f'(g(x))\cdot g'(x) - differentiate the outer function, keep the inner unchanged, then multiply by the derivative of the inner function. In Leibniz notation, dydx=dydu⋅dudx\dfrac{dy}{dx}=\dfrac{dy}{du}\cdot\dfrac{du}{dx}.

Jump to a section
  1. What this dot point is asking
  2. The rule
  3. Standard chain-rule results
  4. Combining with other rules
  5. A nested chain
  6. Common errors
  7. Why it matters
  8. Exam-style questions

What this dot point is asking

A composite function is a "function of a function" - one expression nested inside another, like (3x+1)5(3x+1)^5, ex2e^{x^2} or ln⁡(cos⁡x)\ln(\cos x). The chain rule tells you how to differentiate these, and it is the single most-used differentiation rule in SACE Stage 2 Mathematical Methods because it sits inside almost every calculus question in Topics 1, 3 and 4.

The rule

If y=f(u)y=f(u) and u=g(x)u=g(x), then

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

Equivalently, for y=f(g(x))y=f(g(x)),

dydx=f′(g(x))⋅g′(x).\frac{dy}{dx}=f'\big(g(x)\big)\cdot g'(x).

Chain rule

ddxf(g(x))=f′(g(x))⋅g′(x)ordydx=dydu⋅dudx\frac{d}{dx}f\big(g(x)\big)=f'\big(g(x)\big)\cdot g'(x)\qquad\text{or}\qquad\frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dx}

The intuition: differentiate the outside function treating the inside as a single block, then multiply by the derivative of the inside. The Leibniz form makes this look like cancelling fractions, which is a useful memory aid even though dydu\dfrac{dy}{du} and dudx\dfrac{du}{dx} are not literally fractions.

Standard chain-rule results

These come up constantly and are worth knowing by sight:

  • ddx[g(x)]n=n[g(x)]n−1 g′(x)\dfrac{d}{dx}\big[g(x)\big]^n=n\big[g(x)\big]^{n-1}\,g'(x)
  • ddxeg(x)=g′(x) eg(x)\dfrac{d}{dx}e^{g(x)}=g'(x)\,e^{g(x)}
  • ddxln⁡(g(x))=g′(x)g(x)\dfrac{d}{dx}\ln\big(g(x)\big)=\dfrac{g'(x)}{g(x)}
  • ddxsin⁡(g(x))=g′(x)cos⁡(g(x))\dfrac{d}{dx}\sin\big(g(x)\big)=g'(x)\cos\big(g(x)\big)
  • ddxcos⁡(g(x))=−g′(x)sin⁡(g(x))\dfrac{d}{dx}\cos\big(g(x)\big)=-g'(x)\sin\big(g(x)\big)

Each of these is just the chain rule applied to a known derivative. If you can spot the inner function g(x)g(x) and write down g′(x)g'(x), every one of these follows mechanically.

Differentiating (3x2+1)5(3x^2+1)^5

Find dydx\dfrac{dy}{dx} for y=(3x2+1)5y=(3x^2+1)^5.

Step 1: Identify the composite structure

The function is a power of a non-trivial expression, which signals a composite function. The outer function is "raise to the fifth power" and the inner function is the expression inside the bracket. Naming the inner function uu makes the structure explicit:

u=3x2+1,so thaty=u5.u=3x^2+1, \qquad \text{so that} \qquad y=u^5.

Step 2: Differentiate each layer

Differentiate the inner function with respect to xx using the power rule:

dudx=6x.\frac{du}{dx}=6x.

Differentiate the outer function with respect to uu, treating uu as the variable:

dydu=5u4.\frac{dy}{du}=5u^4.

Step 3: Apply the chain rule

The chain rule multiplies the two derivatives together. Substitute u=3x2+1u=3x^2+1 to write the result entirely in terms of xx:

dydx=dydu⋅dudx=5u4⋅6x=30x(3x2+1)4.\frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dx}=5u^4\cdot 6x=30x(3x^2+1)^4.

The factor 6x6x comes from the inner function and would be missing if you simply brought down the power without applying the chain rule.

Final answer: dydx=30x(3x2+1)4\dfrac{dy}{dx}=30x(3x^2+1)^4.

Differentiating ex2e^{x^2}

Find dydx\dfrac{dy}{dx} for y=ex2y=e^{x^2}.

Step 1: Identify the composite structure

The function is an exponential whose exponent is itself a function of xx, not simply xx itself. This makes it a composite function: the outer function is eue^u and the inner function is the exponent. Naming the inner function clarifies what needs to be differentiated:

u=x2,so thaty=eu.u=x^2, \qquad \text{so that} \qquad y=e^u.

Step 2: Differentiate each layer

Differentiate the inner function with respect to xx:

dudx=2x.\frac{du}{dx}=2x.

The outer function is an exponential, and the derivative of eue^u with respect to uu is simply eue^u unchanged:

dydu=eu.\frac{dy}{du}=e^u.

Step 3: Apply the chain rule and substitute back

Multiply the two derivatives and replace uu with x2x^2 so the answer is written entirely in terms of xx:

dydx=dydu⋅dudx=eu⋅2x=2x ex2.\frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dx}=e^u\cdot 2x=2x\,e^{x^2}.

The factor 2x2x comes from the chain rule. Without it, the answer would be incorrect because it would ignore how rapidly the exponent itself is changing.

Final answer: dydx=2x ex2\dfrac{dy}{dx}=2x\,e^{x^2}.

Combining with other rules

In practice the chain rule rarely appears alone. Watch for it inside products and quotients.

For y=x e3xy=x\,e^{3x}, use the product rule with u=xu=x and v=e3xv=e^{3x}, where v′=3e3xv'=3e^{3x} comes from the chain rule:

dydx=(1)e3x+x(3e3x)=e3x(1+3x).\frac{dy}{dx}=(1)e^{3x}+x\big(3e^{3x}\big)=e^{3x}(1+3x).

For a quotient such as y=ln⁡(2x)xy=\dfrac{\ln(2x)}{x}, the numerator ln⁡(2x)\ln(2x) needs the chain rule to differentiate to 22x=1x\dfrac{2}{2x}=\dfrac{1}{x}, after which the quotient rule assembles the result. The chain rule is the inner gear that the product and quotient rules turn.

A nested chain

Sometimes there are three layers, for example y=ln⁡ ⁣(cos⁡(2x))y=\ln\!\big(\cos(2x)\big). Work from the outside in: the derivative of ln⁡(□)\ln(\square) is 1□\dfrac{1}{\square} times the derivative of □\square; the derivative of cos⁡(2x)\cos(2x) is −2sin⁡(2x)-2\sin(2x). Multiplying gives

dydx=1cos⁡(2x)⋅(−2sin⁡(2x))=−2tan⁡(2x).\frac{dy}{dx}=\frac{1}{\cos(2x)}\cdot\big(-2\sin(2x)\big)=-2\tan(2x).

Each layer contributes one factor; you simply keep multiplying by the derivative of the next inner function until you reach xx.

Common errors

Forgetting to multiply by the derivative of the inside

The single most common chain-rule slip is writing ddx(3x+1)4=4(3x+1)3\dfrac{d}{dx}(3x+1)^4=4(3x+1)^3 and stopping. You must multiply by the derivative of the inside, g′(x)=3g'(x)=3, giving 12(3x+1)312(3x+1)^3. Whenever you "bring the power down", immediately ask: what is the derivative of what is inside the bracket?

Identify the inner function first

Before differentiating, decide what the inner function uu is and write down u′u'. Doing this on paper before you start prevents the "forgot the inside" error and makes products and quotients with a chain inside far cleaner.

Why it matters

The chain rule unlocks differentiation of exponential and logarithmic models, which dominate Topic 4, and it is essential for the optimisation problems where a quantity is expressed through an intermediate variable. Combined with the product and quotient rules, it lets you differentiate essentially any function you will meet in Stage 2, and it reappears in reverse as integration by substitution in the calculus you meet later. Examiners reward clear identification of the inner function and the explicit g′(x)g'(x) factor, so always show that step.

Exam-style questions

Questions in the style of SACE Board exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.

SACE 2024-style1 mark
Calculator-free. Consider the function f(x)=ln⁡(x+3)f(x) = \ln(x + 3) where x>−3x > -3. Determine f′(x)f'(x).
Show worked answer →

This is a chain-rule (composite log) derivative. The inner function is u=x+3u = x + 3 with u′=1u' = 1.

Using ddxln⁡(g(x))=g′(x)g(x)\dfrac{d}{dx}\ln(g(x)) = \dfrac{g'(x)}{g(x)}:

f′(x)=1x+3.f'(x) = \frac{1}{x + 3}.

The single mark is for the correct derivative. A common slip is to write 1x\dfrac{1}{x} and forget the +3+3 in the denominator that the chain rule carries through.

SACE 2023-style2 marks
Calculator-free. Find dydx\dfrac{dy}{dx} for y=(4x−7)11y = (4x - 7)^{11}. There is no need to simplify your answer.
Show worked answer →

Use the chain rule on a power of a function. The inner function is u=4x−7u = 4x - 7 with u′=4u' = 4.

With ddx[g(x)]n=n[g(x)]n−1g′(x)\dfrac{d}{dx}[g(x)]^n = n[g(x)]^{n-1}g'(x):

dydx=11(4x−7)10(4)=44(4x−7)10.\frac{dy}{dx} = 11(4x - 7)^{10}(4) = 44(4x - 7)^{10}.

Marks: one for bringing the power down to give 11(4x−7)1011(4x - 7)^{10}, and one for multiplying by the derivative of the inside, g′(x)=4g'(x) = 4. Stopping at 11(4x−7)1011(4x - 7)^{10} (forgetting the inside derivative) is the most common error and loses a mark.

SACE 2022-style3 marks
Calculator-assumed. A curve has equation y=e 3x2−1y = e^{\,3x^2 - 1}. (a) Find dydx\dfrac{dy}{dx}. (b) Find the exact gradient of the curve at x=1x = 1.
Show worked answer →

(a) The inner function is u=3x2−1u = 3x^2 - 1 with u′=6xu' = 6x. The derivative of eue^u is eue^u, so

dydx=6x e 3x2−1.\frac{dy}{dx} = 6x\,e^{\,3x^2 - 1}.

(b) Substitute x=1x = 1: the exponent becomes 3(1)2−1=23(1)^2 - 1 = 2, so

dydx∣x=1=6(1) e2=6e2.\left.\frac{dy}{dx}\right|_{x=1} = 6(1)\,e^{2} = 6e^{2}.

Marks: one for the chain-rule structure g′(x)eg(x)g'(x)e^{g(x)}, one for g′(x)=6xg'(x) = 6x, and one for the exact substitution giving 6e26e^2. Leaving the answer as a decimal when "exact" is asked loses the final mark.

Practise this

Sources & how we know this

ExamExplained