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?

  • 10
    $\begingroup$ 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. $\endgroup$ Nov 11, 2015 at 20:45

2 Answers 2


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]$


Let $y\in[a,b]$

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


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



which means:


and hence:


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


  • $\begingroup$ Can this result be generalized to functions $f:\mathbb{R}^n \rightarrow \mathbb{R}$? $\endgroup$
    – John Mars
    Apr 7, 2021 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.

  • 5
    $\begingroup$ 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. $\endgroup$ Dec 24, 2017 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .