unbounded, measurable not continuous function with finite integral

40 Views Asked by At

Give a function $f:(0,1)\rightarrow \mathbb R$ with the following properties:
a) $f$ is $\mathscr L((0,1))-\mathscr B(\mathbb R)$ measurable
b) $f$ is not continuous at any point
c) $f$ is unbounded d) $\int_{(0,1)}d\lambda=2$

I thought about a function like $f (x) = \left\{ \begin{array}{ll} \frac{1}{x} & x\in\mathbb Q \\ 2 & \, x\not\in \mathbb Q \\ \end{array} \right. $

$f$ is unbounded because $f(x)\rightarrow \infty$ for $x\rightarrow 0,x\in\mathbb Q$. Also $\int_{(0,1)}fd\lambda=2$ because $\mathbb Q$ is a nullset. But why is this function Borel-Lebesgue measurable and not continuous?