# Convergence in the $L^2$ sense but NOT pointwise.

Let

$$f_n(x)=\left\{ \begin{array}{l l} 1 \quad \mbox{ if \frac12 - \frac1n \leq x \leq \frac12 + \frac1n,} \\ 0 \quad \mbox{otherwise} \\ \end{array} \right.$$

on the interval $[0,1]$.

How do I show that $f_n \to 0$ in the $L^2$ sense but NOT pointwise.

• What is the integral of $f_n^2$? Does $f_n\to 0$ for $x=1/2$? Mar 27, 2018 at 14:21

Hint: $$\|f_n\|_{L^2}^2= \int_{\frac{1}{2}-\frac{1}{n}}^{\frac{1}{2}+\frac{1}{n}} 1^2 \, dx = \frac{2}{n}.$$
• Thank you. I can see that as $n \to \infty$, $f_n \to 0$. In my textbook, the definition says that the sequence converges to $f(x)$ in the $L^2$sense on $I$ if $\|f_n(x)-f(x)\|_{L^2} \to 0$ as $n \to \infty$ If $I=[a,b]$, stating that $f_n(x) \to f(x)$ in the $L^2$ sense is equivalent to saying that $\int_{b}^{a} [f_n(x)-f(x)]^2dx \to 0 as n \to \infty .$ What would be $f(x)$?
• @KBG In this case, $f =0$ in the $L^2$ sense. Mar 28, 2018 at 8:01
To show that $f_n$ does not converge pointwise to $0$ it is enough to notice that $f_{n}(1/2)=1$ for all $n$.
But you can show that $f_n(x)\to0$ as $n\to \infty$ for all $x\neq 1/2$ where $x\in [0,1]$.