Constancy theorem (source code)

= Constancy theorem
{title2=$f'=0\Longrightarrow f\text{ constant on an interval}$}

A <differentiable function> on an <interval> whose <derivative> is identically zero is a <constant function>. Indeed, for any two arguments $x<y$, the <mean value theorem> on $[x,y]$ gives $f(y)-f(x)=f'(c)(y-x)=0$. For an <interval> with endpoints included, <continuity> at those endpoints is required. A disconnected <domain> may have different constants on different components.