4
$\begingroup$

I've heard this claim many times, that when the derivative of a function is $0$ everywhere in its domain, then that function is a constant function.

But what about functions like the following two:

$$f : (4,6)\cup (6,7) \to \mathbb{R}$$

$$f(x) = \begin{cases} 2, \, x \in (4,6) \\ \\ 7, \, x \in (6,7) \end{cases} $$

Here, $ f'(x) = 0, \, \forall x \in D_f$, where $D_f$ stands for domain of $f$.

I'm writing this after I read the proof of something similar to it in this question here:

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

$\endgroup$
1
  • 3
    $\begingroup$ A similar situation occurs when students try to solve for $f:\mathbb{R}_{\neq 0}\to \mathbb{R}$ satisfying $$f'(x)=\dfrac{1}{x}$$ for all $x\in\mathbb{R}\setminus\{0\}$. They like to say $$f(x)=\ln|x|+\text{constant}\,.$$ In fact, this is false. What is true is $$f(x)=\ln|x|+K(x)\,,$$ where $K:\mathbb{R}_{\neq 0}\to \mathbb{R}$ is constant on $(-\infty,0)$ and on $(0,+\infty)$ (but not necessarily the same constant). That is, $K$ is locally constant in $\mathbb{R}_{\neq 0}$, as Kusma explains. $\endgroup$ Sep 26, 2018 at 11:08

3 Answers 3

5
$\begingroup$

When the derivative is zero everywhere in an open set $S$, the function is locally constant in $S$. If the set $S$ is connected, that implies the function is constant. If the set is not connected, then there are examples of locally constant functions that are not constant.

What is additionally confusing is that the "domain of a function", i.e. the set where it is defined, may not be a "domain", which means an open and connected set. On "domains", derivative zero means the function is constant.

$\endgroup$
2
  • $\begingroup$ I’ve only heard the term “domain” used like that in complex analysis courses/textbooks - I don’t think most people would get it confused with the domain of a function. $\endgroup$
    – Joppy
    Sep 26, 2018 at 11:05
  • $\begingroup$ It is also used with that meaning in PDE theory, where most of the time, people are only interested in functions whose domain is a domain :) $\endgroup$
    – Kusma
    Sep 26, 2018 at 12:04
2
$\begingroup$

The claim you cited is only true if the domain $D_f$ is connected. The set $(4,6)\cup (6,7)$ is not connected.

$\endgroup$
1
$\begingroup$

No. If $f'(x)=0$ on an interval I, then $f$ is constant on the interval I.

If $f'(x)=0$ on another interval J, then $f$ is constant on the interval J, but $f$'s value on $J$ might not be the same as f's value on $I$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.