24.3 The Chain, Product and Quotient Rules
SL 5.6
- the chain rule for differentiating a composite function, such as \((x^2 + 2)^3\)
- the short form \(\dfrac{\mathrm{d}}{\mathrm{d}x}\left(u^n\right) = nu^{n-1}\dfrac{\mathrm{d}u}{\mathrm{d}x}\)
- the product rule for \(y = uv\)
- the quotient rule for \(y = \dfrac{u}{v}\)
- how to choose the right rule and simplify the answer by factorising
The chain rule
How do we differentiate \(y = (x^2 + 2)^3\)? One way is to expand the bracket first. This is fine for a small power, but not for \((x^2 + 2)^{20}\) or \(\sqrt{x^2 + 2}\). The chain rule lets us differentiate without expanding.
The function \(y = (x^2 + 2)^3\) is a composite function (see 9.4): first \(u = x^2 + 2\), and then \(y = u^3\).
Example 1 Let \(y = (x^2 + 2)^3\).
(a) Expand \((x^2 + 2)^3\) using the binomial theorem, and then find \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\).
(b) Let \(u = x^2 + 2\). Write \(y\) in terms of \(u\), and find \(\dfrac{\mathrm{d}y}{\mathrm{d}u}\) and \(\dfrac{\mathrm{d}u}{\mathrm{d}x}\).
(c) Show that \(\dfrac{\mathrm{d}y}{\mathrm{d}u} \times \dfrac{\mathrm{d}u}{\mathrm{d}x}\) is the same as your answer to (a).
(a) \((x^2 + 2)^3 = x^6 + 3(x^4)(2) + 3(x^2)(4) + 8 = x^6 + 6x^4 + 12x^2 + 8\) (see 4.2). So
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = 6x^5 + 24x^3 + 24x . \]
(b) \(y = u^3\), so \(\dfrac{\mathrm{d}y}{\mathrm{d}u} = 3u^2\), and \(\dfrac{\mathrm{d}u}{\mathrm{d}x} = 2x\).
(c) \(\dfrac{\mathrm{d}y}{\mathrm{d}u} \times \dfrac{\mathrm{d}u}{\mathrm{d}x} = 3u^2 \times 2x = 6x(x^2 + 2)^2 = 6x(x^4 + 4x^2 + 4) = 6x^5 + 24x^3 + 24x\).
The two answers are the same. Method (b) is much quicker, and it still works when the power is large or a fraction.
The chain rule In the formula booklet
\[ y = g(u), \text{ where } u = f(x) \quad\Rightarrow\quad \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{\mathrm{d}y}{\mathrm{d}u} \times \frac{\mathrm{d}u}{\mathrm{d}x} \]
In words: differentiate the outside function, keep the inside the same, then multiply by the derivative of the inside.
- \(y\): the composite function, \(y = g\big(f(x)\big)\)
- \(g\): the outside function
- \(u\): the inside function, \(u = f(x)\)
Example 2 Differentiate with respect to \(x\):
(a) \((2x^2 - 5x + 3)^6\)
(b) \(\dfrac{1}{(3x^2 + 2x - 4)^3}\)
(c) \(\sqrt{5x - x^3}\)
(a) Let \(u = 2x^2 - 5x + 3\), so \(y = u^6\), \(\;\dfrac{\mathrm{d}y}{\mathrm{d}u} = 6u^5\), \(\;\dfrac{\mathrm{d}u}{\mathrm{d}x} = 4x - 5\).
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = 6(2x^2 - 5x + 3)^5(4x - 5) . \]
(b) \(y = (3x^2 + 2x - 4)^{-3}\). Let \(u = 3x^2 + 2x - 4\), so \(\dfrac{\mathrm{d}u}{\mathrm{d}x} = 6x + 2\).
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = -3(3x^2 + 2x - 4)^{-4}(6x + 2) = -\frac{6(3x + 1)}{(3x^2 + 2x - 4)^4} . \]
(c) \(y = (5x - x^3)^{\frac{1}{2}}\). The inside has derivative \(5 - 3x^2\).
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{1}{2}(5x - x^3)^{-\frac{1}{2}}(5 - 3x^2) = \frac{5 - 3x^2}{2\sqrt{5x - x^3}} . \]
With practice you do not need to write \(u\). For any power of a function \(u\) of \(x\):
Powers of a function Not in the formula booklet
\[ \frac{\mathrm{d}}{\mathrm{d}x}\left(u^n\right) = nu^{n-1}\,\frac{\mathrm{d}u}{\mathrm{d}x} \qquad\text{for example}\qquad \frac{\mathrm{d}}{\mathrm{d}x}(ax + b)^n = an(ax + b)^{n-1} \]
- \(u\): a function of \(x\) (the inside)
- \(n\): the power
- \(a\), \(b\): constants
The product rule
To differentiate a product such as \((x^2 + 3x - 1)(x^3 - 2x + 5)\) we could expand, but often this is long, and it is impossible for products like \(x^3\sqrt{2x + 1}\). We use the product rule.
The product rule In the formula booklet
\[ y = uv \quad\Rightarrow\quad \frac{\mathrm{d}y}{\mathrm{d}x} = u\frac{\mathrm{d}v}{\mathrm{d}x} + v\frac{\mathrm{d}u}{\mathrm{d}x} \]
Here \(u\) and \(v\) are functions of \(x\).
“First times derivative of second, plus second times derivative of first.”
Example 3 (a) Find \(f'(x)\) if \(f(x) = x^3(2 - 3x)^5\). Give your answer in fully factorised form.
(b) Use the product rule to find \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\) if \(y = \dfrac{3x}{x^2 + 4}\).
(a) \(u = x^3\), \(u' = 3x^2\); \(\;v = (2 - 3x)^5\), \(v' = 5(2 - 3x)^4(-3) = -15(2 - 3x)^4\).
\[ \begin{aligned} f'(x) &= x^3 \times \big(-15(2 - 3x)^4\big) + (2 - 3x)^5 \times 3x^2 \\ &= 3x^2(2 - 3x)^4\big[-5x + (2 - 3x)\big] \\ &= 3x^2(2 - 3x)^4(2 - 8x) \\ &= 6x^2(2 - 3x)^4(1 - 4x) . \end{aligned} \]
(b) Write \(y = 3x(x^2 + 4)^{-1}\). \(\;u = 3x\), \(u' = 3\); \(\;v = (x^2 + 4)^{-1}\), \(v' = -2x(x^2 + 4)^{-2}\).
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = 3x \times \big(-2x(x^2 + 4)^{-2}\big) + 3(x^2 + 4)^{-1} = \frac{-6x^2 + 3(x^2 + 4)}{(x^2 + 4)^2} = \frac{12 - 3x^2}{(x^2 + 4)^2} . \]
To simplify a product-rule answer, take out the common factors with the lowest powers, as in (a).
The quotient rule
A function such as \(y = \dfrac{3x}{x^2 + 4}\) can be written as a product (as above), or differentiated directly with the quotient rule.
The quotient rule In the formula booklet
\[ y = \frac{u}{v} \quad\Rightarrow\quad \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{v\dfrac{\mathrm{d}u}{\mathrm{d}x} - u\dfrac{\mathrm{d}v}{\mathrm{d}x}}{v^2} \]
Here \(u\) and \(v\) are functions of \(x\), with \(v \neq 0\).
The order matters: the numerator starts with \(v\) (the bottom).
Example 4 If \(y = \dfrac{x^2 + 5}{x - 3}\), find \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\).
\(u = x^2 + 5\), \(u' = 2x\); \(\;v = x - 3\), \(v' = 1\).
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{(x - 3)(2x) - (x^2 + 5)(1)}{(x - 3)^2} = \frac{2x^2 - 6x - x^2 - 5}{(x - 3)^2} = \frac{x^2 - 6x - 5}{(x - 3)^2} . \]
Example 5 Find \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\) if \(y = \dfrac{x}{\sqrt{2x + 1}}\), and find the gradient of the curve at \(x = 4\).
\(u = x\), \(u' = 1\); \(\;v = (2x + 1)^{\frac{1}{2}}\), \(v' = \dfrac{1}{2}(2x + 1)^{-\frac{1}{2}} \times 2 = (2x + 1)^{-\frac{1}{2}}\).
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{(2x + 1)^{\frac{1}{2}} - x(2x + 1)^{-\frac{1}{2}}}{2x + 1} . \]
Multiply the top and bottom by \((2x + 1)^{\frac{1}{2}}\):
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{(2x + 1) - x}{(2x + 1)^{\frac{3}{2}}} = \frac{x + 1}{(2x + 1)^{\frac{3}{2}}} . \]
At \(x = 4\): \(\;\dfrac{5}{9^{\frac{3}{2}}} = \dfrac{5}{27}\).
On a Calculator page: Menu → Calculus → Numerical Derivative at a Point. Choose the variable \(x\), the value \(4\) and the 1st derivative, then type \(\dfrac{x}{\sqrt{2x + 1}}\). The result \(0.185185\ldots\) agrees with \(\dfrac{5}{27}\). This is a good way to check a long product or quotient rule answer.
Common errors
| ✗ Wrong | ✓ Right | Why |
|---|---|---|
| \(\dfrac{\mathrm{d}}{\mathrm{d}x}(3x + 1)^5 = 5(3x + 1)^4\) | \(15(3x + 1)^4\) | Multiply by the derivative of the inside. |
| \(\dfrac{\mathrm{d}}{\mathrm{d}x}(uv) = \dfrac{\mathrm{d}u}{\mathrm{d}x} \times \dfrac{\mathrm{d}v}{\mathrm{d}x}\) | \(u\dfrac{\mathrm{d}v}{\mathrm{d}x} + v\dfrac{\mathrm{d}u}{\mathrm{d}x}\) | A product needs the product rule. |
| \(\dfrac{u\,v' - v\,u'}{v^2}\) | \(\dfrac{v\,u' - u\,v'}{v^2}\) | The wrong order changes the sign. |
| \(\dfrac{\mathrm{d}}{\mathrm{d}x}\sqrt{x^2 + 1} = \dfrac{1}{2\sqrt{x^2 + 1}}\) | \(\dfrac{x}{\sqrt{x^2 + 1}}\) | Do not forget the factor \(2x\) from the inside. |
| Expanding \((x - 1)^4(x + 2)\) after differentiating | Factorise: \((x - 1)^3(\ldots)\) | Common factors make the answer simpler and easier to use. |
Exercises
1 Differentiate \(y = (3x + 1)^7\).
\(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 7(3x + 1)^6 \times 3 = 21(3x + 1)^6\).
2 Differentiate \(y = (x^2 - 4x)^{-2}\).
\(\dfrac{\mathrm{d}y}{\mathrm{d}x} = -2(x^2 - 4x)^{-3}(2x - 4) = -\dfrac{4(x - 2)}{(x^2 - 4x)^3}\).
3 Differentiate \(y = \sqrt[3]{6x^2 + 1}\).
\(y = (6x^2 + 1)^{\frac{1}{3}}\), so \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = \dfrac{1}{3}(6x^2 + 1)^{-\frac{2}{3}} \times 12x = \dfrac{4x}{(6x^2 + 1)^{\frac{2}{3}}}\).
4 Differentiate \(y = \dfrac{5}{(2 - x)^4}\).
\(y = 5(2 - x)^{-4}\), so \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = -20(2 - x)^{-5} \times (-1) = \dfrac{20}{(2 - x)^5}\).
5 Find \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\) for \(y = (x + 2)(x - 1)^4\), giving your answer in factorised form.
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = (x + 2) \times 4(x - 1)^3 + (x - 1)^4 \times 1 = (x - 1)^3\big[4x + 8 + x - 1\big] = (x - 1)^3(5x + 7) . \]
6 Find \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\) for \(y = x^2\sqrt{x + 3}\), giving your answer as a single fraction.
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = 2x\sqrt{x + 3} + \frac{x^2}{2\sqrt{x + 3}} = \frac{4x(x + 3) + x^2}{2\sqrt{x + 3}} = \frac{x(5x + 12)}{2\sqrt{x + 3}} . \]
7 Find \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\) for \(y = \dfrac{2x - 1}{x + 3}\).
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{(x + 3)(2) - (2x - 1)(1)}{(x + 3)^2} = \frac{7}{(x + 3)^2} . \]
8 Find \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\) for \(y = \dfrac{x^2}{1 - x^2}\).
\[ \frac{\mathrm{d}y}{\mathrm{d}x} = \frac{(1 - x^2)(2x) - x^2(-2x)}{(1 - x^2)^2} = \frac{2x}{(1 - x^2)^2} . \]
9 Find the gradient of the curve \(y = (x^2 - 3)^4\) at the point where \(x = 2\).
\(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 4(x^2 - 3)^3 \times 2x = 8x(x^2 - 3)^3\). At \(x = 2\): \(\;8 \times 2 \times 1^3 = 16\).
10 \(f(x) = \dfrac{x^2 + k}{x - 1}\), \(x \neq 1\), where \(k\) is a constant. Given that \(f'(3) = 0\), find \(k\).
\[ f'(x) = \frac{(x - 1)(2x) - (x^2 + k)}{(x - 1)^2} = \frac{x^2 - 2x - k}{(x - 1)^2} . \]
\(f'(3) = \dfrac{9 - 6 - k}{4} = 0\), so \(k = 3\).