Problem:
$ f(x)=\begin{cases} 0 & \text{if $x$ is irrational}
\\ \sin |x| &\text{if $x$ is rational}\end{cases} $
Let $ x_0 \in \{ \pi n : n \in \Bbb Z \} $. Show that $ \lim_{x \to x_0 }f(x) $ exists or not, if it exists, find it.
Attempt: Let $ \epsilon > 0$ be arbitrary. Since we know that $ \sin |x| $ is continuous then there exists $ \delta >0 $. Let $ x \in \Bbb R $ be arbitrary. Suppose $ | x- x_0 | < \delta $. Then we know $ | \sin|x| | <\epsilon $ ( since $ \lim_{x \to 0 } \sin |x| = 0 $ ). Now,
If x is irrational, $ f(x) = 0 $ and so $ |f(x)| = 0 < \epsilon $.
If x is rational,$f(x) = \sin|x| $ and so $ |f(x)| = |\sin |x| | < \epsilon $.
Since $ \epsilon>0, x \in \Bbb R $ were arbitrary, we showed that $ \lim_{x \to x_0 }f(x) = 0 $. $ \square $
Question: Initially I tried to solve the problem using Heine's definition of limit but I found it to be very difficult. How would one prove the limit above using Heine's definition?