# Convergence in $L^2$ does not imply convergence in $L^\infty$

I'm looking for a sequence of functions $\{f_n\}_{n\in\mathbb{N}}$, continuous on the interval $[a,b]$ such that it converges to $f$ under the $L^2$ norm, defined as $$\lVert \rVert_2=\left(\int_a^b (f_n(x)-f(x))^2dx\right)^{1/2},$$ but not under the $L^\infty$ norm, defined as $$\lVert \rVert_\infty=\sup_{x \in[a,b]}\lvert f_n(x)-f(x)\rvert.$$

I've tried a bunch of functions, especially trigonometric functions. However, every time, I get stumped by the power of two in the definition of the $L^2$ norm.

• In this case, the limit is not in $L^2$; change it to $1/x^{1/4}$ and this works perfectly. EDIT: this was in response to a comment suggesting $f_n(x) = \max(n, 1/x)$ as a candidate (assuming the interval is $[0,1]$). – User8128 Mar 23 '18 at 17:27

Let $f_n(x) = x^n$ on $[0,1].$ Verify that $\|f_n - 0\|_2 \to 0,$ while $\|f_n - 0\|_\infty = 1$ for every $n.$

• Wow, that's really simple, I can't believe it escaped me... Just to verify, in the $L^\infty$ norm, how can you claim the limit is $f=0$? This might seem like an elementary question, but is the limit unique regardless of the space's norm? – Grizzly0111 Mar 23 '18 at 18:43
• @Grizzly0111 I do not understand your comment. I answered your question fully and precisely. – zhw. Mar 23 '18 at 18:57
• Yes, you answered my question fully. You write $\lVert f_n - 0 \rVert _\infty = 1$. I just want to understand how you can claim that if the limit of $f_n$ exists in the space with the norm $\lVert \rVert _\infty$, then it is 0. My apologies if I was unclear. – Grizzly0111 Mar 23 '18 at 19:07
• @Grizzly0111 Here's the question: "I'm looking for a sequence of functions ${f_n}$ continuous on the interval $[a,b]$ such that it converges to $f$ under the $L^2$ norm, but not under the $L^\infty$ norm." So my sequence $f_n(x)=x^n$ converges to $0$ in the $L^2$ norm, but does not converge to $0$ in the $L^\infty$ norm. Why aren't we done? – zhw. Mar 23 '18 at 19:41
• Ah, my bad, you are right, we are done. – Grizzly0111 Mar 23 '18 at 19:43

Consider the constant function $f(x) = 1$ and let $f_n(x) = \chi_{[a+1/n, b]}$ where $\chi$ denotes the indicator functions. Then $$\|f - f_n\|_\infty = 1$$ for all $n$ since the functions differ by $1$ on the positive measure set $[a,a+1/n)$. However, it is easy to show that $f_n \to f$ in $L^p$ for any $p$.

As a side note, what you are really exploiting here is the fact that $L^p$ is separable for any $1\le p < \infty$ but $L^\infty$ is not separable.

EDIT: I notice now that we need $f_n$ to be continuous; this is no problem. Just change $f_n$ on the interval $[a, a+1/n)$ so that it is linear and satisfies $f_n(a) = 0, f_n(1/n) = 1$. The rest of the answer remains the same except now we may note that $$\| f_n -f\|_\infty \ge 1/2$$ since they differ by more than $1/2$ on a set of positive measure (of course, we still do have $\| f_n - f\|_\infty =1$ but you don't need to prove this).

• the sequence $(f_n)$ needs to be continuous according to OP. Your sequence is not, it has jump discontinuities. – Arian Mar 23 '18 at 17:21
• Thanks for the answer, it makes a lot of sense! One quick question to make sure I understand: when you say "Just change fn on the interval [a,a+1/n) so that it is linear and satisfies fn(a)=0,fn(1/n)=1 ", do you mean that I should take something like $f_n(x)=nx$ for 0<x<a+1/n, and $f_n(x)=1$ for a+1/n<x<b ? – Grizzly0111 Mar 23 '18 at 18:04
• Yes, that’s exactly what I mean. But it should be $f_n(x) = n(x-a)$ I suppose. – User8128 Mar 23 '18 at 18:07

Try that $f_{1}=\chi_{[0,1]}$, $f_{2}=\chi_{[0,1/2]}$, $f_{3}=\chi_{[1/2,1]}$, $f_{4}=\chi_{[0,1/4]}$,...

$f_{n}\rightarrow 0$ in any $L^{p}[0,1]$ for $1\leq p<\infty$ but there is no any $x$ such that $\lim_{n\rightarrow\infty}f_{n}(x)$ exists.

To make them to be continuous, just like what @User8128 has done, join splines to the functions such that the areas of the triangles becoming more and more smaller.

Have $f_n(x)$ be zero on most of the interval except for a sharp quick spike that reaches $y=n$ on a subinterval short enough so that the integral is of order $O(\frac{1}{n})$.

Obviously $f_n \longrightarrow 0$ in $L^2$ norm, but $\|f_n-f_m\|_\infty$ is not small even for large $n$ and $m$, so $f_n$ cannot converge in this norm.