Showing that $\{\sin(nx)\}_{n=1}^\infty$ is a complete orthogonal system in $C([0,2\pi])$ and $L_2[0,\pi]$. Showing that $\{\sin(nx)\}_{n=1}^\infty$ is a complete orthogonal system in $C([0,2\pi])$ and $L_2[0,\pi]$. 
So set the inner product for $C([0,2\pi])$ to be $\langle u,v\rangle = \int_0^{2\pi} u(t)v(t) dt$
Now $\langle \sin(nt),\sin(mt)\rangle=\int_0^{2\pi} \sin(nt)\sin(mt)dt$
When $n=m$ we have $\int_0^{2\pi} \sin^2(nt)\, dt = \int_0^{2\pi} \frac12 - \frac{\cos(2t)}{2} dt= \pi + [-\sin(2t)]_0^{2\pi} =\pi$
When $n\ne m$ we get $\int_0^{2\pi} \sin(nt)\sin(mt)dt$
Not sure what to do here, don't know how to evaluate this. How to evalute?

For $L_2[0,\pi]$, I am not sure what inner product to set.
 What to set?
 A: $\{ e^{inx} \}_{n=-\infty}^{\infty}$ is a complete orthonormal basis of $L^2[-\pi,\pi]$ with respect to the inner product
$$
                 (f,g) = \frac{1}{2\pi}\int_{-\pi}^{\pi}f(t)\overline{g(t)}dt.
$$
If $f \in L^2[0,\pi]$, then $f$ may uniquely extended to an odd function $\tilde{f}$ on $[-\pi,\pi]$, which means the following converges in $L^2[-\pi,\pi]$ and, hence, also in $L^2[0,\pi]$:
$$
             \tilde{f} = \sum_{n=0}^{\infty}(\tilde{f},e^{int})e^{inx}.
$$
Because $\tilde{f}$ is odd, then $(\tilde{f},e^{int})=0$ for $n=0$, and
\begin{align}
        (\tilde{f},e^{int})
   & = \frac{1}{2\pi}\left[\int_{-\pi}^{0}(-f(-t))e^{-int}dx +\int_{0}^{\pi}f(t)e^{-int}dt\right] \\
   & = \frac{1}{2\pi}\int_{0}^{\pi}f(t)\{e^{-int}-e^{int}\}dt \\
   & = -\frac{i}{\pi}\int_{0}^{\pi}f(t)\sin(nt)dt.
\end{align}
Therefore $(\tilde{f},e^{int})=-(\tilde{f},e^{-int})$ and
\begin{align}
         \tilde{f} & = \sum_{n=1}^{\infty}\{(f,e^{int})e^{int}+(f,e^{-int})e^{-int}\} \\
      & = \sum_{n=1}^{\infty}(f,e^{int})\{e^{int}-e^{-int}\} \\
      & = \sum_{n=1}^{\infty}\left(-\frac{i}{\pi}\int_{0}^{\pi}f(t)\sin(nt)dt\right)2i\sin(nx) \\
      & = \sum_{n=1}^{\infty}\left(\frac{2}{\pi}\int_{0}^{\pi}f(t)\sin(nt)dt\right)\sin(nx)
\end{align}
The orthogonality of the $\sin(nx)$ functions in $L^2[0,\pi]$ follows easily from
$$
       \int_{0}^{\pi}\sin(nx)\sin(mx)dx = \int_{-\pi}^{\pi}\sin(nx)\sin(mx)dx \\
   = -\frac{1}{4}\int_{-\pi}^{\pi}\{e^{inx}-e^{-inx}\}\{e^{imx}-e^{-imx}\}dx.
$$
