Prove this inequality of integrals: Let $(X, M, \mu\ )$ be a measure space. Let $f$ be a positive measurable function with $\int_X f d \mu\ < \infty\ .$  Then for every $\epsilon\ > 0$, there is a set $E \in M$ such that $\mu(E)<\infty$ and
\begin{equation}
\int_X f d \mu\ \leq \int_E f d \mu\ + \epsilon 
\end{equation}
This problem appears on Bartle's Elements of Integration and Lebesgue Measure. I couldn't prove it for the life of me. And obviously, $E$ has to be a proper subset of $X$, otherwise, this is just trivial. Any idea?
 A: Each set $\displaystyle{A_n=\left\{x:|f(x)|>\frac{1}{n}\right\}}$ has finite measure.  Each function $f\cdot\chi_{A_n}$ is dominated by $f$, and $f\cdot\chi_{A_n}\to f$ pointwise ($\chi_{A_n}$ denotes the characteristic function of $A_n$).  By Lebesgue's dominated convergence theorem, $\int_{A_n}fd\mu\to \int_X fd\mu$ as $n\to\infty$.  Therefore $E$ can be taken to be $A_n$ for sufficiently large $n$.  
Here you could also just use monotone convergence, because $(f\cdot \chi_{A_n})$ increases to $f$.
A: Since the result is trivial if $\int_X {fd\mu }  = 0$ or $\mu(X) < \infty$, assume that  $\int_X {fd\mu }  > 0$ and $\mu(X) = \infty$.
Given $\varepsilon > 0$, it follows from the definition
$$
\int_X {fd\mu }  = \sup \bigg\{ \int_X {sd\mu } :0 \le s \le f,s \; {\rm simple}\bigg \} 
$$
that there exists a simple function $0 \leq s \leq f$ such that
$$
\int_X {fd\mu }  - \varepsilon  \le \int_X {sd\mu }. 
$$
We can suppose that, for some $n \in \mathbb{N}$, $s$ takes positive values $\alpha_i$, $i=1,\ldots,n$, on some measurable subsets $E_i$ of $X$ with (necessarily) $\mu(E_i) < \infty$ (since $\int_X {sd\mu }  < \infty $), and $s$ is zero on the complement of $E_1  \cup  \cdots  \cup E_n $. Noting that $s \leq f$, we then have
$$
\int_X {sd\mu } = \int_{E_1  \cup  \cdots  \cup E_n } {sd\mu }  \le \int_{E_1  \cup  \cdots  \cup E_n } {fd\mu } ,
$$ 
from which the desired result follows with $E = E_1  \cup  \cdots  \cup E_n$.
