Using the inner product on $C[-\pi,\pi]$ given by $$ \langle f,g\rangle = \int_0^1 f(t)g(t)dt $$ Find the projection of $h(x) = x$ onto the span of $$\{1, \sin x, \cos x, \sin(2x), \cos(2x),\ldots,\sin(kx), \cos(kx)\}$$
I know this type of projection is called the Fourier approximation to $h$, and that the functions in the span are orthogonal.
The definition of inner product is wrongly stated. The integral is from $-\pi$ to $\pi$ instead of $0$ to $1$. The given functions form an orthonormal set for this inner product. Hence the projection is $\sum\limits_{i=0}^{k} \langle h, \cos(ix) \rangle \cos(ix)+\sum\limits_{i=1}^{k} \langle h, \sin(ix) \rangle \sin(ix)$. You can integrate by parts to calculate the inner products in this sum.