Monotonic function; limits from the right and from the left
Can someone explain this to me? It seems quite easy, but somehow I can't manage to prove this on my own ... or in other words: when exactly does a function $f$ not have limits from the right and from the left ? (Picture is a screenshot from wikipedia)
Without loss of generality, assume $f$ is monotonic increasing. At any given point $a$, $f(x) \le f(a)$ for $x<a$. The least upper bound of the $f(x)$ for $x<a$ is the left-handed limit of $f(x)$ at $a$.
For the right-handed limit, use the greatest lower bound of $f(x)$ for $a<x$.
The jump from LUB and GLB to limit is not trivial but is pretty easy to show.
ADDED:
There are four kinds of discontinuity (for real functions of one real variable). Removable discontinuities (the one-sided limits exist and are equal but do not equal $f(a)$) and jump discontinuities (the one-sided limits exist but are not equal) have one-sided limits. Infinite discontinuities (one or both of the one-sided limits is $+\infty$ or $-\infty$) have one-sided limits or not, depending if you consider an infinite limit to be a limit. (The textbook I teach from does not.)
An oscillating discontinuity lacks one or both one-sided limits. A common example of this is $\sin(\frac 1x)$ at $x=0$. Another example is $$f(x) = \begin{cases} 1, & \text{if $x$ is rational} \\ -1, & \text{if $x$ is irrational} \end{cases} $$
Both of these examples vary from $-1$ to $1$ in any open interval bounded by zero. In fact, the second one has an oscillating discontinuity at any real value.
Note that a function monotonic in an interval is either continuous or has a jump discontinuity at any point in the interval.
ADDED LATER:
Here is a proof that (for a monotonic increasing function $f(x)$ defined for all real numbers) that the least upper bound of $f(x)$ for $x<a$ is $\lim_{x \to a^-}{f(x)}$.
Suppose we are given that $f(x)$ is monotonic increasing on $\mathbb R$ and we are given $a \in \mathbb R$ and $\epsilon>0$. Since $f(a)$ is an upper bound of $f(x)$ for $x<a$ there must be a least upper bound: let's call it L.
Consider $L-\epsilon$. By the definition of LUB it cannot be an upper bound for $f(x)$, so there is a value $b<a$ where $f(b)>L-\epsilon$. Since L is an upper bound, $f(b) \le L$. Let $\delta=a-b$, which is positive.
Then, for any $x$ such that $a-\delta<x<a$, $$L-\epsilon \le f(x) \le L$$ Since we found a positive $\delta$ for any $\epsilon>0$, that is almost the very definition of
$$\lim_{x \to a^-}{f(x)}=L=LUB_{x<a}(f(x))$$