• Foundation
  • About 16 min
  • 5 practice questions

Local maxima and minima: the first and second derivative tests

Find the stationary points of a function, decide whether each is a local maximum, a local minimum or neither using f′ or f″, and work out the maximum and minimum values.

If something looks wrong, please tell us.

Many questions ask for the largest or smallest value of something: the greatest profit, the least cost, the highest point of a path. The first step is to find the turning points of a function and decide which are peaks and which are valleys. This lesson gives two tests for doing that.

Local maximum and local minimum

f has a local maximum at x = c if f(c) is larger than the values of f at all nearby points: a peak. It has a local minimum at c if f(c) is smaller than all nearby values: a valley. At a smooth peak or valley the tangent is horizontal, so f′(c) = 0. Points where f′(x) = 0 are called stationary points (or critical points); they are the candidates for maxima and minima.

The first derivative test

  • f′ changes from + to − as x passes c: local maximum (rising, then falling).
  • f′ changes from − to + as x passes c: local minimum (falling, then rising).
  • f′ does not change sign: neither. For example, f(x) = x³ keeps rising through x = 0.

The second derivative test

f″(x) tells how the slope itself is changing. If f′(c) = 0 and f″(c) < 0, the slope is going from positive to negative, so c is a local maximum. If f′(c) = 0 and f″(c) > 0, c is a local minimum. If f″(c) = 0 the test gives no answer, and you go back to the first derivative test.

Stationary point: f′(c) = 0. f″(c) < 0: local maximum. f″(c) > 0: local minimum. f″(c) = 0: no conclusion, so check the sign change of f′.

Worked example 1: a cubic

f(x) = x³ − 3x² − 9x + 5. f′(x) = 3x² − 6x − 9 = 3(x − 3)(x + 1), so the stationary points are x = −1 and x = 3. f″(x) = 6x − 6. At x = −1, f″ = −12 < 0: a local maximum with value f(−1) = −1 − 3 + 9 + 5 = 10. At x = 3, f″ = 12 > 0: a local minimum with value f(3) = 27 − 27 − 27 + 5 = −22.

Worked example 2: when the second derivative test fails

f(x) = x⁴ − 4x³. f′(x) = 4x³ − 12x² = 4x²(x − 3), which is zero at x = 0 and x = 3. f″(x) = 12x² − 24x, so f″(3) = 36 > 0 (a local minimum, with value f(3) = 81 − 108 = −27) but f″(0) = 0, which tells us nothing. Use signs instead: just left of 0 and just right of 0, 4x² is positive and x − 3 is negative, so f′ is negative on both sides. There is no sign change, so x = 0 is neither a maximum nor a minimum.

Worked example 3: a maximum below a minimum

f(x) = x + 1/x, x ≠ 0. f′(x) = 1 − 1/x² = 0 gives x = 1 or x = −1. f″(x) = 2/x³. At x = 1, f″ = 2 > 0: a local minimum with value 2. At x = −1, f″ = −2 < 0: a local maximum with value −2. The local maximum value is smaller than the local minimum value. That is no contradiction: 'local' compares a point only with its neighbours, and these two points lie on separate branches of the graph.

Method

  1. Find f′(x) and solve f′(x) = 0.
  2. For each stationary point, find the sign of f″ there, or the sign of f′ on each side.
  3. Name each point a maximum, a minimum or neither.
  4. Substitute into f (not into f′) to get the maximum or minimum value.

Key takeaways: turning points come from f′(x) = 0. A change in f′ from + to − is a maximum and from − to + is a minimum. With the second derivative, negative means maximum, positive means minimum and zero means use the first test. The maximum value is f(c), not c itself.

Check your understanding

  1. 1. What is the minimum value of f(x) = x² − 10x + 7?

    1. −18
    2. 5
    3. −25
    4. 7
    Show answer

    Answer: A. f′(x) = 2x − 10 = 0 at x = 5, and f″ = 2 > 0, so it is a minimum. The value is f(5) = 25 − 50 + 7 = −18. (5 is where it occurs, not the value.)

  2. 2. What is the local maximum value of f(x) = x³ − 48x?

    1. −128
    2. −4
    3. 0
    4. 128
    Show answer

    Answer: D. f′(x) = 3x² − 48 = 0 gives x = ±4. f″(x) = 6x is −24 at x = −4, so that is the maximum: f(−4) = −64 + 192 = 128. (x = 4 gives the local minimum −128.)

  3. 3. At which value of x does f(x) = 2x³ − 15x² + 36x + 1 have a local minimum?

    1. x = 3
    2. x = 2
    3. x = 5
    4. x = −3
    Show answer

    Answer: A. f′(x) = 6x² − 30x + 36 = 6(x − 2)(x − 3). f″(x) = 12x − 30: f″(2) = −6 < 0 (maximum) and f″(3) = 6 > 0 (minimum). So the local minimum is at x = 3.

  4. 4. For f(x) = x⁴, f′(0) = 0 and f″(0) = 0. What happens at x = 0?

    1. A local maximum
    2. Neither a maximum nor a minimum
    3. A local minimum
    4. f is not differentiable there
    Show answer

    Answer: C. The second derivative test fails because f″(0) = 0. Use the first derivative: f′(x) = 4x³ is negative just left of 0 and positive just right of 0, a change from − to +, so x = 0 is a local minimum (indeed x⁴ ≥ 0 everywhere).

  5. 5. By how much does the local maximum value of f(x) = x³ + 3x² − 9x + 1 exceed its local minimum value?

    1. 24
    2. 32
    3. 28
    4. 36
    Show answer

    Answer: B. f′(x) = 3x² + 6x − 9 = 3(x + 3)(x − 1). f″(x) = 6x + 6: negative at x = −3 (maximum), positive at x = 1 (minimum). f(−3) = −27 + 27 + 27 + 1 = 28 and f(1) = 1 + 3 − 9 + 1 = −4. The difference is 28 − (−4) = 32.

Privacy · Terms · Refunds · Delivery