Example of an increasing, integrable function $f:[0,1]\to\mathbb{R}$ which is discontinuous at all rationals?

709 Views Asked by At

I have really no idea about this:

Problem: Show that there exists a function $f:[0,1]\rightarrow\mathbb{R}$ such that:

  1. $f$ is discontinuous in all $x\in \mathbb Q$.
  2. $f$ is increasing in $[0,1]$.
  3. $f$ is integrable.

EDIT: Sorry, it is not discontinuous in all $x\in \mathbb R \setminus \mathbb Q$, just in $\mathbb Q$.

2

There are 2 best solutions below

3
On BEST ANSWER

In general for any countable set $C \subset \mathbb R$ you can find a monotone function that is discontinuous only on $C$. Your particular case has already been answered elsewhere on the site, see this answer of Brian Scott.

0
On

You can take $f_0(x)=x$ and a surjective map $q:\mathbb{N}\to\mathbb{Q}\cap[0,1]$, then take: $$ I_x^N = \{n\in\mathbb{N}:q(n)\leq x\}, $$ $$ f_N(x) = f_0(x)+\sum_{n\in I_x^N}\frac{1}{n^2+1}, $$ $$ f(x) = \sup_{N}\, f_N(x). $$