Fermat's Theorem on Local Extrema: Statement and Examples
Fermat's theorem: if f has a local max or min at c and f'(c) exists, then f'(c) = 0. Statement, graph, why the converse fails, and worked examples.
Differential calculus theorems Updated 4 min read
At a glance
- Also called
- Fermat's theorem on stationary points, interior extremum theorem
- Hypotheses
- f has a local maximum or minimum at an interior point c, and f'(c) exists
- Conclusion
- f'(c) = 0
- Converse
- False: f'(c) = 0 does not guarantee an extremum, as x^3 at 0 shows
- Used for
- Finding critical points, the closed interval method, optimization
- Course
- Calculus 1
On this page
Fermat's theorem (on local extrema) says that at the top of a hill or the bottom of a valley on a smooth graph, the tangent line is flat. It is the theorem behind the most common move in calculus: to find a maximum or minimum, set the derivative equal to zero.
Statement of Fermat's theorem
Suppose that
- f has a local maximum or local minimum at c, meaning f(c) \ge f(x) (or f(c) \le f(x)) for all x in some open interval around c, and
- f'(c) exists.
Then
Because the definition of a local extremum uses an open interval around c, the point c must be an interior point of the domain, not an endpoint.
What Fermat's theorem means
At a local maximum, the function rises up to c and falls after it. Just to the right of c the difference quotient \frac{f(c + h) - f(c)}{h} is \le 0, and just to the left it is \ge 0. If the derivative exists, both one-sided limits are the same number, and the only number that is both \le 0 and \ge 0 is 0.
Why each hypothesis matters, and why the converse fails
The derivative must exist. f(x) = |x| has a minimum at x = 0, but f'(0) does not exist because of the corner. Fermat's theorem says nothing there. This is why critical points include points where f' is undefined.
The point must be interior. On [0, 1], f(x) = x has its maximum at the endpoint x = 1, yet f'(1) = 1 \ne 0. Endpoint extrema are not covered by the theorem, so the closed interval method checks endpoints separately.
The converse is false. f(x) = x^3 has f'(0) = 0, but x^3 is negative to the left of 0 and positive to the right, so 0 is not a local extremum. A horizontal tangent makes c a candidate, nothing more. You still need the first or second derivative test.
Critical points
Fermat's theorem justifies this definition: a critical point of f is a number c in its domain where f'(c) = 0 or f'(c) does not exist. Restated, every local extremum of f occurs at a critical point.
Worked examples
Example 1: f(x) = x^4 - 4x^3.
Step 1. f'(x) = 4x^3 - 12x^2 = 4x^2(x - 3).
Step 2. Critical points: x = 0 and x = 3. By Fermat's theorem these are the only possible local extrema.
Step 3. Classify. f'(x) < 0 for x < 0 and for 0 < x < 3, and f'(x) > 0 for x > 3. The function decreases through x = 0, so x = 0 is not an extremum, just like x^3. At x = 3 it switches from decreasing to increasing, so f(3) = 81 - 108 = -27 is a local minimum.
Example 2: a critical point where f' does not exist. For f(x) = x^{2/3},
which is never 0 and is undefined at x = 0. So x = 0 is the only critical point, and since f(x) \ge 0 = f(0) for all x, it is a minimum. Setting f'(x) = 0 alone would miss it.
Example 3: optimization. Two numbers add to 10. Maximize their product P(x) = x(10 - x). Since the maximum is at an interior point and P is differentiable, Fermat's theorem says P'(x) = 10 - 2x = 0, so x = 5 and the maximum product is 25. See optimization problems for more.
Common mistakes
- Assuming f'(c) = 0 means an extremum. Always classify critical points with a sign chart or the second derivative.
- Ignoring points where f' is undefined. Corners and cusps are critical points too.
- Forgetting endpoints. On a closed interval the absolute extremes may sit at the endpoints, where Fermat's theorem does not apply.
Related theorems
Fermat's theorem pairs with the extreme value theorem to give the closed interval method, and it is the key step in proving Rolle's theorem and then the mean value theorem. For classifying critical points and sketching graphs, read curve sketching with derivatives.
Practice it now
Critical points
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson