Prove that limit doesn’t exist anywhere? I'm doing some practice problems and am having trouble answering these problems:
Consider the following function $$f(x)=\begin{cases}1, & \text{if } x\in \Bbb Q\\ -1, & \text{if } x\in \Bbb R\backslash \Bbb Q. \end{cases}$$
Prove that limit doesn’t exist anywhere.
 A: We have that 
$$
\lim_{x\to a} f(x)=L
$$
if and only if for every $\varepsilon>0$ there exists $\delta>0$ such that if $|x-a|<\delta$, then $|f(x)-L|<\varepsilon$. We prove this is false. Let $\varepsilon =1/2$ and assume it is true. Since for any $\delta>0$, there are infinitely many rational and irrational numbers in the interval $I_\delta:=(a-\delta,a+\delta)$, then we can always find $y\in I_\delta \cap \Bbb Q$, $z\in I_\delta \cap (\Bbb R \backslash \Bbb Q)$. Then, we have that
$$
|f(y)-L|=|1-L|<1/2,
$$
$$
|f(z)-L|=|-1-L|<1/2,
$$
which is a contradiction, since there is no number $L\in \Bbb R$ such that $d(L,1)<1/2$, $d(L,-1)<1/2$.
A: Hint : $\mathbb Q$ is dense in $\mathbb R$, that means in every neighborhood of some real number $a$, there are infinite many rational and irrational numbers.
Now, use the $\epsilon$-$\delta$-formalism to get a contradiction.
A: For each $x\in \mathbb{R}$, we can find sequence $z_k\to x$, such that $z_k\in \mathbb{Q}$ and $y_k\to x$, such that $y_k\in \mathbb{R}\setminus \mathbb{Q}$. 
We can conclude from $f(z_k)\to 1$ but $f(y_k)\to -1$, that limit doesn't exist for any $x\in \mathbb{R}$.
A: In any neighborhood, you find both $f(x)=-1$ and $f(x)=1$, the range of the function does not decrease.
