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?
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?
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.
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