Lebesgue integral is finite but functions are unbounded in every interval 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.
 A: Let $f_0$ be function unbounded in a neighborhood of $0$ with finite integral, e.g. $$f_0(x) = \frac{1}{\sqrt{|x|}} \chi_{[-1,1]}.$$ You may need to rescale to make sure it has integral $1$. If $\{r_n\}$ is an enumeration of the rationals (or any dense countable set) you can define $$f_n(x) = f_0(x-r_n)$$ so that $f_n$ has integral $1$ but is unbounded on every neighborhood of $r_n$.  What can you say about $\sup_n f_n$?
A: Let $h(x) = \frac{1}{\sqrt{\pi}}\exp{(-x^2)}$. I pick this because $\int_{-\infty}^{\infty}h(x)dx = 1.$
Let $g_n(x) = \begin{cases} 0 &\mbox{if } x \in \mathbb{R} \backslash \mathbb{Q} \\ 
n & \mbox{if } x \in \mathbb{Q} \end{cases} $
Let $f_n := g_n + h$
This works as $\mathbb{Q}$ is dense in $\mathbb{R}$ and has Lebesgue measure $0$, so $f_n$ is lebesgue integrable $ \forall n \int_{-\infty}^{\infty}f_n(x)dx = 1 $, and $\sup_n f_n = \infty$ in every open interval.
A: 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)$.
A: Let $q_1,q_2, \dots$ be the rationals. Define $f(x) = \chi_{(0,1)} + \sum_{k=1}^{\infty}n\chi_{\{q_n\}}.$ The sequence $f,f,f,\dots $ then does the job.
