Looking for an example of an increasing function $f:[a,b] \to [a,b]$ which is discontinuous at infinitely many points I am looking for an example of an increasing    function $f:[a,b] \to [a,b]$ which is discontinuous at infinitely many points ; please help , thanks in advance . 
 A: Select infinitely many points in $[a,b].$ For example, $a,a+\frac {b-a}{2},a+\frac {b-a}{2}+\frac {b-a}{2^2},\cdots.$ Define $f$ to be a line segment in each of the intervals $[a+\frac {b-a}{2}+\cdots \frac {b-a}{2^n},a+\frac {b-a}{2}+\cdots \frac {b-a}{2^n}+ \frac {b-a}{2^{n+1}})$. For example, $f(x)$ increases from $ 1$ to $1+\frac {1}{2}$ in the first interval , from $1+\frac{1}{2}+\frac{1}{2^2}$ to $1+\frac{1}{2}+\frac{1}{2^2}+\frac{1}{2^3}$ in the second, etc. Then each of the end points of these subintervals $a+\frac {b-a}{2}+\cdots \frac {b-a}{2^n}$ is a point of discontinuity
A: Classic example: define
$$
I(x) = 
\begin{cases}
0 & x < 0\\
1 & x \geq 0
\end{cases}
$$
Take $f(x) = \sum_{j=1}^\infty 2^{-j}\cdot I(x - 1/j)$ on $[0,1]$.
If you want a function that's strictly increasing, consider $g(x) = f(x) + x$.
A: A simple example of a continuous function with an infinite number of removable discontinuities would be 
$$
f(x)=\frac{1}{\frac{x}{2} - \lfloor{\frac{x}{2}}\rfloor}
$$
Many more examples can be made with the floor and ceiling functions(or any other step functions, really) in the denominator, as they allow for controlled periodic zeroes(in this case, every even integer would result in a denominator of 0).
