TITLE: Lebesgue integral is finite but functions are unbounded in every interval
QUESTION [6 upvotes]: The following is a question in my midterm exam.
Let $f_n: \mathbb{R} \rightarrow \mathbb{R}$ be a seq. of Lebesgue integrable functions such that 
$$
\int_{-\infty}^{\infty} f_n(x) dx =1
$$
and $\sup_n f_n$ is unbounded in every open interval. Find such a sequence of $f_n$'s.
I've tried to think along the lines that for every irrational number my functions are $0$. But I'm unable to proceed along this direction since I don't know how to manipulate the functions at rational numbers to meet the above criteria.

REPLY [3 votes]: Pushing all the way to the extreme, just a single function can do all the job: Let $g_i(x)$ by
$$ g_i(x) = \frac{1}{2\sqrt{x}} \mathbf{1}_{(0, 4^{-i})}(x). $$
Notice that $g_i$ is unbounded on any neighborhood of $0$ and its integral over $\Bbb{R}$ is $2^{-i}$. Now enumerate $\Bbb{Q}$ as $\{r_1, r_2, \cdots\}$ and define $f$ by
$$ f(x) = \sum_{i=1}^{\infty} g_i(x - r_i). $$
Applying the monotone convergence theorem, this function is non-negative, integrable with $\int_{\Bbb{R}} f = 1$, and unbounded near any rational number. Consequntly this function is unbounded on any open interval.
Finally, take $(f_n) = (f, f, f, \cdots)$.