Suppose n is a positive integer. Prove that
2π1,πcosx,πcos2x,…,πcosnx,πsinx,πsin2x,…,πsinnx
is an orthonormal list of vectors in C[−π,π], the vector space of continuous real-valued functions on [−π,π] with inner product
⟨f,g⟩=∫−ππfg.
Hint: The following formulas should help.
(sinx)(cosy)=2sin(x−y)+sin(x+y)(sinx)(siny)=2cos(x−y)−cos(x+y)(cosx)(cosy)=2cos(x−y)+cos(x+y)