# Monotonic function on $\mathbb{R}$

It is a well known fact, that if $f:X \to \mathbb{R}$ (where $X \subset \mathbb{R}$) is monotonic, and $a \in X^+, b\in X^-$, where $$X^+ = \left\{ {x\in X:\forall \varepsilon > 0,\;\;\left( {x - \varepsilon ,x} \right) \cap X \ne \varnothing} \right\}$$ $$X^- = \left\{ {x\in X:\forall \varepsilon > 0,\;\;\left( {x,x + \varepsilon } \right) \cap X \ne \varnothing} \right\},$$ then $$\lim_{x \to a^+} f\left( x \right),\qquad\lim_{x \to b^-} f\left( x \right)$$ exist. My question is, given such a function, and a point $a \in X^+$, does there exist an $\varepsilon > 0$ such that $$f\left| {_{\left( {x - \varepsilon ,x} \right) \cap X} } \right.$$ is continuous (doesn't have jumps). I want to know if this fact is true, to prove that the set of discontinuities of a monotonic function is countable (because in this case, to each such point, I associate to it, an open set, and therefore a rational number).

The only possible counterexample is a function that has a dense set of jumps. Please don't give me proof about the other proof, I only know this, because I know other proof without using this fact, but I think that this is also true.

-
Apologies if I changed your intended meaning in any way; please feel free to make further edits if mine aren't to your liking. – Zev Chonoles Oct 9 '11 at 3:35
If I understand you correctly, then $f(x)=x+\frac{1}{\lfloor 1/x\rfloor}$ on $x\in(-\infty,0)$ is a counterexample for $a=0$. (And its jump points are far from dense). – Henning Makholm Oct 9 '11 at 3:40
Are you sure you have your limits correct? It seems to me that if $a$ lies in the set you describe as $X^+$, then you can define the limit as $x$ approaches $a$ from the left of $f(x)$, but in general $\lim\limits_{x\to a^+}f(x)$ need not exist (just take $X=[0,1]$; then $1$ is in $X^+$, but the limit from the right does not exist, because the function is not defined to the right of $1$). – Arturo Magidin Oct 9 '11 at 3:47

Proposition 1. A monotone function $f: \mathbb{R} \to \mathbb{R}$ can only have jump discontinuities.

Corollary 2. A monotone function $f: \mathbb{R} \to \mathbb{R}$ has at most countably many discontinuities.

Proposition 3. For any countable $A \subset \mathbb{R}$ there exists a bounded increasing function $f: \mathbb{R} \to \mathbb{R}$ such that $f$ is continuous precisely on $\mathbb{R}\setminus A$.

Only the last statement is moderately difficult to prove.

-

I think you have your definitions of $X^+$ and $X^-$ the wrong way around: under your definition, if $X=[0,1]$, then $1\in X^+$, but $\lim\limits_{x\to 1^+} f(x)$ does not make sense, so it cannot exist.

Let $\{q_n\}$ be an enumeration of the rationals on $[0,1]$; that is, $q_n$ is a rational on $[0,1]$ for each $n$, and for every rational $q$ in $[0,1]$ there exists one and only one $n$ such that $q=q_n$.

Define $f\colon [0,1]\to \mathbb{R}$ by $$f(x)= \sum_{q_n\gt x}\frac{1}{2^n}.$$ Then $f(x)$ is monotonic: if $x\leq y$, then $\{n\in\mathbb{N}\mid q_n\gt y\}\subseteq \{n\in\mathbb{N}\mid q_n\leq x\}$, so $f(x)\geq f(y)$.

Moreover, $f$ is discontinuous from the left at every rational number: if $q\in (0,1]\cap\mathbb{Q}$, there exists $n$ such that $q=q_n$. Let $\epsilon=\frac{1}{2^{n+1}}$. Then for every $x\in(0,q)$, $f(x)-f(q) \geq \frac{1}{2^n}\gt \epsilon$, so $f$ is not continuous from the left at $q$.

In particular, for every $x$, $1\geq x\gt 0$ and every $\epsilon\gt 0$, $f$ is not continuous on $(\max(x-\epsilon,0),x)$.

The function is continuous from the right at every rational, but it is likewise true that for all $x$, $0\leq x\lt 1$, and for every $\epsilon\gt 0$, $f$ is not continuous on $(x,\min(x+\epsilon,1))$.

Note that in this case, $X^+$ and $X^-$ are $[0,1)$ and $(0,1]$ (in some order, depending on the correct definitions of $X^+$ and $X^-$).

-