Rolle theorem (source code)

= Rolle theorem
{c}
{title2=$f(a)=f(b)\implies f'(c)=0$}
{wiki}

= Rolle's theorem
{c}
{synonym}

<Rolle's theorem> is the equal-endpoint case of the <mean value theorem>. Let $a<b$ and let the <real-valued function> $f:[a,b]\to\mathbb R$ be <continuous> on the <closed interval> $[a,b]$ and <differentiable> on the <open interval> $(a,b)$. If $f(a)=f(b)$, there exists $c\in(a,b)$ with $f'(c)=0$. Geometrically, a <tangent line> somewhere in the <interior> is horizontal, like the <secant line> joining the endpoints. https://openstax.org/books/calculus-volume-1/pages/4-4-the-mean-value-theorem[OpenStax, Calculus Volume 1, Section 4.4: Rolle's theorem]{ref}

For the <polynomial> $f(x)=x(x-2)$ on $[0,2]$, both endpoint values are zero and the <derivative> is $f'(x)=2x-2$. Thus $c=1$, where $f(1)=-1$, and the horizontal <tangent line> is $y=-1$. The horizontal <secant line> is $y=0$: equal endpoint values do not force the interior <tangent line> to pass through those endpoints.

The <absolute value function> $f(x)=|x|$ on $[-1,1]$ exposes the importance of <differentiability>. It is <continuous> and $f(-1)=f(1)=1$, so the <secant line> has <slope> zero. However,
$$
f'(x)=\begin{cases}-1,&-1<x<0,\\1,&0<x<1,\end{cases}
$$
and the <derivative> does not exist at zero because the <one-sided derivatives> disagree. Every existing <derivative> in the <interior> is nonzero. The corner fails a hypothesis of both <Rolle's theorem> and the <mean value theorem>, so neither conclusion is guaranteed.

\Image[/rolle-theorem-and-corner-counterexample.png]
{title=<Rolle's theorem> gives a horizontal <tangent line> for a <polynomial>, while a corner defeats <differentiability>}

For a short proof, the <extreme value theorem> supplies a greatest and a least value on $[a,b]$. If $f$ is a <constant function>, every interior point works. Otherwise at least one of these values differs from the common endpoint value, so it is attained at an interior <extremum>. At an interior <local maximum> or <local minimum>, <differentiability> forces the <derivative> to be zero: the <difference quotients> from the two sides have opposite weak signs and the same <limit>.

This turns repeated values into information about <derivatives>. Two distinct <roots of a polynomial> force a root of its <derivative> between them; iterating this idea gives the <Rolle root count with multiplicities>. More generally, a <differentiable function> with nonzero <derivative> throughout a <real interval> cannot repeat a value there, hence is <injective>. The beauty is that knowing only two equal values guarantees an exact local feature somewhere between them.