Solution (source code)

= Solution

The <monotone convergence theorem> states that if
$0\leq f_n\uparrow f$ pointwise, then
$$
\int f_n\,d\mu\uparrow\int f\,d\mu,
$$
allowing the value $+\infty$.

Monotonicity of the integral shows that the increasing limit $L$ of the left side is at most $\int f$. Conversely, let $s$ be a nonnegative simple function with $s\leq f$, and fix $0<c<1$. The sets
$$
E_n=\{f_n\geq cs\}
$$
increase to the support of $s$. Hence
$$
\int f_n\,d\mu\geq c\int_{E_n}s\,d\mu
\longrightarrow c\int s\,d\mu.
$$
Let $c\uparrow1$ and take the supremum over all simple $s\leq f$. This gives
$L\geq\int f$, proving equality.