Question: Does there exist a Borel measurable function $f: \mathbb{R} \rightarrow [0, \infty)$ such that $\int_{a}^{b} f(x) dx = \infty$ for all real numbers $a < b$? Either find an example or show thta no such $f$ exists.
My effort: NO SUCH $f$ EXISTS. If exists, then according to Lusin's theorem, $f|_{[0, 1]} \rightarrow [0, \infty)$ contains a compact set $E \subset[0, 1]$ such that $m([0, 1]\setminus E) < \epsilon$, on which $f$ is continuous. It remains to show that $E$ at least contain one interval. However, that is not true since there exists a compact set which does not include any interval. Then I don't know how I should proceed... Can anyone help me with that?