JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Fermat, Rolle, and the Mean Value Theorem

Interior maxima have zero derivative; chain Fermat to the extreme value theorem to get Rolle; tilt Rolle to get the mean value theorem.

Fermat: interior extrema are stationary

Fermat's theorem says: if f has a local maximum or minimum at an interior point c, and f is differentiable at c, then f′(c) = 0. The proof reads the sign of the difference quotient from each side. At a local max the numerator f(x) − f(c) is ≤ 0 on both sides; the denominator changes sign, so the two one-sided limits squeeze f′(c) between ≤ 0 and ≥ 0.

Fermat: f has a local max at interior c, f differentiable at c => f'(c) = 0.

Local max: f(x) <= f(c) for all x near c, so f(x) - f(c) <= 0 near c.

Approach from the RIGHT (x > c, so x - c > 0):
    (f(x) - f(c)) / (x - c)  =  (<=0) / (>0)  <= 0,
    hence the right-hand limit f'(c) <= 0.

Approach from the LEFT (x < c, so x - c < 0):
    (f(x) - f(c)) / (x - c)  =  (<=0) / (<0)  >= 0,
    hence the left-hand limit f'(c) >= 0.

f is differentiable at c, so both one-sided limits equal f'(c). Thus
    f'(c) <= 0  AND  f'(c) >= 0   =>   f'(c) = 0.   ∎
Same numerator sign, opposite denominator sign — the squeeze forces zero.

Rolle, then the mean value theorem

Rolle's theorem: if f is continuous on [a, b], differentiable on (a, b), and f(a) = f(b), then f′(c) = 0 for some interior c. The proof combines two earlier giants — the extreme value theorem hands us a max and a min, and Fermat finishes the interior case.

  1. By the extreme value theorem, the continuous f attains a max M and a min m on the compact [a, b].
  2. If both are attained only at the endpoints, then M = m (since f(a) = f(b)), so f is constant and f′ = 0 everywhere — done.
  3. Otherwise an extremum is attained at an interior point c. Apply Fermat there: f′(c) = 0.

The mean value theorem is Rolle viewed on a tilt. Subtract off the secant line so the endpoints level out, apply Rolle, and tilt back.

MVT: f continuous on [a,b], differentiable on (a,b)
     => exists c in (a,b) with f'(c) = ( f(b) - f(a) ) / ( b - a ).

Define the 'subtract the secant' auxiliary function:
    g(x) = f(x) - [ f(a) + (f(b)-f(a))/(b-a) · (x - a) ].

Check g's endpoints:
    g(a) = f(a) - f(a) = 0,
    g(b) = f(b) - [ f(a) + (f(b)-f(a)) ] = f(b) - f(b) = 0.
So g(a) = g(b) = 0, and g is continuous on [a,b], differentiable on (a,b).

By Rolle, exists c in (a,b) with g'(c) = 0. But
    g'(x) = f'(x) - (f(b)-f(a))/(b-a),
so g'(c) = 0 gives  f'(c) = ( f(b) - f(a) ) / ( b - a ).   ∎
g is f minus its own secant line; its endpoints match, so Rolle applies verbatim.