Consider the function $f$:R$\rightarrow $R defined by $$f(x) =\begin{cases}x-1, &\text{if $x$ is rational} \\5-x,&\text{if $x$ is irrational}\end{cases}$$ Then $\space\lim\limits_{x\to a}$$f(x)$, $a\in\ R-\{\ 3\}$, exists or not ?
Solution: Let $a$ be a irrational number .Then
Right hand limit and left hand limit are as follows;
$\space\lim\limits_{x\to a^+}$$f(x)$ =$\space\lim\limits_{h\to 0}$$f(a+h)$; $\space$$\space\lim\limits_{x\to a^-}$$f(x)$ =$\space\lim\limits_{h\to 0}$$f(a-h)$
As h$\rightarrow$$0$, now let us assume that $h$ be a rational number, then $a+h$ and $a-h$ both are irrational . Therefore
R.H.L. =$\space\lim\limits_{x\to a^+}$$f(x)$ =$\space\lim\limits_{h\to 0}$$f(a+h)$=$\space\lim\limits_{h\to o}$$5-(a+h)$$\space$=$\space$$5-a$
Similiarly
L.H.L.$\space$=$5-a$
Hence the limit exists.
Now again let us assume that $h$ be a irrational then $a+h$ and $a-h$ may be a rational or irrational, then the L.H.L. and R.H.L. may or may not be equal and hence limit may or may not be exist.But in my booklet the question says that the limit exists only if $a=3$. Is it true or wrong ?