$\textbf{Theorem:}$ The orthonormal family $\{e_n(x):\, n\in\mathbb{N}\}$, where $e_n(x)=e^{2\pi inx}$, is a basis for $\mathcal{L}^2([0,1])$.
In this case, $\{e_n(x):\, n\in\mathbb{N}\}$ being a basis would mean that any $f\in\mathcal{L}^2([0,1])$ can be written in the form
$$f=\sum^\infty_{k=0} \hat{f}(k)e_k(x)$$
where $$\hat{f}(k)=\langle f,e_k\rangle =\int_{[0,1]} f(x)\overline{e_k(x)} \ \text{d}x$$
I am attempting to get a solution in which we can say
$$\left\vert\left\vert f-\sum^k_{k=0}\hat{f}(k)e_k(x)\right\vert\right\vert\rightarrow 0 \ \ \text{as} \ \ n\rightarrow \infty$$
via Parsevals and Plancheral Identities, but I have been unable to do so.
Any hints please?