Topic 3.6

Find a second derivative

Builds on finding a derivative with the product, quotient and chain rules. 7 minutes.

The slope of the slope

The top graph shows \(f(x) = \tfrac13x^3 - 2x^2 + 3x\), and the middle graph shows its slope, \(f'(x) = x^2 - 4x + 3\). The orange bar on the middle graph is as high as the slope of the top curve.

The middle graph is also a curve, so it has a slope at every \(x\). Drag the point along the top curve. The small orange tangent on the middle graph has slope \(f''(x)\), which is the second derivative.

The middle graph is green where it rises and red where it falls. At \(x = 1\) it falls through 0 with slope \(-2\), and at \(x = 3\) it rises through 0 with slope 2.

The bottom graph plots these slopes. It is the line \(f''(x) = 2x - 4\), which is 0 at \(x = 2\), the lowest point of the middle graph.

The derivative of the derivative

The first derivative \(f'\) is a function, so you can differentiate it to find \(f''\), the second derivative.

Drag the point. The bottom graph is green where \(f''\) is positive, which is where the middle graph rises. The tangents of \(f\) then tilt more and more upward, so the top curve bends like a cup, which is called concave up.

The bottom graph is red where \(f''\) is negative, which is where the middle graph falls. The top curve then bends like a cap, which is called concave down.

Notation

  1. Differentiate \(f\) to find \(f'\). The orange bar on the middle graph is as high as the slope of \(f\).

    \[f'(x) = \frac{d}{dx}f(x)\]
  2. Differentiate the whole of \(f'\) to find \(f''\), using whichever rules \(f'\) needs. The small orange tangent on the middle graph has slope \(f''(x)\).

    \[\cy{f''(x)} = \big(f'(x)\big)'\]
  3. The second derivative is the derivative of the first derivative. In Leibniz notation, the small 2s show that you differentiate twice.

    \[\frac{d^2y}{dx^2} = \frac{d}{dx}\left(\frac{dy}{dx}\right)\]
  4. The second derivative exists at \(x\) only if \(f'\) is differentiable at \(x\).

When it fails

Take \(f(x) = x|x|\), which is \(-x^2\) for \(x < 0\) and \(x^2\) for \(x \ge 0\). Its slope is \(f'(x) = 2|x|\), a V-shaped graph with a corner at \(x = 0\), where \(f'(0) = 0\) exists.

The middle graph has slope \(-2\) left of the corner and 2 right of it, so it has no tangent and \(f''(0)\) does not exist.

Example 1: a polynomial

Find \(g''(x)\) for \(g(x) = x^4 - 8x^2 + 3\). Then find \(g''(1)\) and \(g''(2)\).

  1. Differentiate each term of \(g\). The middle graph shows the result.

    \[g'(x) = 4x^3 - 16x\]
  2. Differentiate each term of \(g'\). The bottom graph shows the result.

    \[g''(x) = 12x^2 - 16\]
  3. At \(x = 1\), the middle graph is red and falls, so \(g''(1)\) is negative.

    \[g''(1) = 12 - 16 = \cr{-4}\]
  4. At \(x = 2\), the middle graph is green and rises steeply, so \(g''(2)\) is large and positive.

    \[g''(2) = 48 - 16 = \cg{32}\]

Example 2: a quotient

Find \(f''(x)\) for \(f(x) = \dfrac{x}{x^2 + 4}\).

  1. The last operation is a quotient, so the quotient rule gives the first derivative.

    \[\begin{aligned} f'(x) &= \frac{(x^2 + 4) - x \cdot 2x}{(x^2 + 4)^2} \\ &= \frac{4 - x^2}{(x^2 + 4)^2} \end{aligned}\]
  2. The derivative \(f'\) is also a quotient, so differentiate all of it, including its bottom.

  3. A tempting wrong move: Differentiate the top of \(f'\) and keep the bottom.

    \[f''(x) = \frac{-2x}{(x^2 + 4)^2}\]

    At \(x = 4\) this gives \(-0.02\), where the red curve on the bottom graph lies below the axis. But the middle graph rises at \(x = 4\), so \(f''(4)\) must be positive.

  4. Write \(u = x^2 + 4\), so \(u' = 2x\) and, by the chain rule, the bottom \(u^2\) has derivative \(2u \cdot 2x\). Apply the quotient rule to the whole fraction. Then cancel one factor of \(u\) from the top and the bottom.

    \[\begin{aligned} f''(x) &= \frac{-2xu^2 - (4 - x^2) \cdot 4xu}{u^4} \\ &= \frac{-2xu - 4x(4 - x^2)}{u^3} \\ &= \frac{2x(x^2 - 12)}{(x^2 + 4)^3} \end{aligned}\]
  5. At \(x = 4\), the second derivative is positive, and \(\frac{1}{250} = 0.004\) is the slope of the tangent on the middle graph.

    \[f''(4) = \frac{8 \cdot 4}{20^3} = \frac{1}{250}\]

Practice

Find \(f''(x)\) for \(f(x) = e^{x^2}\).

The first derivative is a product, so the second derivative has two terms. As a check, your formula should give about 16.31 at \(x = 1\), the slope of the middle graph there.

Solution
  1. The chain rule gives the first derivative.

    \[f'(x) = 2x\,e^{x^2}\]
  2. The first derivative is a product, so the product rule gives two terms. The second term needs the chain rule again.

    \[\begin{aligned} f''(x) &= 2e^{x^2} + 2x \cdot 2x\,e^{x^2} \\ &= (2 + 4x^2)\,e^{x^2} \end{aligned}\]
  3. As a check, \(f''(1) = 6e \approx 16.31\), which matches the tangent on the middle graph.

Questions

The figure shows \(f(x) = \tfrac13x^3 - 2x^2 + 3x\) with its first and second derivatives.

  1. At \(x = 1\) the middle graph falls through 0. What does this say about \(f''(1)\)?

    • \(f''(1)\) is negative, because \(f'\) is falling.
    • \(f''(1) = 0\), because \(f'(1) = 0\).
    • \(f''(1)\) is positive, because \(f\) has a peak at \(x = 1\).
    Answer

    \(f''(1)\) is negative, because \(f'\) is falling.

  2. At \(x = 2\) the middle graph has its lowest point. What is \(f''(2)\)?

    • 0
    • \(-1\)
    • 2
    Answer

    0

  3. Let \(g(x) = (2x + 1)^4\). What is \(g''(1)\)?

    • 432
    • 216
    • 108
    Answer

    432

Summary

You differentiate the whole first derivative again, using whichever rules that expression needs.

This works because the first derivative is a function with its own slope, and that slope is the second derivative.

You read the sign of the second derivative to see whether the slope rises or falls.

This is one of four skills in topic 3.6 of Which & Why: AP Calculus.