1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fourier Series of sin^2(x)

  1. Oct 2, 2011 #1
    1. The problem statement, all variables and given/known data
    Find the fourier series of f(x) = sin^2(x)


    2. Relevant equations
    bn = because f(x) is even
    ao = (1/(2*∏))*∫(f(x)) (from 0 to 2*∏)
    an = (1/(∏))*∫(f(x)*cos(x)) (from 0 to 2*∏)

    3. The attempt at a solution
    ao = (1/(2*∏))*∫(f(x)) (from 0 to 2*∏) = ao = 1/2
    an = (1/(∏))*∫(f(x)*cos(x)) (from 0 to 2*∏) = sin^3(x) from 0 to 2∏ and I keep resulting in zero

    the answer is to the fourier series I know is 1/2 - (cos(2x))/2 how to get the cos(2x)/2 part. Is there a trig identity I am missing?
     
  2. jcsd
  3. Oct 2, 2011 #2

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    cos(2x) = 1 - 2 sin2(x)
     
  4. Oct 2, 2011 #3
    so in this case would you just plug cos(2x) into an to get it to be:

    an = (1/(∏))*∫(sin^2(x)*(1-2*sin^2(x/2))dx
     
  5. Oct 2, 2011 #4

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Your integral is wrong. You should have
    [tex]a_n = \frac{1}{\pi}\int_0^{2\pi} \sin^2 x \cos nx\,dx[/tex]
    The answer will depend on n, and you can't use the substitution u=sin x, like you seem to be doing, because the n is in the cosine.
     
  6. Oct 2, 2011 #5
    when I intergrate I get 1/4[itex]\pi[/itex]*(cos(nx)*sin(2x)-2*x*cos(nx)) evaluated over 0 to 2[itex]\pi[/itex] which is still zero
     
  7. Oct 2, 2011 #6

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    How'd you get that?
     
  8. Oct 2, 2011 #7
    an online integral calculator (numberempire.com) but i forgot the negative sign out front
     
  9. Oct 2, 2011 #8

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Well, it's not correct, but I also don't see how you got it equal to 0 when evaluated at 0 and 2pi.

    You actually don't have to do a single integral for this problem, but it's probably worth evaluating the integrals to get the practice and to see that you do indeed get the correct answer. Try solving the identity SammyS noted for sin2 x and using that in your integral. You'll also need to use the identity[tex]\cos a\cos b = \frac{\cos(a+b)+\cos(a-b)}{2}[/tex]Take care that you don't divide by 0 as well.
     
  10. Oct 2, 2011 #9
    after going back and doing it the correct way (substitution) I get something of:
    [itex]_{}a_n[/itex]=[itex]\frac{}{}2/\pi[/itex]*([itex]\frac{}{}1/n[/itex]*sin^2(x)*sin(nx)+[itex]\frac{}{}1/n^2[/itex]sin(2x)*cos(nx)+[itex]\frac{}{}2/n^2[/itex][itex]\int cos(2x)*cos(nx)[/itex]dx

    Using SammyS cos(2x)= 1 - 2sin^2(x) you can see that you get the original function of [itex]_{}a_n[/itex]

    so I get
    ([itex]\frac{}{}2/\pi[/itex]+[itex]\frac{}{}8/(\pi*n^2)[/itex][itex]\int sin^2(x)*cos(nx)[/itex]= [itex]\frac{}{}4/(\pi*n^2)[/itex][itex]\int cos(nx)[/itex]

    but when you evaluate the integral on the RHS wouldnt you get sin(nx) which evaluated from 0 to [itex]\pi[/itex] would be 0?
     
  11. Oct 2, 2011 #10

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    When all you show is your result, all I can say is you're not doing something correctly. You seem to be making this a lot harder than it has to be, though.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Fourier Series of sin^2(x)
  1. Fourier (sin(2x)*x^2) (Replies: 9)

Loading...