11

Somebody told me that there exists a continuous function with a derivative of zero everywhere that is not constant.

I cannot imagine how that is possible and I am starting to doubt whether it's actually true. If it is true, could you show me an example? If it is not true, how would you go about disproving it?

Peter Olson
  • 2,293
  • If we are working on $\mathbb{Q}_p$ or $\mathbb{C}_p$, then nontrivial locally constant functions can exist. Also, if the domain $\Omega$ of the function $f : \Omega \stackrel{\mathbb{open}}{\subset} \mathbb{R} \to \mathbb{R}$ is disconnected, then $f$ can have many values while satisfying $f' \equiv 0$. But surely this kind of answer is not the one you are seeking for. – Sangchul Lee Feb 22 '12 at 17:42

3 Answers3

19

If it's differentiable at every point, then this can't happen. This follows from the mean value theorem:

If $f(x)$ is continuous on $[a,b]$ and differentiable on $(a,b)$, then for at least one point $c$ between $a$ and $b$, we have $$f'(c) = \dfrac{f(b)-f(a)}{b-a}.$$

If your $f(x)$ is not constant, but is differentiable everywhere, pick an $a$ and $b$ with $f(a)\neq f(b)$. By the MVT, we have $$f'(c) = \dfrac{f(b)-f(a)}{b-a} \neq 0$$ since $f(b) \neq f(a)$.

On the other hand, if you assert your function is differentiable only "almost everywhere" instead of "everywhere" (in a sense which can be made precise) and that the derivative "almost everywhere" is equal to $0$, then this can happen. The standard example is Cantor's function (also known as the Devil's Staircase). See http://en.wikipedia.org/wiki/Cantor_function.

  • Thanks, I think he probably was referring to the Cantor function. – Peter Olson Feb 22 '12 at 15:08
  • 1
    FYI, differentiable everywhere can be replaced with "differentiable on a set whose complement is countable". Some references are given at http://mathforum.org/kb/message.jspa?messageID=5692679 Also, it is not possible to improve this to some uncountable sets, but I don't know of any specific references for this right now. (I believe it's been proved that any exceptional set must have the property of containing no perfect subsets, and since the exceptional set in question is Borel, this forces the exceptional set to be countable.) – Dave L. Renfro Feb 22 '12 at 19:14
  • The link in my 22 Feb 2012 comment no longer works, but I think it might be this 25 June 2007 sci.math post (now linking to Google's sci.math archive). Note that there are a couple of follow-up posts in the same sci.math thread with additional details. – Dave L. Renfro Sep 09 '24 at 14:53
8

Since there are no restrictions on the domain, it is actually possible. Let $f:(0,1)\cup(2,3)\to \mathbb R$ be defined by $f(x)=\left\{ \begin{array}{ll} 0 & \mbox{if } x \in (0,1) \\ 1 & \mbox{if } x\in (2,3) \end{array} \right.$

azarel
  • 13,506
  • @Peter Olson Regarding the domain, you have many solutions if you take a subset of $\mathbb{R}^k$ (with $k \ge 2$) as the domain. According to [1], you can for instance construct a continuous injection from $[0,1]$ to $\mathbb{R}^2$ whose reciprocal is $1.9$-Hölder continuous. Hence the reciprocal is injective yet has 'derivative' zero everywhere. $\quad \quad\quad\quad\ \ \quad $ [1] "On Jordan Arcs and Lipschitz Functions Defined on Them", Besicovitch & Schoenberg – charmd Jul 20 '18 at 16:31
1

In short, no. Your friend may be misremembering examples of continuous nowhere-differentiable functions, e.g., the Weierstrass function or the boundary of the Koch snowflake.

I was gong to cite the mean value theorem, but Jason DeVito beat me to the punch. To add to his answer, you might also consider the Picard-Lindelof theorem. What would it mean for $f$ to adopt two different values, since the theorem asserts that its behavior is locally that of a constant function?

Neal
  • 34,012
  • If someone has access to this paper, I would greatly appreciate it.

    I don't think it's the same answer as above.

    http://link.springer.com/chapter/10.1007%2F978-1-4612-2972-8_19

    – An old man in the sea. Nov 01 '16 at 08:14