Q:

Series converges but term by term integration not valid?

Give an example of a series $\sum g_n$ of Lebesgue integrable functions on $\mathbb{R}$ that converges but for which term by term integration is not valid.
This is last minute exam revision so I do not have time to make an attempt as I normally do, I'm too busy reading over proofs.

A:

Hint: Inductively define $g_n$ supported in $[0,1/n]$ so that $\sum_n g_n(x) = 1$ but $\int_0^1 g_n = 0$.

