$\lim_{n\to\infty}\int f_n =0$ while $\limsup_{n\to\infty} f_n = +\infty$

In an exercise, I was asked to find a sequence of positive functions in $\mathcal{L}([0,1])$ such that $$\lim_{n\to\infty}\int_{[0,1]} f_n(x)\mathrm{d}x =0\qquad\text{while}\qquad \limsup_{n\to\infty} f_n(x) = +\infty\quad\text{for every}\:x\in [0,1].$$

My idea was the following: since $\{\sqrt{2}\:n\}$ is dense in $[0,1)$, for every $x\in[0,1)$ there exists an increasing function $\varphi_x$ such that $\{\sqrt{2}\:\varphi_x(n)\}\to x$. Then I want to create a sequence of functions $(f_n)$ in the following way $$f_n(x)=\begin{cases} n^4x+n-\{\sqrt{2}\:n\}n^2 \qquad&\text{if}\qquad \{\sqrt{2}\:n\}-\frac{1}{n^3}\leq x\leq \{\sqrt{2}\:n\} \\ +\infty &\text{if}\qquad x=1\\ 0 &\text{otherwise.} \end{cases}$$ Each $f_n$ is a triangle with a extra point at $x=1$. Clearly $f_n(1)\to\infty$. If $x<1$, pick $\varphi_n$ and then $f_{\varphi_x(n)}(x)\to\infty$. We also have $\int f_n = 2/n^2 \to 0$. This seems to imply the result.

I wonder if it exists one such sequence with $f_n$ continuous. I also wonder if the interval $[0,1]$ is of any importance here. It exists one such sequence (with $f_n$ continuous or not) if we chance $[0,1]$ by $\mathbb{R}$?

• Well $\sqrt{2} n$ is not even in $[0,1)$ for all $n$, so it cannot be dense in it. Perhaps you can use Fatou's Lemma $\int \limsup f_n \leq \limsup \int f_n$ to help you. – Emilio Minichiello May 18 '18 at 9:33
• @EmilioMinichiello $\{\alpha\}=\alpha-\lfloor\alpha\rfloor$ is the usual notation for the fractional part of $\alpha$. – Gabriel May 18 '18 at 16:10

Arrange $I_{(\frac {i-1} {2^{n}} ,\frac {i-1} {2^{n}})}, 1\leq i \leq 2^{n},n\geq 1$ is a single sequence $g_1,g_2,...$ and take $f_n=a_n g_n$ where $a_n=( \int_0 ^{1} g_n(x)\, dx)^{-1/2}$. Note that every point $x$ in $(0,1)$ belongs to $(\frac {i-1} {2^{n}} ,\frac {i-1} {2^{n}})$ for infinitely many values of $n$ and $a_n \to \infty$ so $\limsup f_n =\infty$. Also $\int f_n =\int_0 ^{1} g_n(x)\, dx)^{1/2} \to 0$.
For all $n>1$, write $$n= 2^a +b$$ with $a>0$ and $0 \le b \le 2^a-1$. Then define $$f_n(x)= \begin{cases} a & \mbox{ if } x \in [b2^{-a}; (b+1)2^{-a}] \\ 1/a & \mbox{ otherwise} \end{cases}$$ These are not continuous. To make them continuous, simply consider their mollification under suitable convolution. See https://en.wikipedia.org/wiki/Mollifier for details.