I have to prove that the Fourier basis
$$ \{\frac{1}{\sqrt{2\pi}} \} \cup \{ \frac{1}{\sqrt{\pi}}\cos{nt} : n \in \mathbb{N} \} \cup \{ \frac{1}{\sqrt{\pi}}\sin{nt} : n \in \mathbb{N}\}$$
is a maximal orthonormal set in $L_2([-\pi, \pi],\mathbb{R})$.
I have already proved that it is orthonormal and that
$$ \{ e^{imt} : m \in \mathbb{Z} \}$$
is a maximal orthonormal set in $L_2([-\pi, \pi],\mathbb{C})$.
So now I know that can I express
$$\cos{nt}=\frac{1}{2} (e^{int} + e^{-int}) \quad \sin{nt}=\frac{i}{2} (e^{int} - e^{-int})$$
but I don't know how to continue.
I finally managed to prove it. I used the following theorem:
Let $\{u_n\}_{n=1}^\infty$ be an orthonormal set in a Hilbert space $H$. Then, the following are equivalent
So let $f\in L_2([-\pi,\pi]; \mathbb{R}) \subseteq L_2([-\pi,\pi]; \mathbb{C})$ such that
$$\langle f, \frac{1}{\sqrt{2\pi}}\rangle =\langle f,\frac{1}{\sqrt{\pi}} \cos{nt}\rangle=\langle f,\frac{1}{\sqrt{\pi}} \sin{nt}\rangle =0 \quad \forall n \in \mathbb{N}$$
Let $n \in \mathbb{N}$, $n \neq 0$, then
$$0=\langle f,\frac{1}{\sqrt{\pi}} \cos{nt} \rangle =\langle f, \frac{1}{2\sqrt{\pi}}e^{-int}+\frac{1}{2\sqrt{\pi}}e^{int}\rangle= \frac{1}{2\sqrt{\pi}} \langle f, e^{-int} \rangle + \frac{1}{2\sqrt{\pi}} \langle f, e^{int} \rangle$$
So $\langle f, e^{-int} \rangle = - \langle f, e^{int} \rangle$.
Moreover,
$$0=\langle f,\frac{1}{\sqrt{\pi}} \sin{nt} \rangle =\langle f, \frac{i}{2\sqrt{\pi}}e^{-int}-\frac{i}{2\sqrt{\pi}}e^{int}\rangle= -\frac{i}{2\sqrt{\pi}} \langle f, e^{-int} \rangle + \frac{i}{2\sqrt{\pi}} \langle f, e^{int} \rangle$$
So $\langle f, e^{int} \rangle = \langle f, e^{-int} \rangle = - \langle f, e^{int} \rangle \implies \langle f, e^{int} \rangle = \langle f, e^{-int} \rangle =0$
We also have $\langle f, e^{i0t} \rangle = \langle f, 1 \rangle = \sqrt{2\pi} \langle f, \frac{1}{\sqrt{2\pi}} \rangle =0$
Using the theorem, because $\{e^{imt}: m\in \mathbb{Z}\}$ is a maximal orthonormal set we have $f=0$. So the original orthonormal set is maximal.