Suppose I have periodic function, and I want to calculate the Fourier series of this function in the section [T,T]. I need to find set of functions for this calculation which will be complete and orthonormal basis.
My set is - $$\left\{1,~\cos\left({\frac{nx\pi}{\text T}}\right),~\sin\left({\frac{nx\pi}{\text T}}\right)\right\} $$
I was able to prove it is orthonormal basis easily. But I was stuck trying to prove it a complete group. I was trying to use Parseval's identity but couldn't develop it much further.
Note that linear combinations of $A=\left\{1,\cos\left(\frac{n\pi x}{T}\right),\sin\left(\frac{n\pi x}{T}\right) \right\}$ are dense in $C[-T,T]$ by the Stone-Weiestrass approximation theorem. Now, let's add an $L^2[-T,T]$ function to $A$ and show that it has to vanish, thereby showing that $A$ is complete.
Let $f \in L^2$. Since $L^2$ completes $(C[-T,T],||\cdot||_2)$, there exists a $g \in C[-T,T]$ such that $||f-g||_2<\frac{\varepsilon}{2}$. By the first comment, there is a trigonometric polynomial $h \in C[-T,T]$ such that $||g-h||_\infty < \frac{\varepsilon}{2}$ and there is a constant $C>0$ such that $||g-h||_2 \leq C||g-h||_\infty$. It follows that $$||f-h||_2 \leq ||f-g||_2 + ||g-h||_2 < \varepsilon.$$ So any $f \in L^2$ can be approximated by trigonometric polynomials in $||\cdot||_2$.
Now, take a sequence of trigonometric polynomials $h_n \to f$. Then, by taking the limit as $n \to \infty$, $$\langle f,h_n\rangle=0 \implies \langle f,f\rangle = 0 \implies f = 0.$$