Show $f:\mathbb R \to \mathbb R$ by $f(x)=\frac{x}{2}+x^2\sin\frac{1}{x}$ is not injective in any neighbourhood of $0$ 
Define $f:\mathbb R \to \mathbb R$ by $f(x)=\frac{x}{2}+x^2\sin\frac{1}{x}$ if $x \neq 0$ and $f(0)=0$. Compute $f'(x)$ for all $x \in \mathbb R$. Show that $f'(0)>0$, yet $f$ is not injective in any neighbourhood of $0$. 

My idea:
$f'(x)=\frac{1}{2}+2x\sin{\frac{1}{x}}-\cos{\frac{1}{x}}$
$f'(0)=\frac{1}{2}$ so $f'(0)>0$. (is this correct?)
How would I prove non-injectivity?Would I show multiple values for $x$ which both equal the same $f(x_1)=f(x_2)$? 
 A: It is clear that for every $x\in\mathbb{R}\setminus\{0\}$ the derivative $f'(x)$ exists and there it is continuos. $f'(0)$ does exist, too, but it can only be calculated by the very definition of the derivative:
\begin{align}
\frac{f(h)-f(0)}{h}=\frac{\frac{h}{2}+h^2\sin(\tfrac{1}{h})}{h}=\frac{1}{2}+h\sin(\tfrac{1}{h}) \overset{h\rightarrow 0}{\rightarrow}\frac{1}{2}.
\end{align}
(Consider that $|h\sin(\tfrac{1}{h})|\le |h|$ for every $h\neq 0$. So, $f'(0)=\frac{1}{2}>0$.)
To the non-injectivity: Consider the sequences $(a_k)_{k\in\mathbb{N}}, (b_k)_{k\in\mathbb{N}}$ with
\begin{align}
a_k:= \frac{1}{2k\pi}, && b_k:= \frac{1}{(2k+1)\pi}. 
\end{align}
Then you have for every $k\in{\mathbb{N}}$
\begin{align}
f'(a_k)= \frac{1}{2}+ \frac{1}{k\pi}\sin(2k\pi)-\cos(2k\pi)=-\frac{1}{2}\\
f'(b_k)= \frac{1}{2}+ \frac{2}{(2k+1)\pi}\sin((2k+1)\pi)-\cos((2k+1)\pi)=\frac{3}{2}.
\end{align}
Taking the limit $k\rightarrow\infty$ the continuity of $f'$ (outside of $0$) implies that $f$ is not injective in any neighbourhood of $0$. 
A: Calculating the derivative of a function, reduces to calculating some limits of functions. If you try to find the limit of $2x\sin(1/x)$, this is actually $0$ because the product of a function which has a "normal behavior" and a bounded function (such as $\sin(x)$) is always zero (when you apply limits of course). The function $\cos(x)$ is also bounded so you can use these two arguments for proving that indeed the derivative is positive.
I hope this helps!
Edit: Actually, if you want $f'(0)$ this is equivalent with $\lim_{x\to 0}\frac{f(x)-f(0)}{x-0}$. You know that $f(0)=0$ so the limit reduces to a simple algebra where again you should use that criteria about products of bounded functions which I already mentioned. The final result is $\frac{1}{2}$.
