Prove or disprove the existence of a limit of the function $\displaystyle \lim_{x\to x_0} f(x)$ 
Prove or disprove the existence of a limit of the function $\displaystyle \lim_{x\to x_0} f(x)$
$f(x)=\begin{cases}
0 , & x\in\Bbb R\setminus \Bbb Q\\
\sin|x| , & x\in \Bbb Q \\
\end{cases}$
For 
  
  
*
  
*$x_0\in \{\pi n ,\ n\in \Bbb Z   \}$  
  
*$x_0\in \Bbb R \setminus\{\pi n ,\ n\in \Bbb Z   \}$
  

The way I understood it is we need to show continuity, here 1. always go to zero because it's irrational ($\pi n \notin \Bbb Q$) and 2. go to zero and to sin|x| because it could be irrational sometimes. 
I tried to use the Cauchy definition of a limit but I don't really get anywhere...
$$\forall \epsilon\gt0:\exists\delta\gt0:\forall x:|x-x_{0}|\lt\delta\rightarrow |f(x)-L|\lt\epsilon$$
Using Heine definition is a dead end too.
Any help would be appreciated. 
NOTE: we can't use integration/derivation/L'hopital/Taylor's because we haven't covered those (i.e. "no calculus").
 A: Notice that any neighbourhood of $x_0$ contains both points of $\mathbb Q$ and points of $\mathbb R\setminus \mathbb Q$. Since both functions defining $f$, namely the function $0$ and the function $\sin |x|$ are continuous, they must have the same limit in $x_0$ if you want that $f$ has a limit in $x_0$. Hence you must check whether:
$$
 \sin |x_0| =  0.
$$
A: Since the first question is a bit harder (in my opinion) i will solve that one. 
Theorem: The $ \epsilon - \delta$ definition for continuity of a function is equivalent to the following definition:
$f(x)$ is continous at $x_0 $ if and only if for every sequence $(x_n)$ such that $ \lim_{ n \to \infty} x_n = x_0$ we have $\lim_{ n \to \infty} f(x_n) = f(x_0)$  

Let us take a look at 2 cases:
OCase 1. Let $(t_n)$ be a sequence of rational 
numbers such that $t_n \to 2k \pi$ for some $k \in \mathbb{N}$ then obviously $\lim_{n \to \infty} \sin |t_n| = 0$, (show why, this is a textbook example).
OCase 2. Let $(t_n)$ be a sequence of irrational numbers such that $t_n \to 2k \pi$ for some $k \in \mathbb{N}$ then obviously $\lim_{n \to \infty} \sin |x_n| = 0$ (because if $t_n$ is irrational we have $f(t_n) =0$ for all $n$ by definition and hence $\lim_{ n \to \infty} f(t_n) =0$
Now for an arbitary sequence $(x_n)$ there are 3 cases (why?):
Case 1. $(x_n)$ has an infinite number of rational and irrational numbers.
In this case, we can "split" $(x_n)$ using subsequences. Let $(r_n) \in \mathbb{N}$ be the sequence such that $x_{r_n} \in \mathbb{Q}$ and $(i_n) \in \mathbb{N}$ a sequence such that $x_{i_n} \in \mathbb{R}/\mathbb{Q}$. Now what happens with $f(x_{r_n})$ and $f(x_{i_n})$ when $n \to \infty$? If all subsequences of a sequence $(x_n)$ have the same limit then what can we say about the limit of the original sequence $(x_n)$?
Case 2. $(x_n)$ has an infinite number of rational numbers (but finite number of irrational).
Hint: Here there must exist $n_1$ such that for all $n>n_1$ we know that $x_n$ is rational. Then just use OCase 1 to come to a conclusion.
Case 3. $(x_n)$ has an infinite number of irrational numbers (but finite number of rational numbers).
Can we approach this part similarly to Case 2?

The second part of your problem should be easier. Just take a look at Case 1, assume that the limit exists and come to a contradiction.
As a much more interesting problem which uses the same idea, check this one out:
http://en.wikipedia.org/wiki/Thomae%27s_function and it's informal proof.
