⛓️ Chain, Product and Quotient Rules

A Level Maths Year 2 · Differentiation

Level 3 · Ages 17–18

← Back to topic overview
1 The Chain Rule

Year 1 differentiation handled sums of powers. Real functions are built by composing (one function inside another), multiplying and dividing simpler ones. Each operation has its own rule.

A composite function has an "inside" and an "outside". In $y = (3x^2 - 1)^5$, the inside is $u = 3x^2 - 1$ and the outside is $y = u^5$. If $u$ changes $\dfrac{\mathrm{d}u}{\mathrm{d}x}$ times as fast as $x$, and $y$ changes $\dfrac{\mathrm{d}y}{\mathrm{d}u}$ times as fast as $u$, then $y$ changes at the product of the two rates.
The chain rule
$\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{\mathrm{d}y}{\mathrm{d}u} \times \dfrac{\mathrm{d}u}{\mathrm{d}x}$     or     $\dfrac{\mathrm{d}}{\mathrm{d}x}\,\mathrm{f}\big(\mathrm{g}(x)\big) = \mathrm{f}'\big(\mathrm{g}(x)\big) \times \mathrm{g}'(x)$

In words: differentiate the outside (leaving the inside alone), then multiply by the derivative of the inside.

Worked Example 1 — A power of a bracket

Differentiate $y = (3x^2 - 1)^5$.

①Let $u = 3x^2 - 1$, so $y = u^5$.
②$\dfrac{\mathrm{d}y}{\mathrm{d}u} = 5u^4$ and $\dfrac{\mathrm{d}u}{\mathrm{d}x} = 6x$.
③$\dfrac{\mathrm{d}y}{\mathrm{d}x} = 5u^4 \times 6x = 30x(3x^2 - 1)^4$.
With practice you can skip the substitution: "$5(\ldots)^4$ times the derivative of the bracket".
Worked Example 2 — The chain rule with standard functions

Differentiate (a) $\sqrt{1 + 4x}$  (b) $\mathrm{e}^{x^2}$  (c) $\ln(x^2 + 1)$  (d) $\sin^3 x$.

①(a) $(1 + 4x)^{1/2} \to \tfrac12(1 + 4x)^{-1/2} \times 4 = \dfrac{2}{\sqrt{1 + 4x}}$
②(b) $\mathrm{e}^{x^2} \to \mathrm{e}^{x^2} \times 2x = 2x\mathrm{e}^{x^2}$
③(c) $\ln(x^2 + 1) \to \dfrac{1}{x^2 + 1} \times 2x = \dfrac{2x}{x^2 + 1}$
④(d) $\sin^3 x = (\sin x)^3 \to 3(\sin x)^2 \times \cos x = 3\sin^2 x\cos x$
Two shortcuts worth knowing
$\dfrac{\mathrm{d}}{\mathrm{d}x}\mathrm{e}^{\mathrm{f}(x)} = \mathrm{f}'(x)\,\mathrm{e}^{\mathrm{f}(x)}$     $\dfrac{\mathrm{d}}{\mathrm{d}x}\ln\mathrm{f}(x) = \dfrac{\mathrm{f}'(x)}{\mathrm{f}(x)}$
2 The Product Rule
The product rule
If $y = uv$ then $\dfrac{\mathrm{d}y}{\mathrm{d}x} = u\dfrac{\mathrm{d}v}{\mathrm{d}x} + v\dfrac{\mathrm{d}u}{\mathrm{d}x}$
The derivative of a product is not the product of the derivatives. For $y = x^2 \cdot x^3 = x^5$, the derivative is $5x^4$, but $2x \times 3x^2 = 6x^3$. The product rule gives $x^2(3x^2) + x^3(2x) = 5x^4$ ✓.
Worked Example 3 — Product rule and stationary points

$y = x^2\mathrm{e}^{3x}$. Find $\dfrac{\mathrm{d}y}{\mathrm{d}x}$ in factorised form, and the $x$-coordinates of the stationary points.

①$u = x^2$, $v = \mathrm{e}^{3x}$; $\;\dfrac{\mathrm{d}u}{\mathrm{d}x} = 2x$, $\dfrac{\mathrm{d}v}{\mathrm{d}x} = 3\mathrm{e}^{3x}$.
②$\dfrac{\mathrm{d}y}{\mathrm{d}x} = x^2 \cdot 3\mathrm{e}^{3x} + \mathrm{e}^{3x} \cdot 2x = x\mathrm{e}^{3x}(3x + 2)$.
③$\mathrm{e}^{3x} > 0$ always, so $\dfrac{\mathrm{d}y}{\mathrm{d}x} = 0$ when $x = 0$ or $x = -\dfrac23$.
Always factorise after the product rule. A common factor such as $\mathrm{e}^{3x}$ can never be zero, which makes solving $\frac{\mathrm{d}y}{\mathrm{d}x} = 0$ easy.
Worked Example 4 — With a logarithm

Differentiate $y = x^3\ln x$.

①$u = x^3$, $v = \ln x$; $\;u' = 3x^2$, $v' = \dfrac1x$.
②$\dfrac{\mathrm{d}y}{\mathrm{d}x} = x^3 \cdot \dfrac1x + \ln x \cdot 3x^2 = x^2 + 3x^2\ln x = x^2(1 + 3\ln x)$.
3 The Quotient Rule
The quotient rule
If $y = \dfrac{u}{v}$ then $\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{v\dfrac{\mathrm{d}u}{\mathrm{d}x} - u\dfrac{\mathrm{d}v}{\mathrm{d}x}}{v^2}$
The order matters because of the minus sign: "bottom times derivative of top, minus top times derivative of bottom, all over bottom squared".
Worked Example 5 — A rational function

Differentiate $y = \dfrac{2x + 1}{x - 3}$ and explain why the curve has no stationary points.

①$u = 2x + 1$, $v = x - 3$; $\;u' = 2$, $v' = 1$.
②$\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{(x - 3)(2) - (2x + 1)(1)}{(x - 3)^2} = \dfrac{-7}{(x - 3)^2}$.
③The numerator is the constant $-7$, never zero: no stationary points. (The gradient is always negative.)
Worked Example 6 — Proving the derivative of $\tan x$

Show that $\dfrac{\mathrm{d}}{\mathrm{d}x}(\tan x) = \sec^2 x$.

①$\tan x = \dfrac{\sin x}{\cos x}$; $u = \sin x$, $v = \cos x$, $u' = \cos x$, $v' = -\sin x$.
②$\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{\cos x \cdot \cos x - \sin x \cdot (-\sin x)}{\cos^2 x} = \dfrac{\cos^2 x + \sin^2 x}{\cos^2 x}$.
③$= \dfrac{1}{\cos^2 x} = \sec^2 x$. $\blacksquare$  (By the chain rule, $\tan kx \to k\sec^2 kx$.)

The same method gives the derivatives of the reciprocal trigonometric functions (they are in the formula booklet):

$y$$\sec x$$\operatorname{cosec} x$$\cot x$
$\dfrac{\mathrm{d}y}{\mathrm{d}x}$$\sec x\tan x$$-\operatorname{cosec} x\cot x$$-\operatorname{cosec}^2 x$
Worked Example 7 — Exponential over a polynomial

Differentiate $y = \dfrac{\mathrm{e}^{2x}}{x}$ and find the exact stationary point.

①$\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{x \cdot 2\mathrm{e}^{2x} - \mathrm{e}^{2x} \cdot 1}{x^2} = \dfrac{\mathrm{e}^{2x}(2x - 1)}{x^2}$.
②Zero when $2x - 1 = 0$, so $x = \tfrac12$ and $y = \dfrac{\mathrm{e}}{1/2} = 2\mathrm{e}$. Stationary point $\left(\tfrac12, 2\mathrm{e}\right)$.
You could use the product rule on $\mathrm{e}^{2x}x^{-1}$ instead. Both give the same answer; choose whichever you find more reliable.
4 Turning a Derivative Upside Down
Reciprocal of a derivative
$\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{1}{\;\dfrac{\mathrm{d}x}{\mathrm{d}y}\;}$
This follows from the chain rule: $\dfrac{\mathrm{d}y}{\mathrm{d}x} \times \dfrac{\mathrm{d}x}{\mathrm{d}y} = \dfrac{\mathrm{d}y}{\mathrm{d}y} = 1$. It is useful when $x$ is given as a function of $y$ and it is hard or impossible to rearrange for $y$.
Worked Example 8 — $x$ as a function of $y$

A curve has equation $x = y^3 + y$. Find the gradient at the point $(2, 1)$.

①Check the point: $1^3 + 1 = 2$ ✓.
②$\dfrac{\mathrm{d}x}{\mathrm{d}y} = 3y^2 + 1$, which is $4$ when $y = 1$.
③$\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac14$.
Rearranging $x = y^3 + y$ for $y$ would need the cubic formula. Turning the derivative upside down avoids it completely.
5 Quick Reference

Chain

$\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{\mathrm{d}y}{\mathrm{d}u}\cdot\dfrac{\mathrm{d}u}{\mathrm{d}x}$: outside, then times inside's derivative.

Product

$(uv)' = uv' + vu'$

Quotient

$\left(\dfrac uv\right)' = \dfrac{vu' - uv'}{v^2}$

$\mathrm{e}^{\mathrm{f}(x)}$

$\to \mathrm{f}'(x)\mathrm{e}^{\mathrm{f}(x)}$

$\ln\mathrm{f}(x)$

$\to \dfrac{\mathrm{f}'(x)}{\mathrm{f}(x)}$

Reciprocal

$\dfrac{\mathrm{d}y}{\mathrm{d}x} = 1 \Big/ \dfrac{\mathrm{d}x}{\mathrm{d}y}$

$\tan x$

$\sec^2 x$; $\;\sec x \to \sec x\tan x$

Tidy up

Factorise; exponentials are never zero.

6 Practice Questions
Question 1

Differentiate $y = (2x - 5)^6$.

▶ Show solution

$\dfrac{\mathrm{d}y}{\mathrm{d}x} = 6(2x - 5)^5 \times 2 = 12(2x - 5)^5$.

Question 2

Differentiate (a) $\mathrm{e}^{\sin x}$  (b) $\ln(\cos x)$.

▶ Show solution

(a) $\cos x\,\mathrm{e}^{\sin x}$.

(b) $\dfrac{-\sin x}{\cos x} = -\tan x$.

Question 3

Differentiate $y = x^2\sin x$.

▶ Show solution

$u = x^2$, $v = \sin x$: $\dfrac{\mathrm{d}y}{\mathrm{d}x} = x^2\cos x + 2x\sin x$.

Question 4

Differentiate $y = \dfrac{x}{x^2 + 1}$ and find the stationary points.

▶ Show solution

$\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{(x^2 + 1)(1) - x(2x)}{(x^2 + 1)^2} = \dfrac{1 - x^2}{(x^2 + 1)^2}$.

Zero when $x = \pm1$: stationary points $\left(1, \tfrac12\right)$ and $\left(-1, -\tfrac12\right)$.

Question 5

Show that $\dfrac{\mathrm{d}}{\mathrm{d}x}(\sec x) = \sec x\tan x$.

▶ Show solution

$\sec x = (\cos x)^{-1}$. By the chain rule: $-1(\cos x)^{-2} \times (-\sin x) = \dfrac{\sin x}{\cos^2 x}$.

$= \dfrac{1}{\cos x}\cdot\dfrac{\sin x}{\cos x} = \sec x\tan x$. $\blacksquare$

Question 6

A curve has equation $x = y^2 - 4y$. Find $\dfrac{\mathrm{d}y}{\mathrm{d}x}$ at the point where $y = 3$.

▶ Show solution

When $y = 3$, $x = 9 - 12 = -3$: the point $(-3, 3)$.

$\dfrac{\mathrm{d}x}{\mathrm{d}y} = 2y - 4 = 2$, so $\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac12$.

Question 7

Find the exact coordinates of the stationary point of $y = x\mathrm{e}^{-2x}$ and determine its nature.

▶ Show solution

$\dfrac{\mathrm{d}y}{\mathrm{d}x} = x(-2\mathrm{e}^{-2x}) + \mathrm{e}^{-2x} = \mathrm{e}^{-2x}(1 - 2x)$. Zero at $x = \tfrac12$, $y = \tfrac12\mathrm{e}^{-1} = \dfrac{1}{2\mathrm{e}}$.

For $x$ slightly less than $\tfrac12$, $1 - 2x > 0$ (increasing); slightly more, $1 - 2x < 0$ (decreasing). So $\left(\tfrac12, \tfrac{1}{2\mathrm{e}}\right)$ is a maximum.

Question 8

$\mathrm{f}(x) = \dfrac{\ln x}{x}$, $x > 0$. Find the exact maximum value of $\mathrm{f}(x)$.

▶ Show solution

$\mathrm{f}'(x) = \dfrac{x \cdot \frac1x - \ln x \cdot 1}{x^2} = \dfrac{1 - \ln x}{x^2}$.

Zero when $\ln x = 1$, i.e. $x = \mathrm{e}$. $\mathrm{f}'(x) > 0$ for $x < \mathrm{e}$ and $< 0$ for $x > \mathrm{e}$, so this is a maximum.

Maximum value $\mathrm{f}(\mathrm{e}) = \dfrac{1}{\mathrm{e}}$.

Question 9

Differentiate $y = \sqrt{x}\,(x + 2)^3$, giving your answer as a single fraction.

▶ Show solution

Product rule with $u = x^{1/2}$, $v = (x + 2)^3$: $u' = \dfrac{1}{2\sqrt x}$, $v' = 3(x + 2)^2$.

$\dfrac{\mathrm{d}y}{\mathrm{d}x} = 3\sqrt{x}(x + 2)^2 + \dfrac{(x + 2)^3}{2\sqrt x} = \dfrac{6x(x + 2)^2 + (x + 2)^3}{2\sqrt x}$

$= \dfrac{(x + 2)^2(6x + x + 2)}{2\sqrt x} = \dfrac{(x + 2)^2(7x + 2)}{2\sqrt x}$.

Question 10

$\mathrm{f}(x) = \dfrac{\sin x}{2 + \cos x}$, $\;0 \leqslant x \leqslant 2\pi$.

(a) Show that $\mathrm{f}'(x) = \dfrac{1 + 2\cos x}{(2 + \cos x)^2}$.
(b) Find the exact coordinates of the stationary points.
(c) Find the equation of the tangent at $x = \dfrac{\pi}{2}$.

▶ Show solution

(a) $u = \sin x$, $v = 2 + \cos x$, $u' = \cos x$, $v' = -\sin x$:

$\mathrm{f}'(x) = \dfrac{(2 + \cos x)\cos x + \sin^2 x}{(2 + \cos x)^2} = \dfrac{2\cos x + \cos^2 x + \sin^2 x}{(2 + \cos x)^2} = \dfrac{1 + 2\cos x}{(2 + \cos x)^2}$.

(b) $\cos x = -\tfrac12 \Rightarrow x = \dfrac{2\pi}{3}$ or $\dfrac{4\pi}{3}$.

$\mathrm{f}\!\left(\tfrac{2\pi}{3}\right) = \dfrac{\sqrt3/2}{3/2} = \dfrac{\sqrt3}{3}$ and $\mathrm{f}\!\left(\tfrac{4\pi}{3}\right) = -\dfrac{\sqrt3}{3}$.

Stationary points $\left(\tfrac{2\pi}{3}, \tfrac{\sqrt3}{3}\right)$ (maximum) and $\left(\tfrac{4\pi}{3}, -\tfrac{\sqrt3}{3}\right)$ (minimum).

(c) $\mathrm{f}\!\left(\tfrac{\pi}{2}\right) = \tfrac12$, $\mathrm{f}'\!\left(\tfrac{\pi}{2}\right) = \dfrac{1}{4}$.

$y - \tfrac12 = \tfrac14\left(x - \tfrac{\pi}{2}\right)$, i.e. $y = \tfrac14 x + \tfrac12 - \tfrac{\pi}{8}$.

Chain, Product and Quotient Rules · A Level Maths Year 2 · Created with MathJax