My problem is :Find the points at which the the mentioned function is continuous $$f(x) = \begin{cases} x & \text{if $x$ is a Rational Number} \\ -x & \text{if $x$ is not a Rational Number} \end{cases}$$ I was asked to learn that this function is continuous at $x = 0$ and the LHL and RHL were equated as follows
LHL $$ \lim_{h \to 0} f(0 - h) = \lim_{h \to 0}-(0 - h) = 0$$ ,
RHL $$ \lim_{h \to 0} f(0 + h) = \lim_{h \to 0}-(0 + h) = 0$$ and
$$f(0) = 0$$ Now since $$ LHL = RHL = f(0)$$ Therefore the function is continuous.
My question is why are we taking a point just before Zero to be Irrational. In my opinion it could be Rational as well as Irrational making the function oscillatory and hence making it discontinuous.Please help.
I possible please state your educational qualifications(It will help me when I discuss the solution with my teacher).