Limit of Fuctions Let 
$f(x)= 
\left \{
\begin{array}{cc} 
x & x\in \mathbb{Q}\\
0 & \,\,\,\,\,\,x\in \mathbb{R}\setminus\Bbb{Q}
&
\end{array} 
\right . $ 
Determine all $a \in \mathbb{R}$ for which $\lim_{x \rightarrow a} f(x)$ exists.
I see that the answer is $a=0$, but I don't know how to prove it.
 A: Consider $x \in \Bbb{R}$ given. Choose a sequence $\{r_n\} \subseteq \Bbb{Q}$ such that $r_n \to x$; that is, a sequence of rational numbers converging to $x$; such a sequence exists by density. Likewise, choose $\{t_n\}$ a sequence of irrationals converging to $x$.
Now suppose that $f$ is continuous at $x$; by the sequential definition of continuity, we have
$$\lim_{n \to \infty} f(r_n) = f(x) = \lim_{n \to \infty} f(t_n)$$
But $f(r_n) = r_n$, so $f(r_n) \to x$ as $n \to \infty$. Where does $f(t_n)$ converge to?
A: Let $I$ be any interval containing $0$, then $f(I)\subset I$, since all rational numbers in this interval are mapped to themselves and every irrational number in this interval gets mapped to zero. Thus the limit of $f$ exists at $x=0$ and is equal to $0$. Now if $x=a\neq 0$, then the image under $f$ of any interval containing $a$ will consist of $0$ and all the rational numbers in that interval, which could never be contained in an arbitrarily small interval since $a\neq 0$ (e.g. consider an interval of length strictly less than $a$), thus the limit of $f$ at $x=a$ does not exist.
