Rolle's Theorem
Suppose that \(a,b \in \mathbb{R}\) with \(a < b\). If
  1. \(f\) is continuous on \([a,b]\)
  2. \(f\) is differentiable on \((a,b)\)
  3. \(f\) is differentiable on \(f(a) = f(b)\)
Then \(f'(c)=0\) for some \(c \in (a,b)\).

Proof

Since \(f\) is continuous on a closed and bounded interval \([a,b]\) then by the Extreme Value Theorem. \(f\) has a finite maximum \(M\) and a finite minimum \(m\) on \([a,b]\). If \(m = M\), then \(f\) is constant (the maximum point is the same as the minimum point!). Thus, \(f'(c)=0\) for all \(c \in (a,b)\).

Otherwise suppose \(m \neq M\). Since \(f(a) = f(b)\), then either \(m\) or \(M\) is in \((a,b)\) (Since only \(m\) or \(M\) can be at \(f(a)=f(b)\)!). Suppose without the loss of generality that \(M\) is attained inside \((a,b)\). Hence, there exists a \(c\) such that \(f(c) = M\). Now, since \(M\) is the maximum of \(f\), then

$$ \begin{align*} f(c+h) - f(c) \leq 0 \end{align*} $$

for all \(h\) such that \(c+h \in (a,b)\). In the case when \(h > 0\), then this implies that

$$ \begin{align*} f'(c) = \lim_{h \to 0+} \frac{f(c+h) - f(c)}{h} \leq 0, \end{align*} $$

and in the case when \(h < 0\), this implies that

$$ \begin{align*} f'(c) = \lim_{h \to 0-} \frac{f(c+h) - f(c)}{h} \geq 0, \end{align*} $$

Since we know that the limit exists, then by the squeeze theorem, we know that \(f'(c)=0\). \(\ \blacksquare\)


What happens when the continuity condition is relaxed?

If the continuity condition is relaxed even at point in \([a,b]\), then we can construct a function such that

$$ \begin{align} f(x) = \begin{cases} x, & \text{if } x \in [0,1), \\ 0, & \text{if } x = 1. \end{cases} \end{align} $$

This function is continuous and differentiable on \([0,1)\). We also have that \(f(0)=f(1)\). However it is not continuous at \(1\) since

$$ \begin{align*} \lim_{x \to 1-} = f(x) = 1 \neq f(1) = 0 \end{align*} $$

Note here that \(f'(x)\) is never zero.


What happens when the differentiability condition is relaxed?

Take \(f(x) = |x|\). It is continuous on \([-1,1]\) and differentiable on \((-1,1)\) except at \(x = 0\). We also have that \(f(1)=f(-1)\). But again \(f'(x)\) is never zero.


References