# Thread: Fourier series - help needed with an integral.

1. ## Fourier series - help needed with an integral.

f(x) = {0 -π/2 < x < 0
{ sinx 0 <= x <= π/2

a0= 2/π [ ∫ 0 dx + ∫ sin x dx]
= 2/π [ -cosx ] from π/2 to 0
= 2/π

an = 2/π [ ∫ 0 dx + ∫ sinx cos(2nx)dx

i am having trouble continuing from here. how do i integrate this? thanks

2. Originally Posted by linalg123
f(x) = {0 -π/2 < x < 0
{ sinx 0 <= x <= π/2

a0= 2/π [ ∫ 0 dx + ∫ sin x dx]
= 2/π [ -cosx ] from π/2 to 0
= 2/π

an = 2/π [ ∫ 0 dx + ∫ sinx cos(2nx)dx

i am having trouble continuing from here. how do i integrate this? thanks
It follows from the compound angle formula that sin(A) cos(B) = 1/2 (sin(A+B) + sin(A - B)). Use it.

(You should have been taught this or seen it in your textbook).

3. ok so

2/pi [ ∫ sin(x+2nx)/2 + ∫ sin(x-2nx)/2 ]

1/pi [ -cos(2nx+x)/ (2n+1) + cos(x-2nx)/(2n-1) ] from 0 to pi/2

1/pi [ -cos(2npi + pi/2)/(2n+1) + cos(pi/2 - 2npi)/(2n-1) + cos(0)/2n+1 - cos(0)/2n-1]

1/pi [ 1/(2n+1) - 1(2n-1)]

an = -2/((4n^2 - 1)pi)

is this right?

4. Yes that is what I get

5. bn = 2/pi [ ∫sinx sin(2nx) dx]
=-1/pi [ ∫ cos(x+2nx) - cos(x-2nx) dx]
= -1/pi [ sin(x+2nx)/ (2n+1) - sin(2nx-x)/(2n-1)] from 0 to pi/2

= -1/pi [ sin(pi/2 + npi)/(2n+1) - sin(npi- pi/2)/ (2n-1) - 0]
= -1/pi [ (-1)^n / (2n+1) - (-1)^(n+1)/ (2n-1)]

bn = -1/pi [ [(-1)^n(2n-1) - (-1)^(n+1)(2n+1)]/4n^(2)-1]

is this correct?? if so can this be simplified further?

,
,

,

,

,

,

,

,

,

,

,

,

,

,

# integral of cos2nx

Click on a term to search for related topics.