Positive Derivative at a Point Implies Increasing in Neighborhood?

analysisderivatives

Let $\,f: \mathbb{R} \rightarrow\mathbb{R}$ be some function st $f(0)=0$ and $f'(0) > 0$. Is it the case that $f$ must be increasing in some neightborhood of zero? If $f$ is differentiable in some neighborhood of $0$ then the answer is trivial with the MVT, however all we have is differentiability at a point. I don't think the premise holds, take for example $f(x) = \begin{cases} \sin(x) & \text{, $x\in\mathbb{Q}$} \\ x & \text{, $x \notin \mathbb{Q}$} \end{cases}
$

The function seems to be differentiable near $0$ with derivative $1$ but is neither increasing nor decreasing near $0$.

Is this correct? Would you have anymore counterexamples?

Best Answer

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

Related Question