Trying to show that limit does not exist Consider the function, with domain $\mathbb{R}$, defined by

$$f(x)
= \begin{cases} 
      x &amp; \text{if $x$ is rational,} \\
      -x &amp; \text{if $x$ is irrational.} 
   \end{cases}
$$

When referring to above.

Q) Prove that for any $a \neq 0$, $f$ does not have a limit at $a$. 

Is it sufficient for me to say:

Leading towards a contradiction, for $a=0$, $f$ does not have a limit at a. By the above, we see that this is not true, because when $a=0$, there exists a limit which has been proven. Hence, for any $a\neq0$, $f$ does not have a limit at $a$.
Okay, so the problem here, is that the contradiction of the statement "for any $a \neq 0$, $f$ does not have a limit  at $a$" , is not "for $a = 0$, $f$ does not have a limit at $a$". The answer is : "there is some $a \neq 0$ for which the limit exists", Therefore, behaviour of $f$ at $0$, is not required to answer this question.

In words : The limit of $f(x)$ at $x = a$ exists, if bringing $x$ close enough to $a$ means that $f(x)$ can be brought close enough to "some number", which we call the limit at that point.

Coming to the answer itself, we have to show that $\lim_{x \to a} f(x)$ does not exist. Why could this be true? Well, let $a$ be a rational point. There are plenty of rational and irrational points near $a$. Roughly, if $x$ a rational point close to $a$, then we know that $f(x) = x$ is very close to $f(a) = a$. But, if $x$ is an irrational point close to $a$ then is $f(x) = -x$ close to $f(a) = a$? We are trying to say that if $x$ is close enough to $a$, then $f(x)$ should be close enough to $f(a)$. But here, we are landing up, with both $x$ and $-x$ being close to $a$. How can this happen?

Well, it can happen if $x$ and $-x$ are close to each other i.e. $x$ is close to $0$, and therefore at $a =0$ we see that the limit exists intuitively. at other points, $x$ and $-x$ simply wouldn't be close to each other: if one of them is close to $a$, the other is going to be far away, and that's the problem.

A rigorous proof: See, in the limit definition, for each $\epsilon$ we find a $\delta$, right? Here, I will show you an $\epsilon$ for which no $\delta$ will work! And therefore, the limit wouldn't exist!


  Let $a \neq 0$. Put $\epsilon = \frac{|a|}{2}$. Note that $\epsilon &gt; 0$ (this is important, right!) Finally, let $\delta &gt; 0$ be any positive real number which is such that $|x - a| &lt; \delta \implies |f(x) - f(a)| &lt; \epsilon$. This means, by the triangle inequality, that $f(a) + \frac {|a|}{2} &gt; f(x) &gt; f(a) - \frac{|a|}{2}$. Since we know that $|f(a)| = |a|$, the above shows that $f(x)$ has the same sign for all $|x - a| &lt; \delta$ i.e. it is either positive for all such $x$, or negative for all such $x$. However, if I pick $x$ such that $|x - a| &lt; \delta$, that is opposite to $a$ i.e if $a$ is irrational, then $x$ is irrational , and vice-versa, then $f(x)$ and $f(a)$ would definitely have opposite sign, which contradicts our earlier statement. Hence, we see  that no $\delta$ exists for this $\epsilon &gt; 0$, which finishes the arugment that the limit does not exist.


Vitally, the fact that $a \neq 0$ was used in the first line itself in this argument.

Again, the usual comment : read the proof carefully, and you can get back for further queries.
If $a$ rational, $f(a)=a$ and $f(a+{e\over n})=-a-{e\over n})$. We have $lim_na+{e\over n}=a$ and $lim_nf(a+{e\over n})=lim_n-a-{e\over n}=-a\neq f(a)$.

If $a$ is irrational, $\mathbb{Q}$ is dense in $\mathbb{R}$, there exists $a_n, lima_n=a, a_n\in\mathbb{Q}$. We deduce that $lim_nf(a_n)=lim_na_n=a$ and $f(a)=-a$.