# Show that the limit of the function does not exist at $x \neq 0$

Consider the function $f(x) = \left\{ \begin{array}{l l} x & \quad \text{if$x$is irrational}\\ -x & \quad \text{if$x$is rational} \end{array} \right.$

Show that $\lim_{x \to a} f(x)$ does not exist by definition of $\epsilon -\delta$ , where $a \neq 0$ is a real number.

Let if possible $\lim_{x \to a} f(x) = l$, so for each $\epsilon > 0$, there exist $\delta > 0$ such that $| f(x) - l| < \epsilon$, whenever $0 < | x- a | < \delta$.

Please tell me how to solve further.

• choose $0<\epsilon<|x|$ – enzotib Aug 9 '14 at 17:22
• here x is variable – Struggler Aug 9 '14 at 17:26
• sorry, I meant $\epsilon < |a|$ – enzotib Aug 9 '14 at 17:26
• what is $n$ in your function ? – idm Aug 9 '14 at 17:36
• @ idm : i do not understand what do you want to ask – Struggler Aug 10 '14 at 3:03

Let take a sequence $(a_n)_{n\in\mathbb N}\subset \mathbb Q$ and a sequence $(b_n)_{n\in\mathbb N}\subset \mathbb R\backslash \mathbb Q$ who both converge to $\ell\neq 0$.

You have that $\lim_{n\to\infty}f(a_n)=-\ell$ and $\lim_{n\to\infty }f(b_n)=\ell$.

Q.E.D

• I suppose the OP was looking for a $\epsilon$-$\delta$ proof. – enzotib Aug 9 '14 at 17:33
• idm : I know this proof what you have written. I want to prove that by $\epsilon - \delta$ method – Struggler Aug 10 '14 at 3:01

Let us suppose $a>0$.

$l>0$ cannot be the limit, because you can take $0<\varepsilon<l$, then you should have $0<l-\varepsilon<f(x)<l+\varepsilon$ and for each $\delta<a$ you choose, the image $f(x)$ of a rational point is negative and does not fall in $(l-\varepsilon,l+\varepsilon)$.

$l<0$ cannot be the limit, because you can take $0<\varepsilon<-l$, then you should have $l-\varepsilon<f(x)<l+\varepsilon<0$ and for each $\delta<a$ you choose, the image $f(x)$ of an irrational point is positive and does not fall in $(l-\varepsilon,l+\varepsilon)$.

$l=0$ cannot be the limit, because you can take $0<\varepsilon<a$, then you should have $-\varepsilon<f(x)<+\varepsilon$ and for each $\delta<a-\varepsilon$ you choose, the image $f(x)$ of an irrational point is $f(x)=x>a-\delta>\varepsilon$ and does not fall in $(-\varepsilon,+\varepsilon)$, and the image $f(x)$ of a rational point is $f(x)=-x<-a+\delta<-\varepsilon$ and does not fall in $(-\varepsilon,+\varepsilon)$.

Similar reasonings are valid for $a<0$.