Let

${f}_{0}(x)=\{\begin{array}{ll}0& \text{if}{r}_{0}\u2a7ex\\ 1& \text{if}{r}_{0}x.\end{array}$

It's increasing. Besides, it is discontinuous at ${r}_{0}$ and only at ${r}_{0}$.

Now, let

${f}_{1}(x)=\{\begin{array}{ll}0& \text{if}{r}_{1}\u2a7ex\\ \frac{1}{2}& \text{if}{r}_{1}x.\end{array}$

It's increasing and it is discontinuous at ${r}_{1}$ and only at ${r}_{1}$. So, ${f}_{0}+{f}_{1}$ is increasing and it is discontinuous at ${r}_{0}$ and at ${r}_{1}$ and only at those points.

More generally, for each $n\in {\mathbb{Z}}_{+}$, let

${f}_{n}(x)=\{\begin{array}{ll}0& \text{if}{r}_{n}\u2a7ex\\ \frac{1}{{2}^{n}}& \text{if}{r}_{n}x.\end{array}$

Then $f$ is increasing, since it is equal to $\sum _{n=0}^{\mathrm{\infty}}{f}_{n}$. And it is not hard to see that it is discontinuous at $x$ if and only if $x\in \{{q}_{n}\mid n\in {\mathbb{Z}}_{+}\}=\mathbb{Q}$ (this follows from the fact that the convergence of the series $\sum _{n=0}^{\mathrm{\infty}}{f}_{n}$ is uniform, by the Weierstrass $M$-test). The reason why I told you in the comments that it should be $\frac{1}{{2}^{n}}$ rather than $\frac{1}{2n}$ was so that the expression $\sum _{n=0}^{\mathrm{\infty}}{f}_{n}$ makes sense, that is, so that it converges, for every $x\in \mathbb{R}$.

###### Did you like this example?

Subscribe for all access