Show $f$ is disconinuous at $0$ where $f$ is:
$ f(x)= \begin{cases} 2x \sin{\frac{1}{x} - > \cos{\frac{1}{x}}}&\text{if}\, x \neq 0\\ 0&\text{if}\, x=0 > \end{cases} $
My attempt (proof by contradiction):
Suppose $f$ is continuous at $0$ then $\forall \epsilon \gt 0$, $\exists \delta \gt 0$ s.t. $\left| f(x)-f(0) \right| \lt \epsilon$ whenever $|x-0| \lt \delta$.
Choose $\epsilon = \frac{1}{2}$, then by hypothesis $\exists \delta \gt 0$ s.t. the above condition is true.
Now pick $x = \frac{1}{n \pi}$ where $n \in \mathbb{N}$ is some natural number. Then $x \gt 0$.
For a sufficiently large $n$, $|x-0| = x \lt \delta$.
But $f\left(\frac{1}{n \pi}\right)$ $=\frac{2}{n \pi} \sin{(n \pi)} - \cos{(n \pi)}$ $=0 - (-1)^n = (-1)^{n+1}$
So $|f(x) - f(0)| = |(-1)^{n+1}-0|=1 \gt \frac{1}{2}$ which is a contradiction. Hence, $f$ must be discontinuous at $0$.
$\Box$
I would like some alternative proofs, as well as comments or suggestions to my proof.
Hint: Continuity can be proved using limits as well. For instance, $\sin(\frac{1}{x})$ is bounded, so what can be said about $x\sin(\frac{1}{x})$ when $x \to 0$? What about the second term, $\cos(\frac{1}{x})$?