Let $f:I \to \mathbb{R}$, where $I$ is an interval and $a \in I$ such that $f'(a)= \infty$. Prove that there is a neighborhood $(a-\epsilon, a+\epsilon)$ such that $f$ is convex on $(a-\epsilon, a)$ and $f$ is concave on $(a, a+\epsilon)$.
I tried to use the definition of the derivative, but I only got that there is a left-neighborhood of $a$ where $f(x)< f(a)$ and a right-neighborhood of $a$ where $f(x)>f(a)$.
I suppose that the statement is false, but I couldn't construct an elementary counter example. Is there any?
Hint
The result is wrong. Look at
$$f(x)=\begin{cases} -\sqrt{-x} + x \sin \left(\frac{1}{x}\right) & x <0\\ 0 & x=0\\ \sqrt{x} + x \sin \left(\frac{1}{x}\right)& x>0 \end{cases}$$
And prove that around zero the derivative is not monotonic on each side of zero.