Fourier Series: ONB Given the Hilbert space $L^2([-\pi,\pi])$.
Consider the orthonormal system:
$$\mathcal{S}:=\{\frac{1}{\sqrt{2\pi}}e^{ikx}:k\in\mathbb{Z}\}$$
This is an ONB. How do I prove this?
I guess, I could try to check that:
$$f\in\mathcal{L}^2([-\pi,\pi]):\quad\int_{[-\pi,\pi]}f(x)e^{-ikx}dx=0\implies f=0\quad\lambda\text{-a.e.}$$
 A: If you know about compact selfadjoint operators, then you can study the operator
$$
                             Lf = \frac{1}{i}\frac{d}{dt}
$$
on the domain $\mathcal{D}(L)$ consisting of all absolutely continuous functions $f$ on $[0,2\pi]$ with $f(0)=f(2\pi)$ and $f' \in L^{2}[0,2\pi]$. $L$ is not compact, but its resolvent operator $(\lambda I-L)^{-1}$ is compact for $\lambda \notin\mathbb{Z}$. The resolvent is easily found by solving a first order ODE and choosing the one constant so that the resulting solution is periodic. Then $(\frac{1}{2}I-L)^{-1}$ is compact and selfadjoint, and you know its eigenvectors, which are the exponentials $e^{int}$.
This is a great way to prove completeness because the development of the techniques for studying compact operator came out of studying resolvents of ODEs and PDEs using Arzela-Ascoli. The techniques are made to order for showing completeness of eigenfunction expansions associated with symmetric ODEs and PDEs. This technique works for all of the regular Sturm-Liouville problem on a finite interval $[a,b]$:
$$
                   Lf = -\frac{d}{dx}p(x)\frac{d}{dx}f+qf,\\
                      \cos\alpha f(a)+\sin\alpha f'(a) = 0,\\
                      \cos\beta f(b)+\sin\beta f'(b) = 0.
$$
Because such problems were the main driving force behind the development of Spectral Theory, it is good to see how such theories provide for very general types of orthogonal function expansions for all choices of conditions numbers $\alpha,\beta \in \mathbb{R}$.
A: Stone-Weierstrass, basically.
You can check that these functions form an algebra that separates points, contains constant functions, and is closed under complex conjugation. The interval is compact, thus this algebra is dense in $C([-\pi,\pi])$ in the supremum norm, thus in the $L^2$ norm. Further, the continuous functions are dense in $L^2$, so this forms a basis. 
It is a further theorem that a basis of a Hilbert space will satisfy the completeness property you have stated. 
For more reading, see Folland Real Analysis, Chapters 4, 5, and 8.
