Fermat's Lemma

Basis
Last updated: Tags: Calculus, Mean Value Theorems

If a smooth hill has a peak, the slope must be zero at the top. Fermat’s Lemma makes this intuition rigorous: at an interior local extremum, the tangent line is horizontal. This is the key ingredient in every mean-value theorem.

Statement

Fermat’s Lemma. Let ff be defined on an open interval containing x0x_0. If x0x_0 is a local extremum of ff and ff is differentiable at x0x_0, then

f(x0)=0.f'(x_0) = 0.

Proof

Suppose x0x_0 is a local maximum (the minimum case is symmetric). By the definition of a local maximum, there exists δ>0\delta > 0 such that

f(x)f(x0)for all x(x0δ,x0+δ).f(x) \leq f(x_0) \quad \text{for all } x \in (x_0 - \delta,\, x_0 + \delta).

Consider the difference quotient f(x0+h)f(x0)h\dfrac{f(x_0 + h) - f(x_0)}{h} for small h0h \neq 0.

  • For h(0,δ)h \in (0, \delta): f(x0+h)f(x0)0f(x_0 + h) - f(x_0) \leq 0 and h>0h > 0, so the quotient is 0\leq 0. Taking the limit h0+h \to 0^+ gives f(x0)0f'(x_0) \leq 0.
  • For h(δ,0)h \in (-\delta, 0): f(x0+h)f(x0)0f(x_0 + h) - f(x_0) \leq 0 and h<0h < 0, so the quotient is 0\geq 0. Taking the limit h0h \to 0^- gives f(x0)0f'(x_0) \geq 0.

Since f(x0)f'(x_0) exists, both one-sided limits equal it. Therefore f(x0)0f'(x_0) \leq 0 and f(x0)0f'(x_0) \geq 0, which forces f(x0)=0f'(x_0) = 0. \square

Why the converse fails

The condition f(x0)=0f'(x_0) = 0 does not guarantee a local extremum. A point where f(x0)=0f'(x_0) = 0 is called a stationary point (or critical point), but it may be neither a maximum nor a minimum.

Example. For f(x)=x3f(x) = x^3, we have f(0)=0f'(0) = 0, yet x0=0x_0 = 0 is not a local extremum: f(x)<0f(x) < 0 for x<0x < 0 and f(x)>0f(x) > 0 for x>0x > 0, so the function is strictly increasing through 00.

Why the extremum must be interior

Fermat’s Lemma requires x0x_0 to be in the interior of the domain. At a boundary point, the function is only compared to values on one side, and the one-sided difference quotient need not be zero.

Example. f(x)=xf(x) = x on [0,1][0, 1] has a local minimum at 00 and a local maximum at 11. Yet f(0)=f(1)=10f'(0) = f'(1) = 1 \neq 0.

Summary

  • Fermat’s Lemma: if ff is differentiable at an interior local extremum x0x_0, then f(x0)=0f'(x_0) = 0.
  • Proof idea: the difference quotient is non-positive from the right and non-negative from the left, so both one-sided limits — and hence f(x0)f'(x_0) — equal zero.
  • The converse fails: f(x0)=0f'(x_0) = 0 is necessary but not sufficient for a local extremum.
  • The result needs x0x_0 interior: at boundary extrema the derivative can be nonzero.