Want to show that $\{e^{i2\pi nx}:n\in\mathbb Z\}$ form an orthonormal basis for 1-periodic $L^2$ functions. So here is my problem,
I would like to prove that $\{e^{i2\pi nx}:n\in\mathbb Z\}$ form an orthonormal basis for 1- periodic $L^2([0,1])$ functions with respect to,
$$\langle f,g\rangle:=\int_{[0,1]}f(x)\overline{g(x)}dx$$
An easy computations shows that,
$$\langle e^{i2\pi nx},e^{i2\pi mx}\rangle=\delta_{n,m}$$
hence $\{e^{i2\pi nx}:n\in\mathbb Z\}$ is an orthormal system of vectors. So it is left to show that $\{e^{i2\pi nx}:n\in\mathbb Z\}$ is indeed maximal i.e a basis. 
For that I wanted to show that if for $f\in L^2[(0,1)]$ 1-periodic we have,
$$\langle f,e^{i2\pi nx}\rangle=0\;\forall n\in \mathbb Z$$
then it follows $f\equiv0$ and hence the system is maximal. But I am failing to show that...
Can someone help me? 
Thanks!
 A: There is a proof that uses Complex Analysis which is really quite elegant. It does depend on knowing that linear space of ordinary polynomials $\mathcal{P}$ is dense in $L^{2}[0,1]$, but you seem to know that fact. The proof is carried out by assuming that
$f \in L^{2}[0,1]$ satisfies
$$
   \int_{0}^{1}f(t)e^{-2\pi int}\,dt = 0,\;\;\; n=0,\pm 1,\pm 2,\cdots, \;\;\;\; (1)
$$
and showing that
$$
   \int_{0}^{1}f(t)t^{n}\,dt = 0,\;\;\; n =0,1,2,3,\cdots. \;\;\;\; (2)
$$
Then, because the polynomials are assumed to be dense in $L^{2}[0,1]$, it follows that $f=0$ a.e., from which one concludes that $\{ e^{2\pi in t}\}_{n=-\infty}^{\infty}$ is a complete orthonormal subset of $L^{2}[0,1]$.
So, assume $f \in L^{2}[0,1]$ satisfies (1) for all integers $n$. Define a function
$$
                  F(\lambda)=\frac{1}{e^{2\pi i\lambda}-1}\int_{0}^{1}e^{2\pi i\lambda t}f(t)\,dt.
$$
The function $F$ is holomorphic on $\mathbb{C}\setminus\mathbb{Z}$, with removable singularities at every $n \in \mathbb{Z}$. So $F$ extends to an entire function of $\lambda$. Furthermore, $F$ is uniformly bounded on all closed square contours $S_{n}$ formed by connecting $(n+1/2)(1+i)$, $(n+1/2)(-1+i)$, $(n+1/2)(-1-i)$, $(n+1/2)(1-i)$. And, for $\lambda \in \mathbb{C}$ with $|\lambda| < N$,
$$
                 F(\lambda)=\frac{1}{2\pi i}\oint_{S_{n}}\frac{F(z)}{z-\lambda}\,dz,\;\;\; n \ge N.
$$
It follows that $F$ is uniformly bounded on $\mathbb{C}$. So, by Liouville's Theorem, $F$ is a constant $C$, which is to say
$$
      \int_{0}^{1}e^{2\pi i\lambda t} f(t)\,dt = C(e^{2\pi i\lambda}-1),\;\;\; \lambda \in \mathbb{C}.
$$
The constant $C$ must be $0$ because the left side tends to $0$ as $\lambda$ tends to $\infty$ along the positive imaginary axis. So,
$$
                H(\lambda)=\int_{0}^{1}e^{2\pi i\lambda t}f(t)\,dt \equiv 0.
$$
All derivatives of $H$ are also $0$, and, hence,
$$
                              \int_{0}^{1}t^{n}f(t)\,dt =0,\;\;\; n=0,1,2,3,\cdots.
$$
Therefore $f=0$ because, by assumption, the linear subspace of polynomials $\mathcal{P}$ is dense in $L^{2}$. So, $\{ e^{2\pi int}\}_{n=-\infty}^{\infty}$ is a complete orthonormal subset of $L^{2}$.
A: The theorem is true for continuous functions (can you prove this?). Then use density to conclude.
