Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Showing fourier series of sin^2(x)=(1/2)-(cos(2x)/2)

  1. Sep 5, 2010 #1
    1. The problem statement, all variables and given/known data

    f(x)=sin^2(x)

    2. Relevant equations



    3. The attempt at a solution

    solving for a(0)= i did (1/2Pi)*int(sin^2(x),x,-Pi..Pi)=1/2
    b(n)=0 because sin^2(x) is an even function
    a(n)=(1/Pi)*int(sin^2(x)cos(n*x),x,-Pi..Pi)=1/2Pi((sin(xn)/n)-(.5sin((2-n)x)/(2-n))-(.5sin((2+n)x)/(2+n))) this whole thing evaluated from -Pi..Pi

    I keep getting zero although I know this is not the answer, so maybe I am messing up somewhere. Help is greatly appreciated.
     
  2. jcsd
  3. Sep 5, 2010 #2

    vela

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    Make sure you're not dividing by zero.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook