Showing that a set is complete in $L^2[0, \, \pi/2]$ I'm trying to show that the set $S = \{ \sin((2n - 1)x)\}$ for $n = 1, 2, \dots $ forms a complete system for the Hilbert space $L^2[0, \, \pi/2]$. In other words I have to show that if $f \in L^2[0, \, \pi/2]$ satisfies $$\langle f , \, \sin((2n - 1)x) \rangle = \int_0^{\pi/2} f(x) \sin((2n - 1)x) = 0$$ for all $ n \in \mathbb{N}$, then $f = 0 $.
One idea I have heard is to use the fact that $\{e^{i n x}\}_{n \in \mathbb{Z}} $ is a complete system for $L^2[-\pi, \, \pi]$. I think the idea is to extend the function $f$ to the interval $[-\pi, \, \pi]$ somehow, and use the completeness of the set $\{e^{i n x}\}$.
I'm not entirely sure of the details however. So I guess my question is, how can we use the completeness of $\{e^{i n x}\}_{n \in \mathbb{Z}} $ on $[-\pi, \, \pi]$ to show completeness of $\{\sin((2n - 1)x)\}_{n \in \mathbb{N}}$ on $[0, \, \pi/2]$? Specifically why is it only the odd positive values of $n$ that are left over when going from $[-\pi, \, \pi]$ to $[0, \, \pi/2]$?
Also, out of curiosity, is there an "easy" way to do this question from scratch (i.e., without relying on the fact that $\{e^{i n  x}\}_{n \in \mathbb{Z}} $ is a complete system)?
 A: I think it's not so trivial to go from completeness of exponentials $e^{inx}$ on $[0,2\pi]$ to completeness of (renormalizing to compare) $\sin(nx/2)$ on $[0,2\pi]$. There are both eigenfunctions for $d^2/dx^2$, but with different boundary conditions: the sines vanish at the endpoints, while the exponentials have agreeing values and values of derivatives at the endpoints.
So a fairly straightforward approach is to determine all eigenfunctions for the second-derivative operator that meet those respective (symmetric!) boundary conditions.
A: Let us start with the fact that $1,\sin x,\cos x,\sin 2x,\cos 2x,\dots$ is an orthogonal base in $L^2[-\pi,\pi].$
It is easy to see that $L^2[-\pi,\pi]$ has an orthogonal sum decomposition $V_{odd}\oplus V_{even}$ and $\{\sin kx\mid k\in\mathbb N\},\ \{\cos kx\mid k\in\mathbb N\cup\{0\}\}$ are orhogonal bases in $V_{odd}$ and $V_{even}$ respectively.
Let $f\in L^2[0,\pi]$ be arbitrary and let $\widetilde f\in L^2[-\pi,\pi]$ be the odd function which continues $f.$ Then $\widetilde f=\sum_k c_k\sin kx$ in $L^2[-\pi,\pi].$ Since $\int_{0}^{\pi}|g|^2dx\leq \int_{-\pi}^{\pi}|g|^2dx$ for $g\in L^2[-\pi,\pi]$ we also have $f=\sum_k c_k\sin kx$ in $L^2[0,\pi].$ It shows that $\{\sin nx,\ n\in\mathbb N\}$ is an orthogonal base in $L^2[0,\pi].$ 
In the same way we have an orthogonal sum decomposition $L^2[0,\pi]=F_{odd}\oplus F_{even}$ where 
$$
F_{odd}=\{f\mid f(x)=-f(\pi-x)\},\ F_{even}=\{f\mid f(x)=f(\pi-x)\}.
$$
(Note that $F_{odd}\perp F_{even}$ and $f(x)=\frac{f(x)-f(\pi-x)}2+\frac{f(x)+f(\pi-x)}2$ for every $f\in L^2[0,\pi]$.) Further, we have $$\sin k(\pi-x)=(-1)^{k+1}\sin kx,\ k=1,2,\dots.$$ Hence $\{\sin kx\mid k\ \mbox{even}\},\ \{\sin kx\mid k\ \mbox{odd}\}$ are orhogonal bases in $F_{odd}$ and $F_{even}$ respectively. Since every function $g\in L^2[0,\pi/2]$ can be continued to a function $g_1\in F_{even},$ we have $$g=\sum_{k\ \mbox{odd}} c_k\sin kx,\ \mbox{in}\ L^2[0,\pi/2].$$
