# Prove that limit doesn’t exist anywhere? [closed]

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.

• If $l$ is the limit of $f$ as $x \to c$ for some $c$, taking an $\varepsilon > 0$ such that $\varepsilon < |1-l|$ and $< |-1 - l|$ leads to a contradiction. May 28, 2015 at 13:17
• The limit of what as what tends to what - it seems obvious what you should mean, but you need to learn to specify accurately and precisely what that is. You could ask to prove that $f(x)$ is not continuous at any point ... May 28, 2015 at 20:48
• Your question was put on hold, the message above (and possibly comments) should give an explanation why. You might try to edit your question to address these issues. Note that the next edit puts your post in the review queue, where users can vote to reopen this. (Therefore it would be good to avoid minor edits and improve your question as much as possible with the next edit.) Jun 4, 2015 at 8:48

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$.

• Thank you very much mr. Alberto not only for the answer but also for the edit. thanks a lot. May 28, 2015 at 13:27
• why we consider L in the domain? May 28, 2015 at 14:05
• I corrected the proof; I'm sorry that I messed up a bit with continuity instead of just existence of the limit. May 28, 2015 at 14:16
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.
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}$.
In any neighborhood, you find both $f(x)=-1$ and $f(x)=1$, the range of the function does not decrease.