Give a sequence of functions $f_{n}:\mathbb{R}\to\mathbb{R}$ that converge in $L^{2}$ but pointwise nowhere.
I know that on bounded intervals such as $[0,1]$, the typical example of a sequence converging in $L^{2}$ but pointwise nowhere is the characteristic functions for intervals that get smaller eg. $f_{1} = 1_{[0,1]}, f_{2} = 1_{[0,\frac{1}{2})}, f_{3} = 1_{[\frac{1}{2},1]}, f_{4} = 1_{[0,\frac{1}{4})}...etc.$
How would one generalise this example to the real line or unbounded domains? I thought about doing this on each interval $[n,n+1)$ for $n\in\mathbb{Z}$, but since there are infinitely many of these, I can no longer be sure this converges in $L^{2}$.
Note Of course an answer to the question is very simple. Lest anyone get the wrong idea about that from the slightly hairy nature of this post, I point out that there are three parts below: a one-line answer to the question, then an easy generalization using a big theorem, and finally an elementary proof of the big theorem:
Answer to the Question
Say $Q_n$ is a partition of $[-n,n)$ into $2n^2$ intervals, each of length $1/n$. Now combine all those intervals into a single sequence, by first listing all the intervals in $Q_1$, then all the intervals in $Q_2$, etc.
A Generalization
In fact you can do the same thing on any $\sigma$-finite non-atomic measure space:
Proof: Someone's Theorem (proved below) says that if $\mu$ is non-atomic and $0<t<\mu(E)<\infty$ then there exists $F\subset E$ with $\mu(F)=t$. So we can find $E_1\subset X$ with $\mu(E_1)=1/n$, then $E_2\subset X\setminus E_1$ with $\mu(E_2)=1/n$, etc. (If there's a set of measure zero left over at the end then just add it to $E_1$.)
Proof: Wlog $\mu(X)=1$; use the lemma to imitate the standard construction for $[0,1]$.
Proof: we get from finite to $\sigma$-finite using the same method as we use at the start to get from $[a,b]$ to $\Bbb R$.
And pleasantly
The Big Theorem
Thinking about it, yesterday Someone's Theorem didn't seem quite as easy as I thought. Thanks to @Gabriel Romon for pointing out the proof here. The proof I gave yesterday involved transfinite recursion; the proofs at that link seem to use transfinite recursion or Zorn's lemma. Today we have a more elementary argument, involving neither:
Assume until further notice that $\mu$ is a non-atomic probability measure on $X$.
Proof: Since $\mu$ is non-atomic there exists $S\subset E$ with $0<\mu(S)<\mu(E)$. Now either $F=S$ or $F=E\setminus S$ works.
Proof: $\lim_{n\to\infty}2^{-n}\mu(E)=0$.
Proof. Suppose not: For every $F\subset E$ either $\mu(F)<\frac13\mu(E)$ or $\mu(F)>\frac23\mu(E)$. Let $$S=\{F\subset E:\mu(F)< \mu(E)/3\}$$ and $$s=\sup\{\mu(F):F\in S\}.$$
The key observation is that if $F_1,F_2\in S$ then $F_1\cup F_2\in S$; this is clear, since $\mu(F_1\cup F_2)<\frac23\mu(E)$, hence $\mu(F_1\cup F_2)<\frac13\mu(E)$.
Now there exist $A_n\in S$ with $\mu(A_n)\to s$. If $F_n=\bigcup_{k=1}^n A_k$ then $(F_n)\subset S$, $F_n\subset F_{n+1}$ and also $\mu(F_n)\ge\mu(A_n)$, so $\mu(F_n)\to s$. So if $F=\bigcup F_n$ then $$\mu(F)=s.\quad\text{(got it!)}$$
So we're done if we can show $s=\frac13\mu(E)$. Suppose otoh $\epsilon=\frac13\mu(E)-s>0$. Now there exists $A\subset E\setminus F$ with $0<\mu(A)<\epsilon$; hence $F\cup A\in S$ and $\mu(F\cup A)>s$, contradiction.
Proof: Take $A\subset E_2\setminus E_1$ with $\frac13\mu(E_2\setminus E_1)\le\mu(A)\le\frac23\mu(E_2\setminus E_1))$; let $E_3=E_1\cup A$ and do the math.
(In fact, although we won't use this below, if we define $d(E,F)=\mu(E\Delta F)$ then for any two sets $E_1$ and $E_2$ there exists $E_3$ such that $d(E_1,E_3)\le\frac23 d(E_1,E_2)$ and $d(E_3,E_2)\le\frac23 d(E_1,E_2)$: Take $A\subset E_1\Delta E_2$ such that [etc] and let $E_3=(E_1\cap E_2)\cup A$.)
Proof. Starting with $\emptyset\subset E$ and applying the Main Corollary repeatedly we obtain $\emptyset=E_0\subset\dots\subset E_n=E$ such that $\mu(E_{j+1})-\mu(E_j)<\epsilon$ for every $j$.
Proof. We will construct a sequence of disjoint sets $E_n\subset E$ with $\sum\mu(E_n)=t$. Note that throughout the construction $F_n$ will denote the set $$F_n=\bigcup_{k=0}^n E_k.$$
Let $E_0=\emptyset$. Suppose $E_0,\dots,E_n$ have been chosen, such that $$\mu(F_n)<t.$$ Now $$0<t-\mu(F_n)<\mu(E)-\mu(F_n)=\mu(E\setminus F_n),$$so the $\frac12$theorem (with $E\setminus F_n$ in place of $E$) shows that there exists $E_{n+1}\subset E\setminus F_n$ with $$t-\mu(F_n)-\frac1n<\mu(E_{n+1})<t-\mu(F_n).$$Adding $\mu(F_n)$ to all three sides we obtain $t-\frac1n<\mu(F_{n+1})<t$. So if $F=\bigcup F_n$ then $\mu(F)=t$.
A Better Version
So that's the proof for a finite non-atomic measure. The result for an infinite non-atomic measure follows from this:
Proof. This is exactly like the proof of the Main Lemma above. Suppose the sup is $\alpha<\infty$. Since the union of two sets of finite measure has finite measure it follows as before that there exist $E_n$ with $\mu(E_n)<\infty$, $E_n\subset E_{n+1}$ and $\mu(E_n)\to\alpha$; hence there exists $E$ with $\mu(E)=\alpha$. Now since $\mu$ is non-atomic there exists $A\subset X\setminus E$ with $0<\mu(A)<\infty$, and hence $\alpha<\mu(E\cup A)<\infty$, contradiction.