Show that the following function is not continuous at $0$.
$$f(x) = \begin{cases}0, & \text{when $x=0$} \\ \sin\left(\frac{1}{2x}\right), & \text {when $x\neq0$} \end{cases}$$
Proof.
To prove discontinuity we need to analyze the One-Sided Limits of the function.
To prove that the right limit does not exist,
let consider the sequence $\{x_n\} = \frac{1}{(2n+1)\pi}$,
and observe that $\sin (\frac{1}{2x})$ = $(-1)^n$.
Since {$x_n$} converges to 0 but $(-1)^n$ does not converge,
it follows from the Sequential Characterization of Continuity Theorem
that the right limit does not exist.
To prove that the left limit does not exist,
let consider the sequence $\{x_n\} = \frac{-1}{(2n+1)\pi}$,
and observe that $\sin \left(\frac{1}{2x}\right) = (-1)^{n+1}$.
Since $\{x_n\}$ converges to $0$ but $(-1)^{n+1}$ does not converge,
it follows from the Sequential Characterization of Continuity Theorem that the left limit does not exist.