Solution (source code)

= Solution

The <mean value theorem> states that a function <continuous> on $[p,q]$ and differentiable on $(p,q)$ has some $c\in(p,q)$ with $f(q)-f(p)=f'(c)(q-p)$.

Take any $p<q$ inside the given open interval. Differentiability implies the <continuity> needed on $[p,q]$, and the <derivative> is zero throughout it. The <mean value theorem> therefore gives $f(q)=f(p)$. Since the two points were arbitrary, \b[the function is constant on the interval].