# Show that $f$ is everywhere discontinuous on $[0,1]$.

Question from R.L.Carothers-Real Analysis;

1. Let ($r_ n$ ) be an enumeration of the rationals in $[ 0 , 1 ]$ and define $f$ on $[ 0, 1 ]$ by $f(x) = \sum_{r_n<x} 2^{-n}$ . Show that $f$ is everywhere discontinuous on $[ 0, 1 ]$ but that $f$ is everywhere continuous when considered as a function on only $[ 0, 1 ] \setminus \Bbb Q$.

Let $a\in [0,1]$ .

To show that $f$ is not continuous at $a$.

Now $f(a+h)=\sum _{r_n<a+h} 2^{-n}$ and $f(a)=\sum _{r_n<a} 2^{-n}$.

As $h\to 0\implies f(a+h)\to f(a)$

The problem is I am getting $f$ to be continuous.Where am I wrong ?

• $f$ is continuous at all irrationals. It's discontinuous at the rationals. – Daniel Fischer Dec 13 '16 at 14:30
• Essentially this, only here the function is left-continuous and there it's right-continuous. – Daniel Fischer Dec 13 '16 at 14:40
• @DanielFischer;Is the question in the book wrong then? – Learnmore Dec 13 '16 at 15:04
• Yes, it is. $f$ is a monotonic function, and thus it can have at most countably many discontinuities. And all of its discontinuities are jump discontinuities. – Daniel Fischer Dec 13 '16 at 15:08
• I am afraid then ,if the problems are wrong in a book then is it safe to read it?@DanielFischer – Learnmore Dec 13 '16 at 15:10