MathLabs
TheoremProved

Fermat's interior extremum theorem and the second-derivative test

Statement

If ff is differentiable at an interior point x0x_0 of its domain and x0x_0 is a local extremum of ff, then f′(x0)=0f'(x_0)=0. Conversely, if f′(x0)=0f'(x_0)=0 and ff is twice differentiable near x0x_0 with f′′(x0)≠0f''(x_0)\ne 0, then x0x_0 is a local minimum when f′′(x0)>0f''(x_0)>0, and a local maximum when f′′(x0)<0f''(x_0)<0.

Why is it true?

At an extremum the tangent line must be horizontal, because the curve cannot keep rising (or falling) past a peak (or valley) without turning around; the second derivative then measures which way the curve bends at that flat point, telling a valley from a peak.

Proof sketch

(Necessity.) Suppose x0x_0 is a local maximum; the local-minimum case is symmetric. There is δ>0\delta>0 with f(x)≤f(x0)f(x)\le f(x_0) for all xx with ∣x−x0∣<δ|x-x_0|<\delta. For h∈(0,δ)h\in(0,\delta), f(x0+h)−f(x0)h≤0\dfrac{f(x_0+h)-f(x_0)}{h}\le 0, and letting h→0+h\to 0^+ gives f′(x0)≤0f'(x_0)\le 0. For h∈(−δ,0)h\in(-\delta,0), the numerator is ≤0\le 0 and the denominator is negative, so f(x0+h)−f(x0)h≥0\dfrac{f(x_0+h)-f(x_0)}{h}\ge 0, and letting h→0−h\to 0^- gives f′(x0)≥0f'(x_0)\ge 0. Since ff is differentiable at x0x_0, both one-sided limits agree, forcing f′(x0)=0f'(x_0)=0.

(Sufficiency, case f′′(x0)>0f''(x_0)>0.) Since f′(x0)=0f'(x_0)=0 and f′′f'' exists near x0x_0, the definition of f′′f'' as the derivative of f′f' gives f′(x)=f′(x0)+f′′(x0)(x−x0)+o(x−x0)=f′′(x0)(x−x0)+o(x−x0)f'(x)=f'(x_0)+f''(x_0)(x-x_0)+o(x-x_0)=f''(x_0)(x-x_0)+o(x-x_0) as x→x0x\to x_0. Because f′′(x0)>0f''(x_0)>0, this expression is negative for xx slightly less than x0x_0 and positive for xx slightly greater than x0x_0.

So f′f' changes sign from −- to ++ across x0x_0: by the monotonicity theorem, ff is decreasing just to the left of x0x_0 and increasing just to the right, which is exactly the definition of a local minimum at x0x_0.

The case f′′(x0)<0f''(x_0)<0 is identical with all inequalities reversed, giving f′f' changing from ++ to −-, hence a local maximum. When f′′(x0)=0f''(x_0)=0 the expansion above gives no information about the sign of f′f' near x0x_0, so the test is inconclusive and one must examine the sign of f′f' directly (as the pitfall below illustrates with f(x)=x3f(x)=x^3).

Topics that use this theorem

Step-by-step proofs

No step-by-step proof yet for this theorem.

References

  1. Michael Spivak (2008). Calculus
  2. Stephen Boyd, Lieven Vandenberghe (2004). Convex Optimization