# If the derivative of a function is zero, is the function a constant function?

If the derivative of a function is zero, is the function then a constant function ?

I think it is not true, because if f in the sub interval be constant function then derivative of $f$ is zero, is it true?

• If the domain of $f$ is connected, then the derivative of $f$ being everywhere zero means $f$ is constant. You can define a function on $(0,1)\cup(2,3)$ which is constant on each component $(0,1)$ and $(2,3)$, but not constant overall. – Thomas Andrews Nov 11 '15 at 20:45

If $f$ is a real function which is continuous in the closed inteval $[a,b]$ suppose that $\forall x\in (a,b):f'(x)=0$ than $f$ is constant on $[a,b]$

Proof:

Let $y\in[a,b]$

Then $f$ satisfies the conditions of the Mean Value Theorem on $[a,y]$

Hence:

$\exists \xi \in (a,y):f'(\xi)=\frac{f(y)-f(a)}{y-a}$

But:

$f'(\xi)=0$

which means:

$f(y)-f(a)=0$

and hence:

$f(y)=f(a)$

as $y$ is any $y\in[a,b]$, the result follows

$\square$

• Can this result be generalized to functions $f:\mathbb{R}^n \rightarrow \mathbb{R}$? – John Mars Apr 7 at 20:46

The Cantor function is an example of a function that is continuous (even uniformly continuous, but not absolutely continuous) with zero derivative almost everywhere, but increases from 0 to 1.

• In this context, saying it's uniformly continuous is not particularly significant, since any continuous function on a closed and bounded interval is uniformly continuous. On the other hand, the Cantor function is non-decreasing, and hence has bounded variation, and continuous functions of bounded variation are an important class of functions for integration and differentiation purposes that lie between the larger class of continuous functions and the smaller class of absolutely continuous functions. – Dave L. Renfro Dec 24 '17 at 15:43