Show that exists a not decreasing function that $f:(a,b)\rightarrow \mathbb{R}$ that is continuous only in $(a,b)\setminus D$. Show that there exists a not decreasing function $f:(a,b)\rightarrow\mathbb{R}$ continuous on $(a,b)\setminus D$ and discontinuous on $D$ where $D$ is a countably infinite subset of $(a,b)$.
This is an exercise that I tried very last semester but my weak point is to get examples of functions. Can anyone help me with this?
*Moreover, one could indicate something for me to improve my skill with examples?
 A: A possible approach is as follows. Pick a positive summable sequence, $\langle c_n\rangle $. List your countably infinite set $D$ as $d_1,d_2,d_3,\ldots$  and define the function $$f(x)=\sum_{d_n<x}c_n$$ 
Where we sum through all indices $n$ for which $d_n<x$. Observe $f$ is well defined since the $c_n$ are positive, so the order in which we sum them is irrelevant, and the sum is always convergent. Then prove $f$ is discontinuous at each $d_n$, and continuous elsewhere, in fact: $f$ is monotone increasing, $f(d_n^+)-f(d_n^-)=c_n>0$, and $f$ is left continuous at every point in its domain.
A: Hint 1 Solve the problem for a single point. Can you construct such an example?
Hint 2 If you have two points, you can add the functions. Same for a finite collection. With infinitely many, you have to make sure that your sum makes sense (i.e. convergence).
Look for something like $\sum a_i F_i$ where $F_i$ is the function corresponding to the ith point in your list, and $a_i$ is a positive number so small that the sum is convergent.
For example, the simplest approach is to pick  $F_i$ to be bounded and $a_i=\frac{1}{2^i}$.
