Define $$\operatorname{sgn}(x)=\begin{cases} 1 & \text { if } x>0 \\-1 & \text { if } x<0 \\ 0 & \text { if } x=0 \end{cases}.$$ Let $f: \mathbb{R} \rightarrow \mathbb{R}$ given by $$f(x)=(x+1) \operatorname{sgn}\left(x^{2}-1\right)$$ where $\Bbb R$ be the set of real numbers. Then find all the discontinuities of $f$ (if any).
Whenever, I encounter these sort of problems, I jump to determine the continuities at the "suspicious points". By "suspicious points", I mean those points where we might face some difficulty to determine the continuity simply by inspection, or the points which at least gives us some sort of a "feeling" as to whether "Will the function be discontinuous at these points?".
Similarly, I tried the problem as :
Given, $$f(x)=(x+1) \operatorname{sgn}\left(x^{2}-1\right).$$ The function is continuous at all points but, we will proceed by doing a little inspection upon the points $x=0,1,-1$.
We find, $$\lim_{x\to 0}f(x)=f(0)=-1,$$ $$\lim_{x\to 1}f(x)=f(1)=0$$ and $$\lim_{x\to -1}f(x)=f(-1)=0.$$
Thus, the function $f$ is continuous at all points $0,1,-1$ and this suggests, that $f$ is continuous everywhere.
Now, the problem is that the answer says, $f$ is discontinuous at only point. But I don’t understand where the function is discontinuous. My calculations allowed me to conclude that $f$ is continuous everywhere. Is there something that I have missed (that should've been taken into consideration) ?
I have a genuine feeling, that the evaluation of $\lim_{x\to 1}f(x)=f(1)=0$ is not correct, due to the fact that $\lim_{x\to 0}\text{sgn}(x^2-1)$ does not exist. I found this piece of information, by doing a quick evaluation on Wolfram Alpha( a site designed for "computational intelligence" ).
It was when, I started to analyze the Right and Left Hand limits of $f$ at $1$. (I am using $R$ to denote the right-hand limit and $L$ to denote the left-hand limit ). We have,
$$L=\lim_{x\to 1-}\text{sgn}(x^2-1)=-1$$ and $$R=\lim_{x\to 1+}\text{sgn}(x^2+1)=1.$$
Now, this was strange. It appears strange, to me for this:
Reason : If I proceeded to do calculation of $L$ and $R$ (above) as : $$L=\lim_{x\to 1-}\text{sgn}(x^2-1)=\lim_{h\to 0+}\text{sgn}((1-h)^2-1)=\lim_{h\to 0+}\text{sgn}(h^2-2h)=0$$ and $$R=\lim_{x\to 1+}\text{sgn}(x^2+1)=\lim_{h\to 0+}\text{sgn}((1+h)^2-1)=\lim_{h\to 0+}\text{sgn}(h^2+2h)=0.$$ Due to which, $L=R=f(1)=0$.
Now, I am sure that the above method of evaluation of limits have some loopholes. But the thing is, in many books I found limits calculated in same way as above (i.e in the "Reason" section of this post). So, the only possible thing might be, is that I did some errors in calulation (,is it) ? I am looking for a possible explanation, of this absurdity/anomaly (and a possible way to avoid this absurdity).