Let $V=C[-\pi,\pi]$ and define $\displaystyle \langle f,g\rangle:=\frac{1}{\pi}\int_{-\pi}^\pi f(x)g(x)\,dx$.
Let $B:=\{1/\sqrt2,\cos(x),\dotsc,\cos(nx),\sin(x),\dotsc,\sin(nx)\}$.
- Show $B$ is a orthonormal set
- What is the dimension of $W=\operatorname{span}B$?
- For case $n=1$, find orthogonal projection of $f(x)=x$ in $W$ and compute $\min\{\|x-p(x)\|:p\in W\}$
For 1, I can do the following:
$\begin{align} \frac{1}{\pi}\int_{-\pi}^\pi\cos(nx)\sin(nx)\,dx &= \frac{1}{2\pi}\int_{-\pi}^\pi\sin(nx+nx)-\sin(nx-nx)\,dx \\ &= \frac{1}{2\pi}\int_{-\pi}^\pi\sin(2nx)-\sin(0)\,dx \\ &= \frac{1}{2\pi}\int_{-\pi}^\pi\sin(2nx)\,dx=0. \end{align}$
But I'm a bit confused as to what to do with that lingering $\frac{1}{\sqrt2}$.
For 2, wouldn't the dimension simply be three?
For 3, I think I could get the explicit form of the projection, but to get the '$\min$,' I'm not quite sure.