A question about existence of derivative of function at Zero
The question linked above inspires another question.
- $f:\mathbb R\to\mathbb R$ is assumed to be continuous everywhere.
- It is assumed to be differentiable at all points besides $0.$
- It is assumed that $\displaystyle\lim_{x\to0} f'(x)$ exists in $\mathbb R.$
The question was whether $f'(0)$ exists and is equal to that limit. A posted affirmative answer used L'Hopital's rule, and another used the mean value theorem directly. Either of those relies on the gaplessness of the real line.
Can an affirmative answer be proved without completeness? Could it be proved, for example, in the field of rational numbers? If not, what would be a counterexample in $\mathbb Q$?
Completeness in the image is not an issue, but something of this type is needed in the domain, or, alternatively a condition on absolute continuity.
As an example take for $f$ the Cantor function (defined first on $[0,1]$, then periodically continued to a continuous function on ${\Bbb R}$). It has derivative 0 a.e. but has infinite derivative at 0.
Put in another way, let $C$ be the periodically continued Cantor set in ${\Bbb R}$ and set $U={\Bbb R}\setminus C$ which is open, dense and of full Lebesgue measure. Then, $f:{\Bbb R} \rightarrow {\Bbb R}$ is continuous, $f$ restricted to $K=U\cup\{0\}$ has derivative zero everywhere except at zero where it is infinity. Restricting to the set $K\cap {\Bbb Q}$ which is dense in ${\Bbb Q}$ you (almost) get a counterexample as asked for in the last question.
A more constructive result: If $f$ is absolutely continuous, then it is the integral of its derivative (see e.g. Royden, Real Analysis, Chap 5 sect 4) so the mean value theorem holds [whence the wanted result].
In particular if $f$ is locally Lipschitz continuous (which implies abs cont) and $|f'|\leq M$ a.e. then $f$ is in fact $M$-Lipschitz.