# Sequence of functions on $[0,1]$ that converges pointwise to $0$ for all $x$, whose integral converges to $0$, but whose supremum isn't in $L^1$

Lately I've been trying to solve some of the excersises in Rudin's "Real and Complex analysis", and I came across one which I got myself truly stuck on. Specifically, it goes like this:

Find continuous functions $$f_n:[0,1]\rightarrow[0,+\infty)$$ such that $$f_n\rightarrow0$$ for all $$x\in[0,1]$$ as $$n\rightarrow\infty$$, $$\int_0^1f_n(x)\ dx\rightarrow0$$, but $$\sup\limits_{n\in\Bbb{N}}f_n$$ is not in $$L^1$$.

I've been trying to think of a sequence of functions $$f_n$$ which converges to $$0$$ and whose integral also converges to $$0$$, such that there exists a sub-sequence $$f_{n_i}$$ which also converges to $$0$$ (necessarily, as this is a property of convergent real number sequences, that is, any sub-sequence of a convergent real number sequence is also convergent and converges to the same limit), but such that $$\lim\limits_{i\to\infty}\int_0^1f_{n_i}=+\infty$$. Unfortunately, I can't seem to find such a series, and I would really appreciate some help!

You essentially just need a sequence $$a_n > 0$$ such that $$a_n \to 0$$ but $$\sum_{n\in \mathbb N} a_n$$ diverges. For example, take $$f_n$$ to be continuous, non-negative and supported on $$(\frac{1}{n+1}, \frac 1n)$$, such that $$\int_0^1 f_n(x) dx = \frac 1 {\sqrt n}$$ (you could make the graph of $$f_n$$ a triangular spike of the correct height to accomplish this). Then $$f_n \to 0$$ pointwise and in $$L^1$$, and since the supports are disjoint, you have $$\sup_{n}f_n = \sum_n f_n$$ and since $$\sum_{n} \int^1_0 f_n(x) dx$$ diverges, you will not have $$\sup_n f_n \in L^1[0,1]$$.
• I found your first answer quite useful. However, regarding your first edit, I would like to remark that the functions' range is limited to $[0,\infty)$, so we can't add a negative spike like you suggested. Not that it is needed: your first interpretation of the problem was indeed the right one.
Hint: Let $$f_n=n\chi_{[1/(n+1),1/n]}.$$ The $$f_n$$ do everything you want, except for continuity.