In calculus, Rolle's theorem states that if a function f is continuous on a closed interval $\left[a,b\right]$ and differentiable on the open interval $\left(a,b\right)$, and $f\left(a\right) = f\left(b\right)$ then there is some number c in the open interval $\left(a,b\right)$ such that

$f'\left(c\right) = 0$.

Intuitively, this means that if a smooth curve is equal at two points then there must be a stationary point somewhere between them. Just continuity is not sufficient. (However, differentiability is not quite necessary; see note below.) For example, if

$f\left(x\right) = |x|$

the absolute value of x, then we have that

$f\left(-1\right) = f\left(1\right)$

but there is no x between -1 and 1 for which $f'\left(x\right) = 0$. This is because that function, although continuous, is not differentiable at x=0.

A version of the theorem was first stated by Indian astronomer Bhaskara in the 12th century.[1] A proof of the theorem had to wait until centuries later when Michel Rolle in 1691 used the methods of differential calculus.

## Proof

The idea of the proof is to argue that if $\ f(a) = f(b)$ then $f$ must attain either a maximum or a minimum somewhere between $a$ and $b$, and $\ f'(x) = 0$ at either of these points.

Now, by assumption, $f$ is continuous on $\ [a,b]$, and by the continuity property attains both its maximum and its minimum in $\ [a,b]$. If these are both attained at endpoints of $\ [a,b]$ then $\ f$ is constant on $\ [a,b]$ and so $\ f'(x) = 0$ at every point of $\ (a,b)$.

Suppose then that the maximum is obtained at an interior point $\ x \in (a,b)$ (the argument for the minimum is very similar). We wish to show that $\ f'(x) = 0$. We shall examine the left-hand and right-hand derivatives separately.

For $\ x_1$ less than $\ x$, the quantity $\ f(x)-f(x_1) \over {x-x_1}$ is non-negative since $x$ is a maximum. Thus the limit as $x_1$ approaches $x$ from below is non-negative. (Note that we assume that $\ f$ is differentiable to guarantee that the left-hand and right-hand derivatives exist; it does not follow from the other assumptions).

For $\ x_2$ greater than $\ x$, the quantity $\ f(x)-f(x_2) \over {x-x_2}$ is non-positive. Thus the limit as $x_2$ approaches $x$ from above is non-positive.

Finally, since $\ f$ is differentiable at $\ x$, these two limits must be equal and hence are both 0. This implies that $\ f'(x) = 0$.

## Relaxed assumptions

The theorem is usually stated in the form above, but it is actually valid in a slightly more general setting: We only need to assume that

$f : \left[a,b\right] \rightarrow \mathbb{R}$

is continuous on $\left[a,b\right]$, that

$f\left(a\right)=f\left(b\right)$

and that

$\forall x \in \left(a, b\right) ,\; \lim_{h \rightarrow 0}\frac{f\left(x + h\right) - f\left(x\right)}{h} \in \left[ -\infty,+\infty \right]$

## Generalizations

The mean value theorem gives a similar statement but for functions that do not have the same value at the end points; that is, $f(a) \neq f(b)$. The conclusion is that there is a point of the domain where the instantaneous slope equals the mean slope. Rolle's theorem can be used to prove the mean value theorem and vice versa.

We can also generalize Rolle's theorem by requiring that f has more zeros and greater regularity. Specifically, suppose the following

• the function f is n times differentiable: $n-1$

, and $\displaystyle f^{(n)}(x)$ exists on $\displaystyle (a,b)$, and

• the function f has n+1 roots: $\displaystyle f(x_i)=0$ for distinct points $x_0, \ldots, x_n$, in $\displaystyle [a,b]$.

Then there is a $c\in (a,b)$ such that $\displaystyle f^{(n)}(c)=0$.