Skip to main content
ExamExplained
SA · Math Methods
Math Methods study scene
§-Syllabus dot point
SAMath MethodsSyllabus dot point

How do we differentiate a function that is composed of one function inside another?

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

How to differentiate composite functions with the chain rule, including the outside-times-inside method and how it combines with the product and quotient rules, with worked SACE-style examples.

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

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

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(cosx)\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=dydududx.\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).

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)]n1g(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.

Combining with other rules

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

For y=xe3xy=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

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 practice questions

Practice questions written in the style of SACE Board exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

SACE 20241 marksCalculator-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 20232 marksCalculator-free. Find dydx\dfrac{dy}{dx} for y=(4x7)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=4x7u = 4x - 7 with u=4u' = 4.

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

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

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

SACE 20223 marksCalculator-assumed. A curve has equation y=e3x21y = 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=3x21u = 3x^2 - 1 with u=6xu' = 6x. The derivative of eue^u is eue^u, so

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

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

dydxx=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.

ExamExplained