Find a Unitary transformation from $(\phi_n(x)=\frac{1}{\sqrt{a}}e^{i\frac{2\pi nx}{a}})_{n=0, \pm 1,...}$ to trigonometric basis in $L^2([0,a])$ I want to prove that the trigonometric functions form a complete orthonormal system for the space of square-integrable functions on the interval $[0,a]$, a.k.a. that $$ \psi_0 =\frac{1}{\sqrt{a}},\psi_n^+ = (\frac{2}{a})^{\frac{1}{2}} \cos(\frac{2 \pi nx}{a}) ,\psi_n^- = (\frac{2}{a})^{\frac{1}{2}} \sin(\frac{2 \pi nx}{a}), n = 1, 2, ...$$ is orthonormal and complete in $L^2([0,a])$.
I know that the system of complex exponentials  $(\phi_n(x)=\frac{1}{\sqrt{a}}e^{i\frac{2\pi nx}{a}})_{n=0, \pm 1, \pm2,...}$ forms a complete orthonormal system for the space of square-integrable functions on the interval $[0,a]$
See the question:
Prove that complex exponentials $(\phi_n(x)=\frac{1}{\sqrt{a}}e^{i\frac{2\pi nx}{a}})_{n=0, \pm 1, \pm2,...}$ are complete and orthonormal on $[0,a]$
Now I want to find a Unitary transformation from $(\phi_n(x)=\frac{1}{\sqrt{a}}e^{i\frac{2\pi nx}{a}})_{n=0, \pm 1, \pm2,...}$ to $ \psi_0 =\frac{1}{\sqrt{a}},\psi_n^+ = (\frac{2}{a})^{\frac{1}{2}} \cos(\frac{2 \pi nx}{a}) ,\psi_n^- = (\frac{2}{a})^{\frac{1}{2}} \sin(\frac{2 \pi nx}{a}), n = 1, 2, ...$, thus proving the trigonometric functions orthonormal and complete. 
So to get from the exponentials to the trigonometrics I feel like I should use euler's formula in reverse, like so: $U:\frac{1}{\sqrt{a}}e^{i\frac{2\pi nx}{a}} \mapsto \frac{1}{\sqrt{2}} \cdot (\frac{1}{\sqrt{a}}e^{i\frac{2\pi nx}{a}} + \frac{1}{\sqrt{a}}e^{-i\frac{2\pi nx}{a}}) = (\frac{2}{a})^{\frac{1}{2}} \cos(\frac{2 \pi nx}{a})  $ for  $n$ positive and $U:\frac{1}{\sqrt{a}}e^{i\frac{2\pi nx}{a}} \mapsto \frac{1}{\sqrt{2}} \cdot (\frac{1}{\sqrt{a}}e^{i\frac{2\pi nx}{a}} - \frac{1}{\sqrt{a}}e^{-i\frac{2\pi nx}{a}}) = (\frac{2}{a})^{\frac{1}{2}} \sin(\frac{2 \pi nx}{a})  $ for $n$ negative. Or is there a better way? But more importantly is this mapping unitary? If so, how do I show that, and if not, what would be a unitary transformation between exponentials and trigonometrics?
 A: What you need to do can be done easier without the heavy notation. You have an orthonormal basis $\{e_n\}_{n\in\mathbb Z}$, and a set $F=\{f_n\}_{n\in\mathbb N}\cup\{g_n\}_{n\in\mathbb 
N}$, with $\|f_n\|=\|g_n\|=1$,  such that 
$$\tag1
f_0=e_0,\ \ \ \frac{e_n+e_{-n}}{\sqrt2}=f_n,\ \ \frac{e_n-e_{-n}}{i\sqrt2}= g_n.
$$
Or, we may rewrite $(1)$ as 
$$\tag2
e_0=f_0,\ \ \ e_n=\frac{f_n+ig_n}{\sqrt2},\ \ \ \ e_{-n}=\frac{f_n-ig_n}{i\sqrt2}, \ \ \ n\in\mathbb N.
$$
One can check directly from $(1)$ that $F$ is an orthonormal basis. If you want to write your unitary $U$, let
$$
U\,\sum_{n\in\mathbb Z} \alpha_n e_n
=\alpha_0f_0+\sum_{n\in\mathbb N}\frac{\alpha_n-i\alpha_{-n}}{\sqrt2}\,f_n+\sum_{n\in\mathbb N}\frac{i\alpha_n+\alpha_{-n}}{\sqrt2}\,g_n.
$$
Since $F$ is orthonormal, 
\begin{align}
\|U\sum_{n\in\mathbb Z} \alpha_n e_n\|^2&=|\alpha_0|^2+\sum_n|\frac{|\alpha_n-i\alpha_{-n}|^2}2+\sum_n|\frac{|i\alpha_n+\alpha_{-n}|^2}2\\ \ \\
&=|\alpha_0|^2+\frac12\,\sum_n{|\alpha_n|^2+|\alpha_{-n}|^2}-2\operatorname{Re}i\overline{\alpha_n}\alpha_{-n}++\frac12\,\sum_n{|\alpha_n|^2+|\alpha_{-n}|^2}+2\operatorname{Re}i\overline{\alpha_n}\alpha_{-n}\\ \ \\
&=\sum_{n\in\mathbb Z}|\alpha_n|^2
=\|\sum_{n\in\mathbb Z} \alpha_n e_n\|^2.
\end{align}
So $U$ is an isometry. It remains to show that $U$ is onto, which again is done via $(2)$. 
