A function that is bounded and measurable but not Lebesgue integrable

Could you give me concrete examples about

"a function that is bounded and measurable but not Lebesgue integrable".

Royden's textbook "Real analysis" says a bounded measurable function is said to be integrable if its lower Lebesgue integrale is equal to its upper Lebesgue integral.

(I know if the domain is of finite measure, then a bounded function is Lebesgue integrable iff it is measurable, so my desired example need to be on a domain of infinite measure.)


Solution 1:

Let $f : \Bbb R \to \Bbb R$ be defined as:

$$f(x) = \begin{cases} 1 & x \in [0, \infty) \\ 0 & \text{else} \end{cases}.$$ Clearly, $f$ is measurable since $f = \chi_{[0, \infty)}$ (and $[0, \infty)$ is a Lebesgue measurable set, so its characteristic function is measurable).

Also clearly $f$ is bounded. But $\int \limits_{\Bbb R} |f| \,dm = \infty$.

Solution 2:

This happens exactly when the integral of the positive part and the integral of the negative part are both infinite. One nice example is

$$\int_1^\infty \frac{\sin(x)}{x} dx$$

which exists in the improper Riemann sense and not in the Lebesgue sense. A more extreme example where this is easier to prove would be

$$\int_0^\infty \sin(x) dx.$$