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 problem solving for an,bn

  1. Jul 9, 2011 #1
    1. The problem statement, all variables and given/known data
    let f(x)={0;-2[itex]\leq[/itex]x[itex]\leq[/itex]0.
    x;0[itex]\leq[/itex]x[itex]\leq[/itex]2
    find a0
    an
    bn
    given the period is 4
    2. Relevant equations
    a0=1/L[itex]\int[/itex]f(x)dx
    an=1/L[itex]\int[/itex]f(x)cos(n[itex]\pi[/itex]x/L)
    bn=1/L[itex]\int[/itex]f(x)sin(n[itex]\pi[/itex]x/L)

    3. The attempt at a solution
    so I can get a0 = 1 but I run into trouble with an. so I plug
    an=1/2[itex]\int[/itex]xcos(n[itex]\pi[/itex]x/L) for the interval 0[itex]\leq[/itex]x[itex]\leq[/itex]2 and I get the solution
    =(1/n2[itex]\pi[/itex]2)2xn[itex]\pi[/itex]sin(n[itex]\pi[/itex]x/2)+4cos(n[itex]\pi[/itex]x/2) then subbing in for x I get (1/n2[itex]\pi[/itex]2)(4n[itex]\pi[/itex]sin(n[itex]\pi[/itex])+4cos(n[itex]\pi[/itex])-1) can anyone tell me what I am doing wrong here?
     
  2. jcsd
  3. Jul 9, 2011 #2

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Hi dp182!

    You made two mistakes: you forgot the term 1/L, so you still need to divide by 2. Secondly, when you "subbed for x", you made a mistake in "subbing for 0". That is, the correct formula is

    [tex]\int_0^2{f(x)dx}=F(2)-F(0)[/tex]

    But somehow, you calculated F(0) wrong.
     
  4. Jul 9, 2011 #3
    but wouldn't F(0) be 4cos(0)/n2pi2 which is just 4/n2pi2
     
  5. Jul 9, 2011 #4

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Indeed, but you wrote -1 instead of -4 in the end.
     
  6. Jul 10, 2011 #5
    ya but I brought out a 4/n2pi2 so its not -1 its -4/n2pi2
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Fourier series problem solving for an,bn
  1. Number series an bn (Replies: 1)

Loading...