- Foundation
- About 20 min
- 5 practice questions
Local maxima and minima: first and second derivative tests
Find critical points, classify them as local maxima, local minima or points of inflection using the first derivative test, and use the second derivative test where it applies.
If something looks wrong, please tell us.
By the end of this lesson you can
- Define local maximum and local minimum and find critical points.
- Apply the first derivative test, including at points where f is not differentiable.
- Apply the second derivative test and know when it fails.
The tops of hills and the bottoms of valleys on a graph are where a function stops rising and starts falling, or the reverse. Finding these turning points is essential for sketching curves and for every optimisation problem in Lesson 5.
Definitions
Let c be an interior point of the domain of f. c is a point of local maxima if there is h > 0 with f(c) ≥ f(x) for all x in (c − h, c + h); f(c) is then a local maximum value. c is a point of local minima if f(c) ≤ f(x) for all x in some such interval; f(c) is a local minimum value. 'Local' means compared only with nearby points; a local maximum need not be the largest value overall.
Theorem. If f has a local maximum or minimum at c, then either f′(c) = 0 or f is not differentiable at c. Such points are called critical points. The converse is false: f(x) = x³ has f′(0) = 0, but 0 is neither a maximum nor a minimum; such a point, where f′ does not change sign, is called a point of inflection.
First derivative test
Let f be continuous at a critical point c. As x increases through c: if f′ changes from positive to negative, c is a point of local maxima; if f′ changes from negative to positive, c is a point of local minima; if f′ does not change sign, c is neither (a point of inflection).
Reading the sign change of f′ at a critical point
-
Local maximum
- f′ positive just left of c
- f′ negative just right of c
- Graph rises then falls
-
Local minimum
- f′ negative just left of c
- f′ positive just right of c
- Graph falls then rises
-
Neither (inflection)
- f′ keeps the same sign
- Graph keeps rising or keeps falling
- Example: x³ at 0
Second derivative test
Let f be twice differentiable at c with f′(c) = 0. Then: if f″(c) < 0, c is a point of local maxima; if f″(c) > 0, c is a point of local minima; if f″(c) = 0, the test fails and we go back to the first derivative test.
f′(c) = 0 and f″(c) < 0 ⇒ local maximum. f′(c) = 0 and f″(c) > 0 ⇒ local minimum. f″(c) = 0 ⇒ no conclusion; use the first derivative test.
Worked examples
Worked example 1. f(x) = x³ − 6x² + 9x + 1. Working: f′(x) = 3x² − 12x + 9 = 3(x − 1)(x − 3), so the critical points are 1 and 3. f″(x) = 6x − 12. At x = 1: f″(1) = −6 < 0, so local maximum f(1) = 1 − 6 + 9 + 1 = 5. At x = 3: f″(3) = 6 > 0, so local minimum f(3) = 27 − 54 + 27 + 1 = 1. (First derivative check: f′ is + before 1, − between 1 and 3, + after 3.)
Worked example 2 (second test fails). f(x) = x⁴. Working: f′(x) = 4x³ = 0 at x = 0, and f″(x) = 12x², so f″(0) = 0: the test fails. First derivative test: f′ < 0 for x < 0 and f′ > 0 for x > 0, so x = 0 gives a local minimum, f(0) = 0.
Worked example 3 (not differentiable). f(x) = 2 + |x − 1|. f is not differentiable at x = 1, so it is a critical point. For x < 1, f(x) = 3 − x and f′ = −1 < 0; for x > 1, f(x) = 1 + x and f′ = 1 > 0. By the first derivative test, x = 1 is a point of local minima, with value 2. The second derivative test cannot be used here.
Worked example 4 (a surprise). f(x) = x + 1/x, x ≠ 0. Working: f′(x) = 1 − 1/x² = 0 at x = ±1, and f″(x) = 2/x³. f″(1) = 2 > 0: local minimum f(1) = 2. f″(−1) = −2 < 0: local maximum f(−1) = −2. Here the local maximum value (−2) is smaller than the local minimum value (2): local values compare only with nearby points.
| Function | Critical point | Test used | Result |
|---|---|---|---|
| x³ − 6x² + 9x + 1 | x = 1 | f″ = −6 < 0 | Local max 5 |
| x³ − 6x² + 9x + 1 | x = 3 | f″ = 6 > 0 | Local min 1 |
| x⁴ | x = 0 | f″ = 0, first test | Local min 0 |
| x³ | x = 0 | f′ does not change sign | Inflection |
| 2 + |x − 1| | x = 1 | First test (no derivative) | Local min 2 |
Key takeaways: local extrema occur only at critical points (f′ = 0 or f′ undefined). The first derivative test always works when f is continuous at the point; the second derivative test is quicker but fails when f″(c) = 0 and cannot be used where f′ does not exist. Local maximum and minimum values are about nearby points only.
Check your understanding
-
1. What is the local minimum value of f(x) = x² − 8x + 12?
- 12
- −4
- 4
- −20
Show answer
Answer: B. f′(x) = 2x − 8 = 0 at x = 4, and f″ = 2 > 0, so x = 4 is a local minimum. f(4) = 16 − 32 + 12 = −4.
-
2. For f(x) = x³ − 3x + 2, which is a point of local maxima?
- x = 1
- x = 0
- x = 3
- x = −1
Show answer
Answer: D. f′(x) = 3x² − 3 = 0 at x = ±1. f″(x) = 6x: f″(−1) = −6 < 0 (local maximum, value 4) and f″(1) = 6 > 0 (local minimum, value 0).
-
3. For f(x) = x⁵, what is x = 0?
- A point of local maxima
- A point of local minima
- Neither; f′ does not change sign there
- Not a critical point
Show answer
Answer: C. f′(x) = 5x⁴ = 0 at x = 0, so it is a critical point. But f′ ≥ 0 on both sides, so it does not change sign: x = 0 is a point of inflection.
-
4. What is the local maximum value of f(x) = −(x − 2)² + 7?
- 7
- 2
- −7
- 9
Show answer
Answer: A. f′(x) = −2(x − 2) = 0 at x = 2 and f″ = −2 < 0, so x = 2 is a local maximum, with value f(2) = 7.
-
5. Assertion (A): The second derivative test cannot decide whether f(x) = x⁴ has a local extremum at x = 0.
Reason (R): For f(x) = x⁴, f′(0) = 0 and f″(0) = 0.- Both A and R are true, and R is the correct explanation of A
- Both A and R are true, but R is not the correct explanation of A
- A is true but R is false
- A is false but R is true
Show answer
Answer: A. The second derivative test needs f″(c) ≠ 0. Here f″(x) = 12x² gives f″(0) = 0 (R), so the test fails (A). The first derivative test then shows a local minimum.
Sign in to keep track of the lessons you finish.