The chain rule

AS · P1 · 11 min

The power rule differentiates x5x^5, but what about (3x−2)5(3x - 2)^5 or 2x3+5\sqrt{2x^3 + 5}? These are composite functions: one expression sits inside another. You could expand (3x−2)5(3x - 2)^5, but you cannot expand a square root, and the chain rule handles both in one line. In Paper 1 it appears in almost every calculus question, inside tangents, stationary points and rates of change, so it needs to be automatic.

Functions inside functions

In y=(3x−2)5y = (3x - 2)^5 there are two steps: first work out the inner function u=3x−2u = 3x - 2, then apply the outer function, raising to the power 55. This is exactly the composite function idea from the functions unit: y=f(g(x))y = f(g(x)) with g(x)=3x−2g(x) = 3x - 2 and f(u)=u5f(u) = u^5.

Seeing the pattern

Take y=(2x+1)2y = (2x + 1)^2, which you can expand:

y=4x2+4x+1⇒dydx=8x+4=4(2x+1)y = 4x^2 + 4x + 1 \quad\Rightarrow\quad \frac{dy}{dx} = 8x + 4 = 4(2x + 1)

Now compare with treating the bracket as if it were a single letter. The power rule on u2u^2 gives 2u=2(2x+1)2u = 2(2x + 1). That is only half of the right answer. The missing factor is 22, which is the derivative of the inside, 2x+12x + 1:

dydx=2(2x+1)⏟outer, inside left alone×2⏟derivative of inside=4(2x+1)\frac{dy}{dx} = \underbrace{2(2x + 1)}_{\text{outer, inside left alone}} \times \underbrace{2}_{\text{derivative of inside}} = 4(2x + 1)

The extra factor is there because the inside changes at its own rate. If xx increases by a small amount, u=2x+1u = 2x + 1 increases twice as fast, and yy responds to the change in uu. Rates multiply.

The rule

Key result

If yy is a function of uu, and uu is a function of xx, then

dydx=dydu×dudx\frac{dy}{dx} = \frac{dy}{du} \times \frac{du}{dx}

For a power of a bracket this becomes

ddx[(f(x))n]=n(f(x))n−1×f′(x)\frac{d}{dx}\Big[\big(f(x)\big)^n\Big] = n\big(f(x)\big)^{n - 1} \times f'(x)

and in the most common special case, a linear inside,

ddx[(ax+b)n]=an(ax+b)n−1\frac{d}{dx}\Big[(ax + b)^n\Big] = an(ax + b)^{n - 1}

In words: differentiate the outside, leaving the inside alone, then multiply by the derivative of the inside. The rule works for any rational power nn, so it covers roots and reciprocals of brackets once you rewrite them as powers.

Using the chain rule
  1. Rewrite the expression as (inside)n(\text{inside})^n. Roots become fractional powers and reciprocals become negative powers: 2x3+5=(2x3+5)12\sqrt{2x^3 + 5} = (2x^3 + 5)^{\frac{1}{2}} and 8(2x+1)2=8(2x+1)−2\dfrac{8}{(2x + 1)^2} = 8(2x + 1)^{-2}.
  2. Bring the power down and reduce it by one, copying the inside unchanged.
  3. Multiply by the derivative of the inside.
  4. Tidy up: collect numerical factors, and rewrite negative and fractional powers if a value is to be substituted.

On paper you can set out the substitution explicitly, which is good practice until it is automatic:

u=2x3+5,y=u12dudx=6x2,dydu=12u−12u = 2x^3 + 5,\quad y = u^{\frac{1}{2}} \qquad \frac{du}{dx} = 6x^2,\quad \frac{dy}{du} = \tfrac{1}{2}u^{-\frac{1}{2}} dydx=12u−12×6x2=3x22x3+5\frac{dy}{dx} = \tfrac{1}{2}u^{-\frac{1}{2}} \times 6x^2 = \frac{3x^2}{\sqrt{2x^3 + 5}}

That is the exact example the syllabus gives.

What the graph shows

y = (3x - 2)^2 y = 6x - 5 (1, 1)

y=(3x−2)2y = (3x - 2)^2 is the parabola y=x2y = x^2 squeezed horizontally by a factor 33 and shifted right. Squeezing a curve horizontally by a factor of 33 makes it three times as steep, and that is the factor 33 the chain rule brings in. At (1,1)(1, 1) the derivative 6(3x−2)6(3x - 2) gives gradient 66, and the tangent is y=6x−5y = 6x - 5. Without the factor 33 you would get gradient 22, a line that visibly does not touch the curve.

Second derivatives

To find d2ydx2\dfrac{d^2y}{dx^2} apply the chain rule again to dydx\dfrac{dy}{dx}. For a linear inside, each differentiation brings out another factor aa:

y=(2x−3)3⇒dydx=6(2x−3)2⇒d2ydx2=12(2x−3)×2=24(2x−3)y = (2x - 3)^3 \quad\Rightarrow\quad \frac{dy}{dx} = 6(2x - 3)^2 \quad\Rightarrow\quad \frac{d^2y}{dx^2} = 12(2x - 3) \times 2 = 24(2x - 3)

Worked examples

A linear inside

Find dydx\dfrac{dy}{dx} when y=(3x−2)5y = (3x - 2)^5, and find the gradient of the curve at the point where x=1x = 1.

Solution

Outer function u5u^5, inner u=3x−2u = 3x - 2 with derivative 33:

dydx=5(3x−2)4×3=15(3x−2)4\frac{dy}{dx} = 5(3x - 2)^4 \times 3 = 15(3x - 2)^4

At x=1x = 1: 15(1)4=1515(1)^4 = 15.

A square root of a cubic

Find dydx\dfrac{dy}{dx} when y=2x3+5y = \sqrt{2x^3 + 5}, and find the exact gradient of the curve at the point where x=−1x = -1.

Solution

y=(2x3+5)12y = (2x^3 + 5)^{\frac{1}{2}}, so

dydx=12(2x3+5)−12×6x2=3x22x3+5\frac{dy}{dx} = \tfrac{1}{2}(2x^3 + 5)^{-\frac{1}{2}} \times 6x^2 = \frac{3x^2}{\sqrt{2x^3 + 5}}

At x=−1x = -1: 2x3+5=−2+5=32x^3 + 5 = -2 + 5 = 3 and 3x2=33x^2 = 3, so the gradient is

33=3\frac{3}{\sqrt{3}} = \sqrt{3}
A reciprocal, with the second derivative

A curve has equation y=8(2x+1)2y = \dfrac{8}{(2x + 1)^2}. Find dydx\dfrac{dy}{dx} and d2ydx2\dfrac{d^2y}{dx^2}, and evaluate both at the point where x=12x = \tfrac{1}{2}.

Solution

y=8(2x+1)−2y = 8(2x + 1)^{-2}.

dydx=8×(−2)(2x+1)−3×2=−32(2x+1)−3\frac{dy}{dx} = 8 \times (-2)(2x + 1)^{-3} \times 2 = -32(2x + 1)^{-3}d2ydx2=−32×(−3)(2x+1)−4×2=192(2x+1)−4\frac{d^2y}{dx^2} = -32 \times (-3)(2x + 1)^{-4} \times 2 = 192(2x + 1)^{-4}

At x=12x = \tfrac{1}{2}, 2x+1=22x + 1 = 2:

dydx=−328=−4,d2ydx2=19216=12\frac{dy}{dx} = \frac{-32}{8} = -4, \qquad \frac{d^2y}{dx^2} = \frac{192}{16} = 12
Finding where the gradient is zero

Find the xx-coordinates of the points on y=(x2−4x+1)3y = (x^2 - 4x + 1)^3 where the gradient is zero, giving exact answers.

Solution

The inside is x2−4x+1x^2 - 4x + 1 with derivative 2x−42x - 4:

dydx=3(x2−4x+1)2(2x−4)=6(x−2)(x2−4x+1)2\frac{dy}{dx} = 3(x^2 - 4x + 1)^2(2x - 4) = 6(x - 2)(x^2 - 4x + 1)^2

This is zero when x−2=0x - 2 = 0 or x2−4x+1=0x^2 - 4x + 1 = 0. The quadratic gives

x=4±16−42=4±232=2±3x = \frac{4 \pm \sqrt{16 - 4}}{2} = \frac{4 \pm 2\sqrt{3}}{2} = 2 \pm \sqrt{3}

So the gradient is zero at x=2x = 2, x=2+3x = 2 + \sqrt{3} and x=2−3x = 2 - \sqrt{3}.

Do not expand the bracket: the factorised derivative is what lets you solve dydx=0\dfrac{dy}{dx} = 0.

Unknown constants inside a root

The curve y=ax+by = \sqrt{ax + b}, where aa and bb are positive constants, passes through (2,3)(2, 3) and has gradient 13\tfrac{1}{3} there. Find aa and bb.

Solution

On the curve: 3=2a+b3 = \sqrt{2a + b}, so

2a+b=9(1)2a + b = 9 \qquad (1)

Differentiate y=(ax+b)12y = (ax + b)^{\frac{1}{2}}:

dydx=12(ax+b)−12×a=a2ax+b\frac{dy}{dx} = \tfrac{1}{2}(ax + b)^{-\frac{1}{2}} \times a = \frac{a}{2\sqrt{ax + b}}

At (2,3)(2, 3) the root 2a+b\sqrt{2a + b} equals 33, so

a2×3=13⇒a=2\frac{a}{2 \times 3} = \frac{1}{3} \quad\Rightarrow\quad a = 2

Then from (1), b=9−4=5b = 9 - 4 = 5. The curve is y=2x+5y = \sqrt{2x + 5}.

Two chain rule terms

The function ff is defined by f(x)=2x−1+42x−1f(x) = \sqrt{2x - 1} + \dfrac{4}{2x - 1} for x>12x > \tfrac{1}{2}.

(a) Find f′(x)f'(x).

(b) Find the coordinates of the point on y=f(x)y = f(x) at which the gradient is zero.

Solution

(a) Write f(x)=(2x−1)12+4(2x−1)−1f(x) = (2x - 1)^{\frac{1}{2}} + 4(2x - 1)^{-1}. Both terms have inside 2x−12x - 1 with derivative 22:

f′(x)=12(2x−1)−12×2+4(−1)(2x−1)−2×2=(2x−1)−12−8(2x−1)−2f'(x) = \tfrac{1}{2}(2x - 1)^{-\frac{1}{2}} \times 2 + 4(-1)(2x - 1)^{-2} \times 2 = (2x - 1)^{-\frac{1}{2}} - 8(2x - 1)^{-2}

(b) Set f′(x)=0f'(x) = 0:

(2x−1)−12=8(2x−1)−2(2x - 1)^{-\frac{1}{2}} = 8(2x - 1)^{-2}

Multiply both sides by (2x−1)2(2x - 1)^2 (positive, since x>12x > \tfrac{1}{2}):

(2x−1)32=8⇒2x−1=823=4⇒x=52(2x - 1)^{\frac{3}{2}} = 8 \quad\Rightarrow\quad 2x - 1 = 8^{\frac{2}{3}} = 4 \quad\Rightarrow\quad x = \tfrac{5}{2}

Then f ⁣(52)=4+44=2+1=3f\!\left(\tfrac{5}{2}\right) = \sqrt{4} + \dfrac{4}{4} = 2 + 1 = 3. The point is (52,3)\left(\tfrac{5}{2}, 3\right).

When a whole expression is built from the same bracket, treat the bracket as one quantity. Here, writing u=2x−1u = 2x - 1 turns the equation into u−12=8u−2u^{-\frac{1}{2}} = 8u^{-2}, which is much easier to see.

Watch out

Forgetting to multiply by the derivative of the inside. ddx(3x−2)5=5(3x−2)4\dfrac{d}{dx}(3x - 2)^5 = 5(3x - 2)^4 is wrong; the factor 33 is missing. This is the most common chain rule error, and it loses the accuracy mark every time.

Changing the inside. The bracket is copied unchanged: ddx(x2+1)4=4(x2+1)3×2x\dfrac{d}{dx}(x^2 + 1)^4 = 4(x^2 + 1)^3 \times 2x, not 4(2x)34(2x)^3.

Losing a negative sign from the inside. ddx(5−2x)6=6(5−2x)5×(−2)=−12(5−2x)5\dfrac{d}{dx}(5 - 2x)^6 = 6(5 - 2x)^5 \times (-2) = -12(5 - 2x)^5.

Mishandling the reciprocal. 4(3x+2)2\dfrac{4}{(3x + 2)^2} is 4(3x+2)−24(3x + 2)^{-2}, not (4(3x+2))−2(4(3x + 2))^{-2} and not 14(3x+2)−2\tfrac{1}{4}(3x + 2)^{-2}.

Expanding when you should not. Expanding (x2−4x+1)3(x^2 - 4x + 1)^3 is slow and destroys the factorised form you need to solve dydx=0\dfrac{dy}{dx} = 0.

Tip

Because dydx\dfrac{dy}{dx} behaves like a fraction in the chain rule, you also have dydx=1/dxdy\dfrac{dy}{dx} = 1 \Big/ \dfrac{dx}{dy}. This is useful in connected rates of change, where you often need drdV\dfrac{dr}{dV} from a formula that gives VV in terms of rr.

Exam tip
  • Marks for the chain rule are typically one for the correct power and bracket, and one for the factor from the inside. Write the factor explicitly, as in 5(3x−2)4×35(3x - 2)^4 \times 3, before simplifying, so that a numerical slip still earns the method mark.
  • "Find dydx\dfrac{dy}{dx}" answers do not need to be fully simplified, but they must be correct. A quick check: the power of the bracket should go down by exactly one.
  • Substituting values: work out the inside first (2x+1=22x + 1 = 2 at x=12x = \tfrac{1}{2}), then apply powers. It is faster and avoids calculator errors with fractional powers.
  • Exact answers: surds such as 3\sqrt{3} or 37\dfrac{3}{\sqrt{7}} are exact; do not convert them to decimals unless asked.
Summary
  • A composite function has an inner function inside an outer one; the chain rule is dydx=dydu×dudx\dfrac{dy}{dx} = \dfrac{dy}{du} \times \dfrac{du}{dx}.
  • For powers of a bracket: ddx[(f(x))n]=n(f(x))n−1f′(x)\dfrac{d}{dx}\big[(f(x))^n\big] = n\big(f(x)\big)^{n-1}f'(x).
  • Linear inside: ddx(ax+b)n=an(ax+b)n−1\dfrac{d}{dx}(ax + b)^n = an(ax + b)^{n-1}.
  • Rewrite roots and reciprocals of brackets as powers before differentiating.
  • Copy the inside unchanged and multiply by its derivative, including any minus sign.
  • For a second derivative, apply the chain rule again.
  • Keep derivatives factorised when you need to solve dydx=0\dfrac{dy}{dx} = 0.

Practice questions

Question
  1. Differentiate (4x+1)3(4x + 1)^3.
  2. Differentiate (5−2x)6(5 - 2x)^6.
  3. Find the gradient of the curve y=6x−5y = \sqrt{6x - 5} at the point where x=1x = 1.
  4. Find the gradient of y=4(3x+2)2y = \dfrac{4}{(3x + 2)^2} at the point where it crosses the yy-axis.
  5. Find dydx\dfrac{dy}{dx} when y=(x2+1)4y = (x^2 + 1)^4.
  6. Find the exact gradient of y=1x3+8y = \dfrac{1}{\sqrt{x^3 + 8}} at the point where x=2x = 2.
  7. Given f(x)=(2x−3)3f(x) = (2x - 3)^3, find f′(x)f'(x) and f′′(x)f''(x), and evaluate f′′(2)f''(2).
  8. Find the coordinates of the points on y=(x2−9)2y = (x^2 - 9)^2 where the gradient is zero.
  9. The function ff is defined by f(x)=23x+1−xf(x) = 2\sqrt{3x + 1} - x for x>−13x > -\tfrac{1}{3}. Find the coordinates of the point on y=f(x)y = f(x) where the gradient is zero, and the value of f′′(x)f''(x) at that point.
  10. The gradient of the curve y=x2+ky = \sqrt{x^2 + k} at the point where x=2x = 2 is 23\tfrac{2}{3}. Find the value of the constant kk, and hence find the equation of the tangent at that point in the form y=mx+cy = mx + c.
Answers
  1. 3(4x+1)2×4=12(4x+1)23(4x + 1)^2 \times 4 = 12(4x + 1)^2.

  2. 6(5−2x)5×(−2)=−12(5−2x)56(5 - 2x)^5 \times (-2) = -12(5 - 2x)^5.

  3. y=(6x−5)12y = (6x - 5)^{\frac{1}{2}}, so dydx=12(6x−5)−12×6=36x−5\dfrac{dy}{dx} = \tfrac{1}{2}(6x - 5)^{-\frac{1}{2}} \times 6 = \dfrac{3}{\sqrt{6x - 5}}. At x=1x = 1: 31=3\dfrac{3}{\sqrt{1}} = 3.

  4. y=4(3x+2)−2y = 4(3x + 2)^{-2}, dydx=−8(3x+2)−3×3=−24(3x+2)−3\dfrac{dy}{dx} = -8(3x + 2)^{-3} \times 3 = -24(3x + 2)^{-3}. It crosses the yy-axis at x=0x = 0: gradient −248=−3\dfrac{-24}{8} = -3.

  5. 4(x2+1)3×2x=8x(x2+1)34(x^2 + 1)^3 \times 2x = 8x(x^2 + 1)^3.

  6. y=(x3+8)−12y = (x^3 + 8)^{-\frac{1}{2}}, dydx=−12(x3+8)−32×3x2=−3x22(x3+8)3/2\dfrac{dy}{dx} = -\tfrac{1}{2}(x^3 + 8)^{-\frac{3}{2}} \times 3x^2 = -\dfrac{3x^2}{2(x^3 + 8)^{3/2}}. At x=2x = 2: x3+8=16x^3 + 8 = 16 and 1632=6416^{\frac{3}{2}} = 64, so the gradient is −12128=−332-\dfrac{12}{128} = -\dfrac{3}{32}.

  7. f′(x)=3(2x−3)2×2=6(2x−3)2f'(x) = 3(2x - 3)^2 \times 2 = 6(2x - 3)^2. f′′(x)=12(2x−3)×2=24(2x−3)f''(x) = 12(2x - 3) \times 2 = 24(2x - 3). f′′(2)=24(1)=24f''(2) = 24(1) = 24.

  8. dydx=2(x2−9)×2x=4x(x−3)(x+3)\dfrac{dy}{dx} = 2(x^2 - 9) \times 2x = 4x(x - 3)(x + 3). Zero at x=0,3,−3x = 0, 3, -3. The points are (0,81)(0, 81), (3,0)(3, 0) and (−3,0)(-3, 0).

  9. f(x)=2(3x+1)12−xf(x) = 2(3x + 1)^{\frac{1}{2}} - x, so f′(x)=(3x+1)−12×3−1=33x+1−1f'(x) = (3x + 1)^{-\frac{1}{2}} \times 3 - 1 = \dfrac{3}{\sqrt{3x + 1}} - 1. Setting this to zero: 3x+1=3\sqrt{3x + 1} = 3, so 3x+1=93x + 1 = 9 and x=83x = \tfrac{8}{3}. Then f ⁣(83)=2(3)−83=103f\!\left(\tfrac{8}{3}\right) = 2(3) - \tfrac{8}{3} = \tfrac{10}{3}. The point is (83,103)\left(\tfrac{8}{3}, \tfrac{10}{3}\right). Next, f′′(x)=3×(−12)(3x+1)−32×3=−92(3x+1)−32f''(x) = 3 \times \left(-\tfrac{1}{2}\right)(3x + 1)^{-\frac{3}{2}} \times 3 = -\tfrac{9}{2}(3x + 1)^{-\frac{3}{2}}. At x=83x = \tfrac{8}{3}, (3x+1)32=932=27(3x + 1)^{\frac{3}{2}} = 9^{\frac{3}{2}} = 27, so f′′=−954=−16f'' = -\dfrac{9}{54} = -\dfrac{1}{6}.

  10. y=(x2+k)12y = (x^2 + k)^{\frac{1}{2}}, dydx=12(x2+k)−12×2x=xx2+k\dfrac{dy}{dx} = \tfrac{1}{2}(x^2 + k)^{-\frac{1}{2}} \times 2x = \dfrac{x}{\sqrt{x^2 + k}}. At x=2x = 2: 24+k=23\dfrac{2}{\sqrt{4 + k}} = \dfrac{2}{3}, so 4+k=3\sqrt{4 + k} = 3 and k=5k = 5. The point is (2,9)=(2,3)(2, \sqrt{9}) = (2, 3), so the tangent is y−3=23(x−2)y - 3 = \tfrac{2}{3}(x - 2), i.e. y=23x+53y = \tfrac{2}{3}x + \tfrac{5}{3}.

How well do you know this?

Builds on

Where this leads

Console

Search notes, courses and tools, or run an action