Zero Derivative implies Constant Function

Theorem
Let $f$ be a real function which is continuous on the closed interval $\closedint a b$ and differentiable on the open interval $\openint a b$.

Suppose that:
 * $\forall x \in \openint a b: \map {f'} x = 0$

Then $f$ is constant on $\closedint a b$.

Proof
When $y = a$ then $\map f y = \map f a$ by definition of mapping.

Otherwise, let $y \in \hointl a b$.

Then $f$ satisfies the conditions of the Mean Value Theorem on $\closedint a y$.

Hence:
 * $\exists \xi \in \openint a y: \map {f'} \xi = \dfrac {\map f y - \map f a} {y - a}$

But:
 * $\map {f'} \xi = 0$

which means:
 * $\map f y - \map f a = 0$

and hence:
 * $\map f y = \map f a$

When $y = a$ then

As $y$ is any $y \in \closedint a b$, the result follows.

Also see
This is the converse of Derivative of Constant.

Thus we see that $f$ is a constant function $\forall x: \map {f'} x = 0$.