Can we find a Borel measurable function $f:\mathbb{R} \rightarrow (0,\infty)$ such that $\int \mathcal{X}_I f d\mu = \infty$ for every nonempty open interval $I \subset \mathbb{R}$, where $\mu$ is the Lebesgue measure on $\mathbb{R}$ ?
I think the answer is true; there is such a function, but with this condition "integral = infinity" this makes $f$ is unbounded almost everywhere, so not sure how to define it, if it exists.