Scottish Higher Maths5 min read

Chain rule

Recognise composite functions and differentiate them using the chain rule, including coefficients, nonlinear inside functions, and negative or fractional powers.

On this page

Composite functions

Some functions are built from one function applied to the output of another. In y=(2x+5)4y=(2x+5)^4, the expression 2x+52x+5 is worked out first, and the result is then raised to the power 4. A function built this way — a function of a function — is a composite function.

The chain rule

Worked example

Differentiate a bracket raised to a power

Differentiate y=(2x+5)4y=(2x+5)^4 with respect to xx.

  1. Step 1

    Differentiate the outside function

    Bring down the power and reduce it by 1, keeping the bracket unchanged: 4(2x+5)34(2x+5)^3.

  2. Step 2

    Multiply by the derivative of the inside function

    The derivative of 2x+52x+5 is 22, so multiply: 4(2x+5)3×24(2x+5)^3\times2.

Final answer

dydx=8(2x+5)3\frac{dy}{dx}=8(2x+5)^3

The outside power is differentiated first, and the constant factor 2 comes from differentiating the inside function 2x+52x+5.

Coefficients and nonlinear inside functions

An outer constant coefficient stays in place and is multiplied in at the end. The inside function does not have to be linear — it can be a quadratic or another expression in xx, and its own derivative is found in the usual way before multiplying.

Worked example

Coefficient with a nonlinear inside function

Differentiate y=3(x2+2)4y=3(x^2+2)^4 with respect to xx.

  1. Step 1

    Differentiate the outside function

    Keep the coefficient 3, bring down the power 4 and reduce it by 1: 3×4(x2+2)33\times4(x^2+2)^3.

  2. Step 2

    Multiply by the derivative of the inside function

    The derivative of x2+2x^2+2 is 2x2x, so multiply: 12(x2+2)3×2x12(x^2+2)^3\times2x.

  3. Step 3

    Combine the constants

    12×2=2412\times2=24, giving 24x(x2+2)324x(x^2+2)^3.

Final answer

dydx=24x(x2+2)3\frac{dy}{dx}=24x(x^2+2)^3

The coefficient 3 is carried through the whole calculation, and the inside function's own derivative (2x2x) is what gets multiplied in — not just xx.

Dropping the outer coefficient 3, or multiplying by $x$ instead of the correct derivative $2x$.

Negative and fractional powers

The chain rule works the same way for negative and fractional outside powers. A square root can be rewritten as a power of 12\frac12 before differentiating, and a reciprocal can be rewritten as a negative power — after that, the same two steps apply: differentiate the outside power, then multiply by the derivative of the inside function.

Worked example

Differentiate a negative power

Differentiate y=(3x1)2y=(3x-1)^{-2} with respect to xx.

  1. Step 1

    Differentiate the outside function

    Bring down the power 2-2 and reduce it by 1, to 3-3: 2(3x1)3-2(3x-1)^{-3}.

  2. Step 2

    Multiply by the derivative of the inside function

    The derivative of 3x13x-1 is 33, so multiply: 2(3x1)3×3-2(3x-1)^{-3}\times3.

Final answer

dydx=6(3x1)3=6(3x1)3\frac{dy}{dx}=-6(3x-1)^{-3}=-\frac{6}{(3x-1)^3}

Reducing 2-2 by 1 gives 3-3, not 1-1 — the power always reduces by exactly 1, whatever sign it starts with.

Reducing the power to $-1$ instead of $-3$.

Worked example

Differentiate a square root

Differentiate y=4x+1y=\sqrt{4x+1} with respect to xx.

  1. Step 1

    Rewrite as a fractional power

    y=(4x+1)1/2y=(4x+1)^{1/2}.

  2. Step 2

    Differentiate the outside function

    Bring down the power 12\frac12 and reduce it by 1, to 12-\frac12: 12(4x+1)1/2\frac12(4x+1)^{-1/2}.

  3. Step 3

    Multiply by the derivative of the inside function

    The derivative of 4x+14x+1 is 44, so multiply: 12(4x+1)1/2×4\frac12(4x+1)^{-1/2}\times4.

Final answer

dydx=2(4x+1)1/2=24x+1\frac{dy}{dx}=2(4x+1)^{-1/2}=\frac{2}{\sqrt{4x+1}}

Rewriting the square root as a power of 12\frac12 first turns this into an ordinary chain rule question.

Self-checkQuick self-check

Differentiate y=2(3x2+1)3y=2(3x^2+1)^3 with respect to xx.

Answer

dydx=36x(3x2+1)2\frac{dy}{dx}=36x(3x^2+1)^2

Keep the coefficient 2, bring down the power 3 and reduce it to 2, then multiply by the derivative of 3x2+13x^2+1, which is 6x6x: 2×3×6=362\times3\times6=36.

Recap

A composite function has an inside function and an outside function. To differentiate it, differentiate the outside function while keeping the inside unchanged, then multiply by the derivative of the inside function — the same two steps whether the outside power is a positive integer, negative, or fractional.

Continue to Foundations
Orthic — Learn with Precision