23.9 The Second Derivative

IB Math AA SL and HL: the second derivative dfracd2ydx2 = f’’(x) and how to find it. Worked examples and practice questions with solutions.

SL 5.7

In this section you will learn
  • the second derivative \(\dfrac{\mathrm{d}^2y}{\mathrm{d}x^2} = f''(x)\) and how to find it

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 24.

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} \]

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\).

HL students: continue with 23.10 Higher Derivatives.

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 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\) ✓.

3 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\) ✓.