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!

Homework Help: Fourier Series of an Odd Piecewise function

  1. Apr 28, 2012 #1
    1. The problem statement, all variables and given/known data
    Fourier Series of the following function f(x).

    f(x) is -1 for -.5<x<0
    f(x) is 1 for 0<x<.5

    2. Relevant equations
    b[itex]_{n}[/itex] = [itex]\frac{1}{L}[/itex][itex]\int[/itex][itex]^{L}_{-L}[/itex]f(x)sin(nπx/L)dx
    Where L is half the period.

    3. The attempt at a solution
    Graphing the solution, I know that it is odd, which is why I didn't include the given function for the "even" cos(nπ) portion of the Fourier series.
    Since the period is 1, L would be .5. So the function would look like this:

    2[itex]\int[/itex][itex]^{0}_{-.5}[/itex](–sin(2nπx)dx) + 2[itex]\int[/itex][itex]^{.5}_{0}[/itex](sin(2nπx)dx)

    To cut some work short, I get to:
    [itex]\frac{1}{πn}[/itex] - [itex]\frac{cos(nπ}{πn}[/itex] - [itex]\frac{cos(nπ}{πn}[/itex] + [itex]\frac{1}{πn}[/itex]

    Which becomes:

    I check my solution on Mathematica using these commands:
    a = If[-.5 < x < 0, -1, If[0 < x < .5, 1]]
    FourierTrigSeries[a, x, 5]

    And see that there are terms for values where my b[itex]_{n}[/itex] should be zero.

    EDIT: I was looking at another attempt I had made to this problem, so I corrected for that.
    Last edited: Apr 28, 2012
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted