series of bounded measurable functions converge implies coefficients convergence $\{f_n\}$ sequence of non-negative measurable bounded functions on [0,1], $f_n(x) \leq M$ for all $n$  and almost all $x$. $\int_0^1 f_n = 1$ for all $n$. If $\{a_n\}$ be any sequence of non-negative real numbers satisfying $\sum a_n f_n(x) < \infty$ for almost all $x$, show that $\sum a_n < \infty$.
I could not figure out how to do this. Any hint would be appreciated.
 A: Consider $g_k(x)=\sum_{n\geq k}a_nf_n(x)$. This is a series of non-negative measurable functions, hence is non-negative and measurable, and $g_1\geq g_2\geq \dots$. Also, the assumption $\sum_{n\geq 1}a_nf_n(x)<\infty$ a.e implies that $g_k\to 0$ pointwise a.e (if a series is finite, then the tail of the series has to converge to zero... almost by definition).
Now, since $[0,1]$ has finite measure, we can use Egoroff's theorem to deduce that for each $\epsilon>0$, there is a set $E\subset [0,1]$ with $\mu(E)<\epsilon$ and such that $g_k\to 0$ uniformly on $E^c$. In particular, there exists an $N\in\Bbb{N}$ such that $\sup\limits_{x\in E^c}g_N(x)\leq 1$. So, (using monotone convergence to interchange sum and integral)
\begin{align}
\mu(E^c)\geq \int_{E^c}g_N = \sum_{n\geq N}a_n \int_{E^c}f_n \geq \sum_{n\geq N}a_n(1-M\epsilon) \geq \frac{1}{2}\sum_{n\geq N}a_n,
\end{align}
where the last inequality can be achieved by choosing $\epsilon>0$ so small that $1-M\epsilon \geq \frac{1}{2}$. Thus, $\sum_{n\geq N}a_n \leq 2\mu(E^c)<\infty$. Since the tail of the series is finite, the whole series $\sum_{n\geq 1}a_n$ is also finite.
By the way, there's nothing special about $\frac{1}{2}$ in the proof above; all we need is to choose $\epsilon>0$ small enough so that $1-M\epsilon>0$. Also, as the proof shows, there's nothing special about $[0,1]$; the same is true on any finite measure space.

Edit:
Here are some extra comments regarding the thought process of the solution.
Egoroff's theorem is an exceptionally useful technical result that now whenever I see a finite-measure assumption, I immediately think about whether it is helpful for the problem at hand. Once we have that in mind, note that Egoroff requires us to look at sequences of complex-valued functions which converge pointwise a.e. In this problem, we're given information about the sum $f:=\sum\limits_{n\geq 1}a_nf_n$. From here, there are two natural sequences to consider:

*

*First is the partial sums $s_k=\sum\limits_{i=1}^ka_if_i$.

*Second is the tail $g_k=\sum\limits_{n\geq k}a_nf_n$, as I considered above.

By definition, we can always say that $s_k\to f$. So, this isn't any extra information for us. Our hypothesis tells us that $f$ is finite a.e. so this gives us the extra information that $g_k\to 0$ a.e. That's why I decided to focus on the sequence $g_k$.
Next, by looking over the proof, we see that the key idea is the lower bound $\int_{E^c}f_n\geq \frac{1}{2}>0$. In other words, the crucial part of this proof is not the assumption that $f_n$'s are uniformly bounded with integral $1$. Rather what we want is that the $f_n$'s are "reasonably-distributed" functions, in the sense that their mass isn't concentrated on sets of arbitrarily small measure. Let us make the following definition:

Let $(X,\mathfrak{M},\mu)$ be a measure space and $\{f_n\}_{n=1}^{\infty}$ be a sequence of non-negative. We shall say $\{f_n\}_{n=1}^{\infty}$ is "reasonably-distributed" with respect to $\mu$ if there is a $\delta>0$ such that for any measurable set $E\subset X$ with $\mu(E)<\delta$, we have $\liminf\limits_{n\to\infty}\int_{E^c}f_n\,d\mu>0$.

The assumptions in the problem, that $\int f_n=1$ and $f_n$'s are uniformly bounded certainly imply the above condition, but not conversely. So, we have a slight strengthening of the result:

Suppose $(X,\mathfrak{M},\mu)$ is a finite measure space, and $\{f_n\}_{n=1}^{\infty}$ is a sequence of non-negative integrable functions which are "reasonably-distributed" with respect to $\mu$. If $\{a_n\}_{n=1}^{\infty}$ is any positive sequence of numbers such that $\sum\limits_{n=1}^{\infty}a_nf_n$ is finite a.e. then $\sum\limits_{n=1}^{\infty}a_n<\infty$.

