Second Derivative Test

The second derivative test classifies a critical point c where f′(c) = 0 by the sign of f″(c). If f''(c) \gt 0, the graph is concave up there, so f has a local minimum. If f''(c) \lt 0, it is concave down, so f has a local maximum. If f″(c) = 0, the test gives no answer.

Before this lesson: Concavity and Inflection Points, First Derivative Test and Critical Points

Why the second derivative test works

At a critical point with f′(c) = 0, the tangent line is flat. If the graph is concave up there, it bends up on both sides of the flat spot, like the bottom of a cup: a local minimum. If it is concave down, it bends down on both sides, like the top of a cap: a local maximum.

Graph of f(x) = 2x³ + 3x² − 36x for x from −5 to 4. At the critical point (−3, 81) the graph is concave down and has a local maximum; f″(−3) = −30. At (2, −44) it is concave up and has a local minimum; f″(2) = 30.
A negative f″ at a flat point means a hilltop; a positive f″ means a valley.

The second derivative test

At a critical number c with f′(c) = 0Conclusion
f''(c) \gt 0Local minimum at c
f''(c) \lt 0Local maximum at c
f''(c) = 0Test fails; use the first derivative test
  1. Find f′(x) and solve f′(x) = 0 to get the critical numbers.
  2. Find f″(x).
  3. Substitute each critical number into f″.
  4. Positive: local min. Negative: local max. Zero: go back to the first derivative test.

The test only applies where f′(c) = 0. At critical points where f′ does not exist, such as corners and cusps, use the first derivative test.

Second derivative test examples

Example 1: A cubic

Use the second derivative test to find the local extrema of f(x) = 2x^3 + 3x^2 - 36x.

f'(x) = 6x^2 + 6x - 36 = 6(x + 3)(x - 2)

Differentiate and factor out 6 (see factoring trinomials).

x = -3, \; x = 2

Critical numbers.

f''(x) = 12x + 6

Second derivative.

f''(-3) = -36 + 6 = -30

Negative: local maximum.

f''(2) = 24 + 6 = 30

Positive: local minimum.

f(-3) = -54 + 27 + 108 = 81

Local maximum value.

f(2) = 16 + 12 - 72 = -44

Local minimum value.

Answer: a local maximum of 81 at x = −3 and a local minimum of −44 at x = 2, as in the graph above.

Example 2: When the test fails

Classify the critical numbers of f(x) = x^4 - 4x^3.

f'(x) = 4x^3 - 12x^2 = 4x^2(x - 3)

Differentiate and factor.

x = 0, \; x = 3

Critical numbers.

f''(x) = 12x^2 - 24x

Second derivative.

f''(3) = 108 - 72 = 36

Positive: local minimum, f(3) = 81 − 108 = −27.

f''(0) = 0

The test gives no answer at x = 0.

f'(-1) = -16, \; f'(1) = -8

First derivative test at 0: negative on both sides.

Answer: local minimum of −27 at x = 3. At x = 0 there is no extremum: f′ doesn’t change sign.

Example 3: An exponential function

Classify the critical point of f(x) = xe^{-x}.

f'(x) = e^{-x}(1 - x) \Rightarrow x = 1

Product rule; e^(−x) is never 0.

f''(x) = -e^{-x}(1 - x) - e^{-x} = e^{-x}(x - 2)

Product rule on f′, then factor.

f''(1) = e^{-1}(-1) = -\frac{1}{e}

Negative: local maximum.

f(1) = \frac{1}{e} \approx 0.368

Local maximum value.

Answer: a local maximum of 1/e at x = 1.

Example 4: A trig function

Classify the critical points of f(x) = x - 2\sin x on (0, 2π).

f'(x) = 1 - 2\cos x = 0 \Rightarrow \cos x = \frac{1}{2}

Set f′ = 0.

x = \frac{\pi}{3}, \; x = \frac{5\pi}{3}

Cosine is ½ in Quadrants I and IV.

f''(x) = 2\sin x

Second derivative.

f''\left(\frac{\pi}{3}\right) = 2 \cdot \frac{\sqrt{3}}{2} = \sqrt{3}

Positive: local minimum.

f''\left(\frac{5\pi}{3}\right) = 2 \cdot \left(-\frac{\sqrt{3}}{2}\right) = -\sqrt{3}

Negative: local maximum.

f\left(\frac{\pi}{3}\right) = \frac{\pi}{3} - \sqrt{3} \approx -0.685

Local minimum value.

f\left(\frac{5\pi}{3}\right) = \frac{5\pi}{3} + \sqrt{3} \approx 6.968

Local maximum value.

Answer: local minimum ≈ −0.685 at x = π/3; local maximum ≈ 6.968 at x = 5π/3.

Example 5: Word problem with average cost

A factory’s average cost per item is \bar{C}(x) = 0.01x + 4 + \frac{400}{x} dollars when it makes x items. Find the production level with the lowest average cost.

\bar{C}'(x) = 0.01 - \frac{400}{x^2}

Differentiate.

0.01 = \frac{400}{x^2} \Rightarrow x^2 = 40{,}000

Set the derivative equal to 0 and solve for x².

x = 200

Take the positive square root; x counts items.

\bar{C}''(x) = \frac{800}{x^3}

Second derivative.

\bar{C}''(200) = \frac{800}{8{,}000{,}000} \gt 0

Positive: local minimum.

\bar{C}(200) = 2 + 4 + 2 = 8

Average cost at x = 200.

Answer: making 200 items gives the lowest average cost, $8 per item. Since x = 200 is the only critical point for x \gt 0, it is the absolute minimum too.

Common mistakes

MistakeExample of the errorFix
Mixing up the signs“f″ is positive, so it’s a max”Positive f″ means concave up, a cup: a minimum.
Calling f″(c) = 0 an inflection point or a non-extremumSaying x⁴ has no min at 0 because f″(0) = 0f″ = 0 means the test fails. x⁴ does have a min at 0.
Using the test where f′ is undefinedTrying it on the cusp of x^(2/3) at 0f″ doesn’t exist there either. Use the first derivative test.
Plugging the critical number into f′ instead of f″“f′(2) = 0, so it’s inconclusive”f′(c) is always 0 at these points. Check f″(c).
Forgetting the function value“The local max is −3”−3 is where it happens; the value is f(−3) = 81.

Related methods

First or second derivative test?

The second derivative test is quick when f″ is easy to find. The first derivative test always works, gives increasing and decreasing intervals too, and handles points where f′ does not exist. Many students use the second derivative test first and fall back to the first when f″(c) = 0.

One critical point means an absolute extremum

If a continuous function has only one critical point on an interval and the second derivative test says it is a local min, it is also the absolute min there. Optimization problems use this fact often.

Practice problems

  1. Use the second derivative test to classify the critical point of f(x) = x^2 - 8x + 3.
  2. Find the local extrema of f(x) = x^3 - 27x.
  3. Find the local extrema of f(x) = -x^3 + 6x^2 - 9x + 1.
  4. Find the local extrema of f(x) = x^4 - 8x^2.
  5. What does the second derivative test say about f(x) = x^4 at x = 0? Classify the point anyway.
  6. Classify the critical point of f(x) = x + \frac{1}{x} for x \gt 0.
  7. Classify the critical point of f(x) = x\ln x.
  8. Classify the critical point of f(x) = e^x - 2x.
  9. Classify the critical points of f(x) = \sin x + \cos x on (0, 2π).
  10. A company’s profit is P(x) = -x^3 + 9x^2 + 48x - 100 thousand dollars for x thousand items, with x ≥ 0. Find the maximum profit.
Show answers

1.

f'(x) = 2x - 8 = 0 \Rightarrow x = 4

Critical number.

f''(x) = 2 \gt 0

Positive: local minimum.

f(4) = 16 - 32 + 3 = -13

Value.

Answer: local min −13 at x = 4

2.

f'(x) = 3x^2 - 27 = 0 \Rightarrow x = \pm 3

Critical numbers.

f''(x) = 6x: \; f''(-3) = -18, \; f''(3) = 18

Max at −3, min at 3.

f(-3) = -27 + 81 = 54, \; f(3) = 27 - 81 = -54

Values.

Answer: local max 54 at x = −3; local min −54 at x = 3

3.

f'(x) = -3x^2 + 12x - 9 = -3(x - 1)(x - 3)

Critical numbers 1 and 3.

f''(x) = -6x + 12: \; f''(1) = 6, \; f''(3) = -6

Min at 1, max at 3.

f(1) = -1 + 6 - 9 + 1 = -3, \; f(3) = -27 + 54 - 27 + 1 = 1

Values.

Answer: local min −3 at x = 1; local max 1 at x = 3

4.

f'(x) = 4x^3 - 16x = 4x(x - 2)(x + 2)

Critical numbers 0 and ±2.

f''(x) = 12x^2 - 16: \; f''(0) = -16, \; f''(\pm 2) = 32

Max at 0, min at ±2.

f(0) = 0, \; f(\pm 2) = 16 - 32 = -16

Values.

Answer: local max 0 at x = 0; local min −16 at x = ±2

5.

f'(x) = 4x^3 = 0 \Rightarrow x = 0, \; f''(0) = 0

The test is inconclusive.

f'(-1) = -4, \; f'(1) = 4

First derivative test: − then +.

Answer: the second derivative test fails, but x = 0 is a local (and absolute) min, with value 0.

6.

f'(x) = 1 - \frac{1}{x^2} = 0 \Rightarrow x = 1

x = −1 is not in the domain x \gt 0.

f''(x) = \frac{2}{x^3}, \; f''(1) = 2 \gt 0

Positive: local min.

Answer: local min f(1) = 2 at x = 1

7.

f'(x) = \ln x + 1 = 0 \Rightarrow x = \frac{1}{e}

Critical number.

f''(x) = \frac{1}{x}, \; f''\left(\frac{1}{e}\right) = e \gt 0

Positive: local min.

Answer: local min -\frac{1}{e} at x = \frac{1}{e}

8.

f'(x) = e^x - 2 = 0 \Rightarrow x = \ln 2

Critical number.

f''(x) = e^x \gt 0

Always positive: local min.

f(\ln 2) = 2 - 2\ln 2 \approx 0.614

e^(ln 2) = 2.

Answer: local min 2 − 2 ln 2 ≈ 0.614 at x = ln 2

9.

f'(x) = \cos x - \sin x = 0 \Rightarrow x = \frac{\pi}{4}, \frac{5\pi}{4}

tan x = 1.

f''(x) = -\sin x - \cos x

Second derivative.

f''\left(\frac{\pi}{4}\right) = -\sqrt{2}, \; f''\left(\frac{5\pi}{4}\right) = \sqrt{2}

Max at π/4, min at 5π/4.

Answer: local max √2 at π/4; local min −√2 at 5π/4

10.

P'(x) = -3x^2 + 18x + 48 = -3(x - 8)(x + 2)

Critical numbers 8 and −2; only 8 has x ≥ 0.

P''(x) = -6x + 18, \; P''(8) = -30 \lt 0

Negative: local max.

P(8) = -512 + 576 + 384 - 100 = 348

Value.

Answer: the maximum profit is $348,000, at 8,000 items.

Second derivative test FAQ

What is the second derivative test?

At a critical point where f′(c) = 0, check f″(c). Positive means a local minimum, negative means a local maximum, and zero means the test fails.

What happens if the second derivative is zero?

The test gives no information. The point could be a max, a min or neither; use the first derivative test to decide.

Why does a positive second derivative mean a minimum?

f'' \gt 0 means the graph is concave up, like a cup. A flat point at the bottom of a cup is a low point.

When should I use the first derivative test instead?

When f″(c) = 0, when f′(c) doesn’t exist, or when f″ is messy to compute.

Summary

  • Use it at critical points where f′(c) = 0.
  • f''(c) \gt 0: local min. f''(c) \lt 0: local max.
  • f″(c) = 0: no conclusion; use the first derivative test.
  • Report the value f(c) and where it occurs.

Previous lesson: Concavity and Inflection Points

Next lesson: Curve Sketching

Back to the Calculus 1 Index