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?
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}$.