Proving that the Fourier Basis is complete for C(R/$2*\pi$ , C) with $L^2$ norm Let $H$ be the inner product space = $\{f: \mathbb{R} \to \mathbb{C} \mid f \text{ is continuous and has period }2 \pi\}$ where the inner product is:
$$\langle f,g \rangle = \int_{0}^{2\pi}f(t)\overline{g(t)} dt $$ 
How do I prove that for $n \in \mathbb{Z}$ and $e_n(t)=\dfrac{1}{\sqrt{2\cdot\pi}} e^{i n  t}$, $(e_n)_{n \in N}$ is a basis of $H$ (that it is orthonormal is easy).
 A: This is probably not the most elegant way, but this method generalizes to showing the unitarity of the Fourier transform. The essential part of this proof is showing that the map $L^2(\mathbb{R}/2\pi \mathbb{Z}) \rightarrow \ell^2(\mathbb{Z})$ given by taking the Fourier coefficients from the discrete Fourier transform is an isometry, since the discrete Fourier transform is essentially the orthogonal projection onto the closure of the span of the functions $e^{inx}$. Then, by basic Hilbert space theory, it would follow that $\{e^{inx}\}$ is a maximal orthogonal set.
To start, let $\{a_n\} \subset \ell^2(\mathbb{Z})$ be the sequence of Fourier coefficients, a.k.a. $a_n = \langle f, e^{inx}/2\pi \rangle$. Then
\begin{align*}
\sum_{-n}^n |a_n|^2 & = \sum_{-n}^n \frac{1}{2 \pi} \int_0^{2\pi} \int_0^{2\pi} f(x) \overline{f(y)} e^{in(x-y)} \, dx \, dy \\
& = \frac{1}{2 \pi} \int_0^{2\pi} \int_0^{2\pi} f(x) \overline{f(y)} D_n(x-y) \, dx \, dy,
\end{align*}
where $D_n$ is the Dirichlet kernel given by $D_n(t) = \sum_{-n}^n e^{int}$. Now, we can prove several basic facts about this Dirichlet kernel:


*

*It integrates to $2\pi$.

*When $t \neq 0$, $D_n(t) \rightarrow 0$ as $n \rightarrow \infty$.


Therefore the Dirichlet kernel behaves as an approximate identity times $2\pi$, so $D_n(x-y)$ behaves like a Dirac mass about $x = y$. Substituting this in (one of course needs to use an appropriate theorem to justify integrating a limit), we have precisely that
$$ \sum_{-n}^n |a_n|^2 \rightarrow \|f\|_{L^2}^2, \quad n \rightarrow \infty$$
A: This argument is from Rudin's Real and Complex Analysis (section 4.24 Completeness of the Trigonometric System). It considers $C(-\pi,\pi)$ instead of $C(0,2\pi)$, but this makes no difference of course.
Suppose we had trigonometric polynomials $Q_k \geq 0$ such that


*

*$$\frac{1}{2\pi}\int_{-\pi}^{\pi} \! Q_k(t) \, dt = 1$$

*$Q_k \to 0$ uniformly on $[-\pi, -\delta] \cup [\delta, \pi]$ for every $\delta >0$


(i.e. the $Q_k$ are a summation kernel). Associate to each continuous $f$ the function
$$P_k(t) = f \ast Q_k(t) = \frac{1}{2\pi}\int_{-\pi}^\pi \! f(t-s)Q_k(s) \, ds.$$
Substitution shows that also
$$P_k(t) = \frac{1}{2\pi}\int_{-\pi}^\pi \! f(s)Q_k(t-s) \, ds$$
so that each $P_k$ is a trigonometric polynomial. Now let $\epsilon > 0$. Since $f$ is uniformly continuous, there exists $\delta > 0$ such that $|f(t) - f(s)| < \epsilon$ whenever $|t-s| < \delta$. Since each $Q_k$ has average equal to one, we see that
$$P_k(t) - f(t) = \frac{1}{2\pi}\int_{-\pi}^\pi \! (f(t-s) - f(s)) Q_k(s) \, ds$$ and the positivity of $Q_k$ implies
$$|P_k(t) - f(t)| \le \frac{1}{2\pi}\int_{-\pi}^\pi \! |f(t-s) - f(s)|Q_k(s) \, ds$$
$$= \frac{1}{2\pi}\int_{|s| \le \delta} \! |f(t-s) - f(s)|Q_k(s) \, ds + \frac{1}{2\pi}\int_{|s|\geq \delta} \! |f(t-s) - f(s)|Q_k(s) \, ds$$
In the first term, the uniform continuity of $f$ shows that the integrand is smaller than $\epsilon Q_k(s)$ and the assumption on the average of $Q_k$ makes this term small. For the second the integrand converges uniformly to $0$ as $k \to \infty$ (since $f$ is bounded). Since the estimates are independent of $t$ we have shown that
$$\|P_k - f\|_\infty < \epsilon$$
for $k$ large enough and thus the trigonometric polynomials are dense. We need to now construct the $Q_k$ with the desired properties. To do this we let 
$$Q_k(t) = c_k \left(\frac{1 + \cos t}{2}\right)^k$$
where the $c_k$ is chosen in such a way as to satisfy the assumption on the averages. Since the $Q_k$ are clearly positive, we only need to show that $Q_k \to 0$ uniformly away from $0$. But $Q_k$ is even (on $(-\pi,\pi)$) and decreasing on $[0,\pi]$. Thus for any $\delta > 0$ we have
$$|Q_k(t)| \le Q_k(\delta) \le \frac{\pi(k+1)}{2}\left(\frac{1 + \cos \delta}{2} \right)^k \to 0$$
independently of $t$ as $k \to \infty$ since 
$$\frac{1 + \cos \delta}{2} < 1.$$
