If $f'(x_0) \neq 0$, then $f$ is injective on some neighborhood of $x_0$? Let $f:\mathbb{R} \longrightarrow \mathbb{R}$. I suspect that if $f$ is differentable at $x_0$ and $f'(x_0)$ is not zero, then $f$ is injective on some open set around $x_0$.
How would one prove it? Is there a counterexample?
 A: The claim is (or should be, apparently) famously false. Consider the function $$f(x)=\begin{cases} 0&\text{if }x=0\\ x+x^2\sin\frac1{x^2}&\text{if }x\ne 0\end{cases}$$
Its derivative is $$f'(x)=\begin{cases} 1&\text{if }x=0\\ 1+2x\sin\frac1{x^2}-\frac{2}{x}\cos\frac{1}{x^2}&\text{if }x\ne 0\end{cases}$$
You can see (using Darboux theorem) that $f'$ sends surjectively any $[0,\varepsilon)$ onto the whole $\Bbb R$, hence $f$ is not monotone in any neighbourhood of $0$. Since a continuous function is injective in an interval if and only if it is strictly monotone, $f|_{(-\varepsilon,\,\varepsilon)}$ is not injective.
Of course, $f'$ is not continuous in this (though it exists on the whole $\Bbb R$, which is even stronger than your request).
Added: On second thought, it is perhaps best to highlight more precisely the details of the reason why this is a counterexample.


*

*For an (open) interval $I$, a continuous function $f:I\to \Bbb R$ is injective if and only if it is strictly monotone.

*Thus, a differentiable function $f:I\to \Bbb R$ is injective only if either $\forall x\in I,\ f'(x)\ge 0$ or $\forall x\in I,\ f'(x)\le 0$

*The one I've mentioned is a function $f$ such that $\liminf_{x\to0^+} f'(x)<0<\limsup_{x\to0^+} f'(x)$. By (1) and (2), it cannot be monotone in any interval $(-\varepsilon,\varepsilon)$, despite satisfying $f'(0)=1$.
