Necessary condition for integrability of positive measurable function over unbounded domain Is the following assertion true: Consider a measurable function, $g:[0,+\infty>\rightarrow {\bf R}$ , $g=g(x)$, such that $g(x)\geq 0$ ($(a.e. x\in [0,+\infty>$) (in the sense of Lebesgue measure) and $\int_0^{+\infty}g(x)dx<+\infty$ (in the sense of Lebesgue integral). Then it holds that $\liminf_{x\rightarrow+\infty}g(x)=0$ (I refer to this as to necessary condition for integrability  of positive measurable function over unbounded domain; I am quite sure this result is named by its author, but I couldn't find what his name is). Remark. If $g$ is continuous, the assertion is easily proved by assuming the opposite. The problem I see with the assertion in the case of general measurable function is the definition of $\liminf$ at $+\infty$, since measurable functions are defined almost everywhere. Or maybe there is no problem? I would appreciate if I could see how exactly $\liminf$ is defined for a measurable function.
 A: I see the issue, so I hope this helps. Let the measure space be $(\mathbb{R^+},\mathcal{B}(\mathbb{R}^+),\lambda)$. We have that $0\leq \mathbb{I}_{\{x:x>n\}}(x)g(x)\leq g(x) \in \mathcal{L}^1$, $\forall n \in \mathbb{N}$ so $\mathbb{I}_{\{x:x>n\}}(x)g(x)  \in \mathcal{L}^1$, $\forall n \in \mathbb{N}$. By dominated convergence
$$\lim_{n \to \infty}\int_{\{x:x>n\}}g(x)\lambda(dx)=\int_{\mathbb{R}^+}\lim_{n \to \infty}\mathbb{I}_{\{x:x>n\}}(x)g(x)\lambda(dx)=0$$
By Markov inequality, for arbitrary $\varepsilon > 0$:
$$\lambda(\{x:g(x)\geq \varepsilon\}\cap\{x:x>n\})\leq \frac{1}{\varepsilon}\int_{\{x:x>n\}}g(x)\lambda(dx)\to 0$$
Furthermore
$$\{x:g(x)\geq \varepsilon\}\cap\{x:x>n\}\supseteq \{x:g(x)\geq \varepsilon\}\cap\{x:x>n+1\}$$
and $\lambda(\{x:g(x)\geq \varepsilon\}\cap\{x:x>1\})<\infty$ so by continuity of measures
$$\lambda\bigg(\bigcap_{n \in \mathbb{N}}\{x:g(x)\geq \varepsilon\}\cap\{x:x>n\}\bigg)=0$$
Since $ \varepsilon $ is arbitrary:
$$\lambda\bigg(\bigcap_{n \in \mathbb{N}}\{x:g(x)>0\}\cap\{x:x>n\}\bigg)=0$$
Now this says something about $g$ in the limit $x \to \infty$ but I don't really see if the claim should follow or if there is another route.
A: Here is one possibility how we can avoid the fact that a measurable function is defined almost everywhere. We recall that precise representative of g, denoted by $g_0$, is defined as follows:
$$
g_0(x):=\lim_{\rho\rightarrow 0}{1\over{2\rho}}\int_{x-\rho}^{x+\rho}g(y)dy\;,\;\;\hbox{if the limit exists},
$$
and $g_0(x):=0$, otherwise. Now $g_0(x)=g(x)$ (a.e. $x\in<0,+\infty>$), and $g_0$ is well-defined pointwisely on $<0,+\infty>$. Finally, we introduce the following definition of liminf of $g$ at $+\infty$:
$$
\liminf_{x\rightarrow+\infty}g(x):=\liminf_{x\rightarrow+\infty}g_0(x)\;,\;\;  x\in<0,+\infty>\;. 
$$
It looks satisfactory to me(at least it works in the case $g\in {\rm L}^1_{loc}(<0,+\infty>)$, which we consider here; for the general measurable function, however, I am not sure how to proceed- the answer above of Snoop may be the best we can get).
