A question from a past analysis qual at my university reads: Let $f_n$ be Lebesgue integrable on $\mathbb{R}$ such that $|f_n(x)|\searrow 0$ a.e. Also assume that the series $\sum_{n=1}^\infty f_n$ is an alternating series for almost every $x$. Prove that $$ \int_{\mathbb{R}} \sum_{n=1}^\infty f_n(x)dx=\sum_{n=1}^\infty \int_\mathbb{R} f_n(x)dx$$
My first thought was to show that $\sum_1^\infty \int_\mathbb{R} |f_n|<\infty$ and then use the dominated convergence theorem. However, the sequence of functions $f_n(x)=\frac{(-1)^n}{\log(n)}\chi_{[-1,1]}(x)$ satisfies the hypothesis, but $\sum_2^\infty \int_\mathbb{R} |f_n|dx=2\sum_2^\infty 1/\log(n) =\infty$. The function $g(x):=\sum_{n=1}^\infty f_n(x)$ converges a.e. (alternating series test) and $g_n(x):=\sum_1^n f_k(x)\rightarrow g(x)$, but it's not necessarily a monotone sequence so I can't use the monotone convergence theorem. Using Fatou's lemma, I think I can show if $\int_\mathbb{R} g(x)dx=\infty$, then both sides of the equality above is equal to $\infty$, so I can move on to the case where $\int_\mathbb{R} g(x)dx<\infty$. But I get stuck here, how should I proceed?