-1

can a real function $f$ on $[0,1]\cap\mathbb{Q}$ be differentiable?

if so, and if the derivative of $f$ is zero, then is $f$ is a constant function?

  • 1
    If you require the derivative to be continuous, yes. If not, there are some ugly constructions as a counter-example. – AlexR Feb 01 '15 at 12:36
  • @AlexR I can't understand the question. – Git Gud Feb 01 '15 at 12:38
  • 1
    @GitGud Okay. The question seems to ask if there exists a non-constant function $f:[0,1]\to\mathbb R$ such that the derivative exists at every $x\in[0,1]\cap\mathbb Q$ and such that $f'|_{[0,1]\cap\mathbb Q} \equiv 0$. – AlexR Feb 01 '15 at 12:40
  • "give a" seems to be a failed translation of "does there exist" or a typo "Given a ..., does that imply that $f$ is constant?". – AlexR Feb 01 '15 at 12:41
  • Regarding the present version of the question, I don't think you're asking what you want to ask. Can there be a differentiable function whose domain is $[0,1]\cap \mathbb Q$? Trivially note since the definition of differentiability requires the interior of its domain to be non-empty. – Git Gud Feb 01 '15 at 12:49
  • @Oracle The counterexamples there work here, but there are much simpler counterexamples for this question, so not a repeat imo. – user24142 Feb 01 '15 at 13:00

1 Answers1

6

Let $X=[0, 1] \cap \mathbb{Q}.$ The definition of the derivative works fine for a function $f:X \to \mathbb{R}$ but you do get unpleasant results. For instance, consider the function

$$f(x) = \left\{ \begin{array}{lr} 0 & : x < 1/\sqrt{2}\\ 1 & : x > 1/\sqrt{2} \end{array} \right.$$

For every $a \in X$ there is some $\epsilon>0$ such that $f$ is constant on $(a-\epsilon, a+\epsilon)\cap X$, and so $f'(a) = 0$. It is clearly not a constant though.

user24142
  • 3,732
  • Can you please clarify why this only works for $X=[0,1]\cap \mathbb Q$ and not for $X=\mathbb R$, say? – sequence Dec 05 '17 at 21:18
  • The essential thing is that $X$ is disconnected. We can break it up into two open open sets, $A= [0, 1/\sqrt{2})$ and $B = (1/\sqrt{2}, 1]$ that cover the whole space. Any point in $A$ has a ball around it contained in $A$, so if $f$ is constant on $A$, $f'$ is identically the zero function on $A$. Same argument goes for $B$. But, you can let $f$ be one value on $A$ and a different one on $B$.

    All of this comes down to $X$ being disconnected.

    If we were to try this with $\mathbb{R}$, you would get an undefined derivative at $1/\sqrt2$

    – user24142 Dec 07 '17 at 00:15