# Does the condition of this theorem need continuous differentiability?

I'm reading the book, Analysis from its History, from E. Hairer and G. Wanner. Precisely, I'm reading the french version from 2001, L'analyse au fil de l'histoire. The following theorem is given:

If a function $f:(a,b)\to\mathbb{R}$ is differentiable at $x_0$ and $f'(x_0)>0$ then, it exists $\delta>0$ such that:

• $f(x)>f(x_0)$ for all $x$ such that $x_0<x<x_0+\delta$,
• $f(x)<f(x_0)$ for all $x$ such that $x_0-\delta<x<x_0$.

If the function reach a maximum (or minimum) at $x_0$, then $f'(x_0)=0$.

But then, they give the following counterexample $f(x)=x+x^2\sin(1/x^2)$ for $x\neq 0$ and $f(0)=0$.

I think that there is an error in the theorem and that the condition should be that $f$ is continuously differentiable. Can you confirm that?

• You need only differentiability at $x_0$. The "counterexample" isn't even continuous at $0$. If one makes it $f(0) = 0$, then you have $f'(0) = 1$. The assertion still holds, but the function is not monotonic on any interval containing $0$. Commented Jan 15, 2016 at 21:18
• @angryavian No, not continuous at $0.$ The limit of $f$ is $0$ but $f(0)=1.$
– zhw.
Commented Jan 15, 2016 at 21:22
• Sorry for the typo, it's $f(0)=0$. Commented Jan 15, 2016 at 21:23
• This still isn't a counterexample. For all $x>0$ we have $f(x)>f(0)$ and for $x<0$ we have $f(x)<f(0)$. Commented Jan 15, 2016 at 21:26

No, you don't need continuous differentiability, the theorem holds under the assumption that $f$ is differentiable at $x_0$. It need not be differentiable, nor even continuous, anywhere else.
The "counterexample" is not a counterexample to the given theorem, but to the stronger assertion that there exists a $\delta > 0$ such that $f$ is monotonic on $(x_0 - \delta, x_0+\delta)$. For that assertion, you need continuous differentiability on a neighbourhood of $x_0$ (or the hypothesis that $f' \geqslant 0$ on a neighbourhood of $x_0$).