I'm looking for a function continuous in $R$ and differentiable in all rational numbers and it's derivative should be $0$.But not the constant function.
And there is a same question about irrational numbers.
Can any one help??
derivatives
I'm looking for a function continuous in $R$ and differentiable in all rational numbers and it's derivative should be $0$.But not the constant function.
And there is a same question about irrational numbers.
Can any one help??
Best Answer
An example of a strictly increasing function with derivative $0$ at rationals is the Minkowski's question mark function, which is defined as follow :
given $x$ whose continued fraction representation is $[a_0, a_1, a_2, ... ]$, let $?(x) = a_0 - 2 \sum \limits_{n=1}^{\infty} \frac{(-1)^n}{2^{a_1+\cdot \cdot \cdot + a_n}}$.
You can prove that this function's derivative is $0$ over the rationals, but yet it is strictly increasing, so there is no interval on which it is constant.
(PS : continued fraction : $x = a_0 + \frac{1}{a_1+\frac{1}{a_2+\frac{1}{...}}} $ where $a_0 \in Z$, and $a_1,a_2 > 0$ integers. You have existence and unicity of this decomposition (and the list $(a_0,a_1,...)$ is finite iff $x$ is rational) )
$ $
Concerning your second question, if $f$ is continuous, differentiable at irrational numbers and with derivative $0$ at irrational numbers, then $f$ is constant.
More generally, if $f$ is continuous and its derivative exists and is $0$ at the complement of a countable set, then you can prove that $f$ is constant.
$ $ To prove this, first fix $\varepsilon > 0$
To be clearer, we can define for all $x$, $\delta(x)$ equals the $\delta$ mentioned in the first case or the second depending on $x$
(hence for all $x$, $[x-\delta(x), x+\delta(x)]$ is a neighborhood of $x$ over which the variation of $f$ is tiny).
$ $
Then let us fix $a<b$. We can prove that there exists $a = a_0 < a_1 < \cdot \cdot \cdot < a_r = b$ and $t_1,...,t_r$ such that for all $i \geqslant 1$, $t_i \in [a_{i-1}, a_i]$ and $a_i - a_{i-1} < \delta(t_i)$.
(the proof consists of considering the set of $y \in [a,b]$ such that it exists $a = a_0 < \cdot \cdot \cdot < a_s = y$ with the previous property. This set is non-empty ($a$ is in it), and bounded, so it has a supremum. If this supremum $c$ is $<b$, you can add to your partition $e>c$ such that $e<c+\delta(c)$, and $e$ is in the set, there is a contradiction. So the supremum is $b$, and we have the property we were looking for. )
Using triangular inequality we have : $\mid f(b) - f(a) \mid \leqslant \sum \limits_{k=1}^r \mid f(a_k) - f(a_{k-1}) \mid$.
So $\mid f(b) - f(a) \mid \leqslant 4\varepsilon + \sum \limits_{k=1}^r 2\varepsilon(a_k - a_{k-1})$ : an upper bound is the sum of the variations in the second case and also in the first case mentionned earlier. For the first case, we need to add that if $f'(t_k) = 0$ (that is, if we are in the first case), then $[a_{k-1},a_k]$ is a subset of $[t_k - \delta(t_k), t_k + \delta(t_k)]$ and we can use (*) : $\mid f(a_k) - f(a_{k-1}) \mid \leqslant 2\varepsilon (a_k - a_{k-1})$.
$ $
Hence $\mid f(b) - f(a) \mid \leqslant 4\varepsilon + 2\varepsilon(b-a)$, and this holds for all $\varepsilon$. Thus $f(a) = f(b)$ : $f$ is constant.