Extrema and Rolle's Theorem
Interior extremum and Fermat's lemma
Local extremum
Let be defined on an interval . We say that has a local maximum at if there is a neighborhood of on which ; a local minimum is defined in the same way. The word local is important: nothing is required far from .
An extremum is a maximum or a minimum. It is called interior when is not an endpoint of .
Fermat's lemma
If is differentiable at , a point in the interior of , and if has a local extremum at , then .
Proof, in the case of a local maximum. For small enough, , so the difference quotient is negative:
For small enough, the numerator is still negative but the denominator changes sign, so the quotient is positive, and taking the limit from the left, .
The two inequalities give . The case of a minimum follows by applying the above to .
Three counterexamples to keep in mind
| Situation | Function | What goes wrong |
|---|---|---|
| Extremum at an endpoint | on | maximum at , but |
| Non-differentiable function | on | minimum at , no derivative there |
| False converse | on | with no extremum at |
The third row is worth remembering as is: is a necessary condition for an interior extremum, never a sufficient one. That is why studying a function does not stop at where the derivative vanishes, but examines its change of sign.
Classic pitfall
Applying Fermat's lemma at an endpoint of the interval. On , the function does reach its maximum, at , without the derivative vanishing there: the proof uses increments of both signs, which no longer makes sense at an endpoint. Always check that the point is interior before writing .

