I am trying to find the projection of a function onto a space spanned by

{1, sinx, cosx} on the interval This is equal to the first 3 terms of the fourier expansion of f(x)

The function is

I found the first term of the fourier expansion to be:

a0 =

Im not to sure on calculating the 2nd term...

can i use a1 = ?

or should i use a1 = ? because sinx is the 2nd term of the span..

Im fine with the integration itself, its just the formula...

sorry if question is badly constructed, am still in early days of using laTex