Differentiable at a point with positive derivative implies increasing in neighborhood of point?

Let $$ f(x)=\begin{cases}x+2x^2\sin\frac1x&x\ne0\\0&x=0\end{cases}$$ This $f$ is continuous and has derivative $$ f'(x)=\begin{cases}1+4x\sin\frac1x-2\cos\frac1x&x\ne0\\1&x=0\end{cases}$$ So $f$ is differentiable on all of $\Bbb R$, $f(0)=0$, $f'(0)=1$, and yet it is not increasing in any neighbourhood of $0$ because at $x_n=\frac1{2n\pi}$ we have $f'(x_n)=-1$.


The original statement is false, as the previous answer already showed.

However, a weaker statement holds: if $f$ is differentiable at a limit point $x_0$ with positive derivative $f'(x_0) > 0$, then there exists a small neighborhood to the right of $x_0$ that all have higher function value than $f(x_0)$, i.e., $\exists \delta >0, \forall x \in (x_0, x_0 + \delta), f(x) > f(x_0)$.

Proof: by definition of differentiability:

$$\lim_{t\to 0} \frac{f(x_0+t) - f(x_0)}{t} = f'(x_0) > 0 $$ Take $\epsilon = f'(x_0)/2$, then there exists $\delta>0$ such that for all $t \in (0, \delta)$, $$ |\frac{f(x_0+t) - f(x_0)}{t} - f'(x_0)| \leq f'(x_0)/2 $$ so $$f(x_0+t) - f(x_0)\geq t f'(x_0)/2 > 0$$