I've encountered the following exercise:
In the space $C[0,2\pi]$ with internal product $\langle f,g\rangle = \int_0^{2\pi} fg$, determine the trigonometric polynomial of $a+b\cos(x) + c\sin(x)$ which better aproximates the function $f(x) = x$.
I know this could be solved by calculating the orthonormal projection of the trigonometric polynomial over $f(x)$, but I don't know how that'd be calculated, as I can't see any basis (let alone any orthonormal basis for $f(x) = x$).
HINT
You are suggested to pick the approximating function which is in the span of the basis $\mathcal{B} = \{1, \sin x, \cos x\}$ already.
In a different view of your question, you are asked to provide the projection of $f(x)=x$ onto the vector space $span(\mathcal{B})$.