I am having a problem from an old exam saying the following
a) Prove that $ \langle f,g\rangle = \frac{2}{\pi} \int f(t)g(t)\,\mathrm{d}t $ gives a inner product on $C[0,\pi]$
b) Find real constants $a,b$ to minimize integral $ \int_0^\pi \left( 1 - a \sin(t) - b \sin(3t) \right)^2 \, \mathrm{d}t $ Hint: The functions $\sin(t),\sin(3)t$ form a ortonormal set
I have been able to prove a), but I am usnure what to do about b). I know I have to use some properites of the inner product, to minimize the integral but I am unsure how to proceed.
I know the basic calculus, and some basic linear algebra, but I am terrible at combining them.