24.7 Higher Derivatives
SL 5.7 AHL 5.12
- the second derivative \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} = f''(x)\) and how to find it
- (AHL) higher derivatives \(\dfrac{\mathrm{d}^ny}{\mathrm{d}x^n} = f^{(n)}(x)\) and patterns in them
The second derivative
If \(y = f(x)\), then \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = f'(x)\) is the first derivative. Differentiate it again and you get the second derivative:
\[ \frac{\mathrm{d}^2y}{\mathrm{d}x^2} = \frac{\mathrm{d}}{\mathrm{d}x}\left(\frac{\mathrm{d}y}{\mathrm{d}x}\right) = f''(x) . \]
The second derivative measures how the gradient changes. You will use it for concavity and stationary points in Unit 25.
Example 1 Find \(f''(x)\) when
(a) \(f(x) = 2x^5 + \dfrac{4}{x^2}\)
(b) \(f(x) = x\sin 2x\)
(a) \(f(x) = 2x^5 + 4x^{-2}\), \(\;f'(x) = 10x^4 - 8x^{-3}\), \(\;f''(x) = 40x^3 + \dfrac{24}{x^4}\).
(b) \(f'(x) = \sin 2x + 2x\cos 2x\) (product rule). Differentiate again, using the product rule for the second term:
\[ \begin{aligned} f''(x) &= 2\cos 2x + \big(2\cos 2x - 4x\sin 2x\big) \\ &= 4\cos 2x - 4x\sin 2x . \end{aligned} \]
AHL Higher derivatives
Higher derivatives Not in the formula booklet
Differentiating \(n\) times gives the \(n\)th derivative:
\[ \frac{\mathrm{d}^ny}{\mathrm{d}x^n} = \frac{\mathrm{d}}{\mathrm{d}x}\left(\frac{\mathrm{d}^{n-1}y}{\mathrm{d}x^{n-1}}\right) = f^{(n)}(x), \qquad n \in \mathbb{Z}^+ . \]
Note: \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2}\) is not the same as \(\left(\dfrac{\mathrm{d}y}{\mathrm{d}x}\right)^2\).
- \(n\): the number of times we differentiate (\(n = 1, 2, 3, \ldots\))
- \(f^{(n)}(x)\): the \(n\)th derivative of \(f\)
Example 2 AHL Given that \(y = \tan(2x + 1)\), show that \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} = 4y\dfrac{\mathrm{d}y}{\mathrm{d}x}\).
\(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 2\sec^2(2x + 1) = 2\big(1 + \tan^2(2x + 1)\big) = 2(1 + y^2) = 2 + 2y^2\).
Differentiate again with respect to \(x\) (the term \(2y^2\) is differentiated implicitly):
\[ \frac{\mathrm{d}^2y}{\mathrm{d}x^2} = 4y\frac{\mathrm{d}y}{\mathrm{d}x} . \]
Sometimes the derivatives follow a pattern, and we can write a formula for \(f^{(n)}(x)\). Such formulae can be proved by mathematical induction (see 6.4).
Example 3 Let \(f(x) = \dfrac{1}{1 + x}\), \(x \neq -1\). Find \(f'(x)\), \(f''(x)\) and \(f'''(x)\), and suggest a formula for \(f^{(n)}(x)\).
\(f(x) = (1 + x)^{-1}\):
\[ f'(x) = -(1 + x)^{-2}, \qquad f''(x) = 2(1 + x)^{-3}, \qquad f'''(x) = -6(1 + x)^{-4} . \]
The signs alternate, the numbers are \(1, 2, 6 = 1!, 2!, 3!\), and the power is one more than \(n\):
\[ f^{(n)}(x) = \frac{(-1)^n\,n!}{(1 + x)^{n+1}} . \]
In Menu → Calculus → Numerical Derivative at a Point, the box Derivative at a Point has a list Derivative: with 1st Derivative, 2nd Derivative and nth Derivative. Choose 2nd Derivative. For example, for \(x\sin 2x\) at \(x = 1\) it gives \(-5.30178\), which agrees with \(4\cos 2 - 4\sin 2\).
Common errors
| ✗ Wrong | ✓ Right | Why |
|---|---|---|
| \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} = \left(\dfrac{\mathrm{d}y}{\mathrm{d}x}\right)^2\) | Differentiate \(\dfrac{\mathrm{d}y}{\mathrm{d}x}\) again | The second derivative is not a square. |
| \(\dfrac{\mathrm{d}}{\mathrm{d}x}(x\sin 2x) = 2\cos 2x\) | \(\sin 2x + 2x\cos 2x\) | \(x\sin 2x\) is a product: use the product rule (twice for \(f''\)). |
Exercises
1 Given \(f(x) = 3x^4 - 2x^3 + 5x\), find \(f''(2)\).
\(f'(x) = 12x^3 - 6x^2 + 5\), \(\;f''(x) = 36x^2 - 12x\), so \(f''(2) = 144 - 24 = 120\).
2 Find \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2}\) for \(y = \mathrm{e}^{3x} + \ln x\), \(\;x > 0\).
\(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 3\mathrm{e}^{3x} + \dfrac{1}{x}\), \(\;\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} = 9\mathrm{e}^{3x} - \dfrac{1}{x^2}\).
3 Given \(y = \sin 2x\), show that \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + 4y = 0\).
\(\dfrac{\mathrm{d}y}{\mathrm{d}x} = 2\cos 2x\), \(\;\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} = -4\sin 2x = -4y\), so \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + 4y = 0\) ✓.
4 Given \(f(x) = x^4 - 3x^2 + \dfrac{1}{x}\), find \(f''(x)\) and \(f''(1)\).
\(f'(x) = 4x^3 - 6x - x^{-2}\), \(\;f''(x) = 12x^2 - 6 + 2x^{-3} = 12x^2 - 6 + \dfrac{2}{x^3}\).
\(f''(1) = 12 - 6 + 2 = 8\).
5 Given \(y = \mathrm{e}^{-x}\cos x\), show that \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} + 2\dfrac{\mathrm{d}y}{\mathrm{d}x} + 2y = 0\).
\(\dfrac{\mathrm{d}y}{\mathrm{d}x} = -\mathrm{e}^{-x}\cos x - \mathrm{e}^{-x}\sin x = -\mathrm{e}^{-x}(\cos x + \sin x)\).
\(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} = \mathrm{e}^{-x}(\cos x + \sin x) - \mathrm{e}^{-x}(-\sin x + \cos x) = 2\mathrm{e}^{-x}\sin x\).
Then \(2\mathrm{e}^{-x}\sin x - 2\mathrm{e}^{-x}(\cos x + \sin x) + 2\mathrm{e}^{-x}\cos x = 0\) ✓.
6 AHL Let \(f(x) = x\mathrm{e}^x\). Find \(f'(x)\), \(f''(x)\) and \(f'''(x)\), and suggest a formula for \(f^{(n)}(x)\).
\(f'(x) = \mathrm{e}^x + x\mathrm{e}^x = (x + 1)\mathrm{e}^x\), \(\;f''(x) = \mathrm{e}^x + (x + 1)\mathrm{e}^x = (x + 2)\mathrm{e}^x\), \(\;f'''(x) = (x + 3)\mathrm{e}^x\).
So \(f^{(n)}(x) = (x + n)\mathrm{e}^x\).
7 AHL For \(x^2 + y^2 = 25\), show that \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} = -\dfrac{25}{y^3}\).
By implicit differentiation (24.6), \(\dfrac{\mathrm{d}y}{\mathrm{d}x} = -\dfrac{x}{y}\). Quotient rule:
\[ \begin{aligned} \frac{\mathrm{d}^2y}{\mathrm{d}x^2} &= -\frac{y \cdot 1 - x\frac{\mathrm{d}y}{\mathrm{d}x}}{y^2} \\ &= -\frac{y + \frac{x^2}{y}}{y^2} \\ &= -\frac{y^2 + x^2}{y^3} \\ &= -\frac{25}{y^3} . \end{aligned} \]