# Discontinuity of a semialgebraic function

Let $f : \mathbb R \to \mathbb R$ be semialgebraic. Is it possible that for some $x \in \mathbb R$ the limits $f(x-)$ or $f(x+)$ does not exist? In other words can it have a discontinuity of the second kind (also known as essential discontinuity)?

-
What is a discontinuity "of the second kind"? – Alex Becker Jan 25 '13 at 0:59
@AlexBecker, a point where either one of two one-sided limits does not exist (also known as essential discontinuity). – Levon Haykazyan Jan 25 '13 at 1:09
I'm fairly sure the answer is no, but I'm not sure I have time to work out a proof. – Alex Becker Jan 25 '13 at 1:15

If in the definition of essential discontinuity you include the case where the limit is infinite, than it is certainly possible - most trivial example being $$f(x)= \begin{cases} \frac{1}{x}&\text{ for } x\neq 0 \\ 0 & \text{ for } x=0 \end{cases}.$$
However, if you'll define essential discontinuity as the function having more than one limiting point at the discontinuity in some $x_0$, that is there would exist $y_1$, $y_2$, $y_1 \neq y_2$, such that for some sequence $x_n$, such that $\lim_{n\rightarrow \infty} x_n = x_0$ and we have $\lim_{n\rightarrow \infty} f(x_n)=y_1$ and for some other sequence $x_n'$ such that $\lim_{n\rightarrow \infty} x_n' = x_0$ the limit $\lim_{n\rightarrow \infty} f(x_n')=y_2$. (Assuming of course, that both $x_n$ and $x_n'$ approach $x_0$ from the same side)
You then take a straigh line $y=\frac{y_1+y_2}{2}$ and intersect it with the graph of $f$. Since semialgebraic function can only have finite number of discontinuities, in some neighbourhood of $x_0$ the function is continuos and therefore has to cross this line infinitely many times. The intersection then consists of an infinite number of points and is not a semialgebraic set. Since graph of $f$ is by definition semialgebraic, line is semialgebraic, the intersection should also be - and therefore we have a contradiction.
Thanks for the answer. Just to be clear I am interested in the case of $f$ having more than one limiting point. – Levon Haykazyan Jan 25 '13 at 14:53