# Why are discontinuities of monotonic $f : (a, b) \to \mathbb R$ countable? [duplicate]

I'm struggling to find an elegant proof of the following problem

Let $f : (a, b) \to \mathbb R$ be non-decreasing, $a, b \in \mathbb R$, then $f$ only has countably many discontinuities.

My intuition was to show by contradiction that the set of discontinuities $N \subseteq (a,b)$ is discrete, i.e. all discontinuities are isolated. From there on it's easy to prove that there is an injective function $N \to \mathbb Q$.

But does my first step make sense? Say we had non-isolated discontinuities like $\epsilon > 0, x_0 \in N$ such that $B_\epsilon(x_0) \subseteq N$ - how could one derive a contradiction?

I've already shown that $$\lim_{x \nearrow x_0} f(x) \text{ and } \lim_{x \searrow x_0} f(x)$$ exist for all points $x_0 \in (a, b)$ and that $f$ is continuous at $x_0$ iff both limits equal. I just somehow fail to do the final step properly. Any thoughts, please?

## marked as duplicate by David Mitra, Asaf Karagila♦, t.b., Davide Giraudo, Zev ChonolesDec 29 '11 at 0:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• Discontinuities need not be isolated. If the left and right limits are not equal, then they define a non-empty open interval. In that interval is a rational number. So...? – Qiaochu Yuan Dec 28 '11 at 20:23
• @Alex: the Cantor set doesn't have the discrete topology as a subset of the reals. – Qiaochu Yuan Dec 28 '11 at 20:24
• It's not true that $N$ needs to be discrete. It can even be dense: Chose an injection $h:\mathbb Q\to \mathbb N$, and let $f(x)=x+\sum_{y\in \mathbb Q \cap (a,x)} 2^{-h(y)}$ which is strictly increasing but discontinuous at every rational number. – Henning Makholm Dec 28 '11 at 20:27
• I realized that and deleted my comment. Sorry to leave yours hanging. – Alex Becker Dec 28 '11 at 20:28
• In addition to 84870 which David Mitra links to, there are: math.stackexchange.com/questions/56831/… and math.stackexchange.com/questions/14458/… – Jonas Meyer Dec 28 '11 at 22:17

## 2 Answers

No, the set of discontinuities need not be discrete. For example, it's quite possible to have a discontinuity at $0$ and also at $1/n$ for each positive integer $n$.

Hint: for each discontinuity, there are rational numbers that are not in $f((a,b))$.

• Okay well, thanks for helping me out of this discrete-set dead-end. The solution is much easier without. – Aaron W. Dec 28 '11 at 21:10

Certainly $\lim_{x \nearrow x_0} f(x) \leq \lim_{x \searrow x_0} f(x)$. Also, $\sum\limits_{x_0\in (a,b)}\lim_{x \searrow x_0} f(x) - \lim_{x \nearrow x_0} f(x)$ is finite. It is not hard to show that since this is finite, all but countably many terms are $0$.

EDIT: When I shoot from the hip I forget that if $f(x)$ is unbounded you need to normalize it as $f(x)/\max\{|f(y)| : y\in (\frac{x+a}{2},\frac{x+b}{2})\}$ which is defined because $f(x)$ is monotonic and has all the discontinuities of $f(x)$.