I'm trying to make a problem for my advanced calculus students. I was thinking, if we have a differentiable function $f:\mathbb{R}\to\mathbb{R}$ such that $f'(q)=0$ for all $q\in\mathbb{Q}$, can we say that $f$ is constant?


marked as duplicate by user186473, Martin Sleziak, R_D, user91500, Claude Leibovici calculus Dec 2 '16 at 7:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The function $f$ doesn't have to be constant!

A non-constant function $f$ with the required properties is given as Exercise 13.J in A. C. M. van Rooij, W. H. Schikhof, A Second Course on Real Functions, based on an example due to Y. Katznelson and Karl Stromberg, in Everywhere differentiable, nowhere monotone, functions, Amer. Math. Monthly 81 (1974), 349–354, jstor.

Here is a copy of the example:





Another example is has been constructed by Dimitrie Pompeiu in Sur les fonctions dérivées, Math. Ann. 63 (1907), no. 3, 326—332, doi: 10.1007/BF01449201, eudml, GDZ.

You can have a look here.

  • $\begingroup$ The wikipedia article states that there are nonconstant differentiable functions whose derivate vanishes on a dense set - how can we guarantee that the rational numbers are contained in this set? $\endgroup$ – Dominik Dec 1 '16 at 16:42
  • 1
    $\begingroup$ @Dominik : I agree, this doesn't need to be the case. But the example given in A. C. M. van Rooij, W. H. Schikhof exactly satisfies the condition $f'(x) = 0$ for all rational $x$. $\endgroup$ – Watson Dec 1 '16 at 16:43
  • $\begingroup$ Why give this complicated example when the the Pompeiu example, which is proved at the link you gave (thanks), is simpler and is a direct answer to the question of the OP? $\endgroup$ – zhw. Dec 1 '16 at 21:52
  • 1
    $\begingroup$ No, the wiki. article deals specifically with the rationals in $[0,1].$ (And it doesn't matter; it can be any countable subset of $[0,1].$) Let $f$ be this function. Then $f'(0)=f'(1) =0.$ So we can extend this $f$ to $[0,2]$ as follows: For $x\in [1,2],$ let $f(x) = f(x-1) + f(1)-f(0).$ Now we have a differentiable $f$ strictly increasing on $[0,2]$ such that $f'(q)=0$ for each rational $q\in [0,2].$ We can continue this to the right or left to obtain a strictly increasing differentiable function on $\mathbb R$ whose derivative equals $0$ at each rational $q\in \mathbb R.$ $\endgroup$ – zhw. Dec 1 '16 at 22:49
  • 1
    $\begingroup$ @zhw: But the construction from the wikipedia article yields a function whose derivative vanishes in the points $g(p_i)$, where $p_i$ are the rationals in $[0, 1]$. It is not clear why the derivative should also vanish in the $p_i$. $\endgroup$ – Dominik Dec 2 '16 at 13:08

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