Let $$f(x) = \begin{cases} 0 &\text{ if $x=0$,}\\ \sin(1/x) &\text{ otherwise.} \end{cases} $$ Prove that $f$ is discontinuous at $0$ using the $\epsilon \delta$ definition of continuity.
I know that the $\epsilon, \delta$ criterion is as follows: for all $\epsilon>0$ there exists $\delta \gt 0$ such that for all $x\in A$, if $|x-x_0|\lt \delta$ implies that $|f(x)-f(x_0)|\lt \epsilon$.
I am unsure how to go about writing the proof and any help would be appreciated! Thank you.
Take the sequence $x_n = \frac{2}{(4n+1) \pi}$. Then $x_n \to 0$ so if $f$ was continuous, we would have $f(x_n) \to f(0) = 0$. However, $f(x_n) = 1$ for all $n$, so clearly we can't have $f(x_n) \to 0$ and thus $f$ isn't continuous.
Using $\epsilon, \delta$: set $\epsilon = 1/2$. Then for any $\delta >0$, we can find $n$ so that $x_n = \frac{2}{(4n+1) \pi} < \delta$. Then $\lvert f(x_n) - f(0) \rvert = \lvert f(x_n) \rvert = 1 \ge \epsilon.$ That is, for this specific $\epsilon$, there is no $\delta > 0$ which guarantees $\lvert f(x) - f(0) \rvert < \epsilon$ for all $\lvert x - 0 \rvert < \delta$. Hence $f$ is not continuous at $0$.