# Finite function with infinite Lebesgue integral over any positive measure set

Is there a measurable function $f:\mathbb{R}\rightarrow [0,\infty)$ such that $$\int_A f\, \mathrm{d}\lambda=\infty$$ for any (measurable) set $A\subseteq\mathbb{R}$ with $\lambda(A)>0$. ($\lambda$ is the Lebesgue measure)

• My answer is wrong. Please, unaccept it. The answer by @Crostul is correct. – 5xum Jun 3 '15 at 14:16

The answer is no. Let $f \ge 0$ be measurable. For all $n\ge 1$ define $$A_n=\{ t \in [0,1] : f(t) \ge n\}$$ Clearly $A_n$ is a descending chain of measurable sets, and $\bigcap_n A_n = \emptyset$. Then $$0= \lambda \left( \bigcap_n A_n \right) = \lim_n \lambda(A_n)$$ hence there exists $n\ge 1$ s.t $\lambda(A_n) \le \frac{1}{2}$. Then take $$B_n = [0,1] \setminus A_n$$ This is a set of positive measure, and $f$ is bounded in $B_n$, hence $\int_{B_n} f < \infty$.
No. Take some $x_0\in \mathbb R$, and let $A=[x_0-1, x_0+1]\cap f^{-1}([f(x_0), f(x_0)+1])$. This set is non-empty, since it contains at least $x_0$, and it is measurable.
By definition, $f$ is bounded on $A$, since $f(x)\leq f(x_0)+1$ for all $x\in A.$
Therefore, $$\int_A f d\lambda \leq f(x_0)\cdot \lambda(A)<\infty$$
• Do you mean $x_0 \in f^{-1}(\mathbb{R})$ ? – Joel Cohen Jun 3 '15 at 10:54
• @JoelCohen Actually, $x_0\in\mathbb R$ will do just fine. Thanks. – 5xum Jun 3 '15 at 10:56
• Why would you have that $\lambda(A) >0$? This is something the OP required. – Crostul Jun 3 '15 at 13:36