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 sawtooth wave

  1. Jan 9, 2010 #1
    1. The problem statement, all variables and given/known data
    Express the function plotted in the figure below as a Fourier series.

    2. Relevant equations
    3. The attempt at a solution
    I have the fully worked out solution infront of me and im ok with working out the a0, an and bn parts but what i want to know is why is the function [tex]\frac{A}{\pi}\left|x\right|[/tex] ?

    does the [tex]\frac{A}{\pi}[/tex] part refer to the function between 0 and [tex]\pi[/tex]?

    If so what about the function between [tex]\pi [/tex]and[tex] 2\pi[/tex]? do i just leave that out? and why is it only integrated below between 0 and pi?

    here is the solution:

    [tex]f(x)=\frac{A}{\pi}\left|x\right|[/tex] the function is even therefore [tex]{b_n} =0[/tex]



    ...well you get the idea its taking me too long to type out the entire solution so i will leave it at that.

    Can someone also please tell me why there is a [tex]\frac{2A}{\pi^2}[/tex] term on the a0 and an terms and why this is not just [tex]\frac{A}{\pi}[/tex]?

    In other words where does the extra [tex]\frac{2}{\pi}[/tex] come from? and how will i know when to put it in?


    Attached Files:

  2. jcsd
  3. Jan 9, 2010 #2


    User Avatar
    Science Advisor
    Homework Helper

    It looks like the definition of the fourier integral they are using integrates from -pi to pi. Yes, A|x|/pi is the function on [0,pi]. Since your function is symmetric on [-pi,pi] they just integrated from 0 to pi and doubled it. That's where the 2 comes from. The A/pi comes from f(x). The other pi is in the definition of the fourier integral. Hence 2A/pi^2.
  4. Jan 10, 2010 #3
    Ah i see - because the A/pi is just a constant it can come out of the integral, but why is it doubled? why is it not just integrated from 0 - 2pi is there a reason for not integrating between these limits?
  5. Jan 10, 2010 #4


    User Avatar
    Science Advisor

    You have to "normalize" the integral. Obviously, the Fourier series for sin(nx), on the interval from [a, b], should be just "[itex]sin(2\pi nx/(b-a))[/itex]" (which has period [itex]2\pi[/itex])- in other words, the coefficient for sin(2\pi nx/(b-a)) is 1 and for all other sin(2\p kx/(b-a)) and cos(2\pi kx/(b-a), 0. It's easy to see that the product of two different sine and cosine will integrate to 0 but
    [tex]\int_a^b sin^2(2\pi nx/(b-a) dx= \frac{1}{2}\int_a^b (1- cos(4\pi nx/(b-a))dx[/itex]
    by using the trig identity [itex]sin^2(\theta)= (1/2)(1- cos(2\theta)[/itex]. the integral of "[itex]cos(4\pi nx/(b-a))[/itex]" will be 0 at both ends but
    [tex]\int_a^b \frac{1}{2}dx= \frac{b- a}{2}[/itex]

    In order to get "1" we must divide the integral by that. That's where we get the "2".
  6. Jan 10, 2010 #5
    no, im lost again, why does the integral have to be normalized? and i thought normalizing it was taking the integral of the function squared between + and - infinity not a and b.

    And whats this about coefficients? I haven't read anything about that in my lecture notes.
  7. Jan 10, 2010 #6


    User Avatar
    Science Advisor
    Homework Helper

    Look up the definition of the a_n and b_n's in your problem. In a Fourier series problem you don't integrate between -infinity and +infinity. You integrate over an integral that the given function is periodic over.
  8. Jan 10, 2010 #7
    Ok i realise that, but why does it have to be normalized? when ive done fourier series' of other square waves ive never normalized it before and got the right answer
  9. Jan 10, 2010 #8


    User Avatar
    Science Advisor
    Homework Helper

    You don't have to normalize anything. That should be already built into the definition of the a_n and b_n's. What are they?
  10. Jan 10, 2010 #9
    Ok i totally get that now, it was the normalization thing that threw me for a second, Doubling the integral only works for even functions yes?
  11. Jan 10, 2010 #10


    User Avatar
    Science Advisor
    Homework Helper

    Sure. It works because you can say 'the negative part equals the positive part'. You can certainly say that about even functions. And probably not many others.
  12. Jan 10, 2010 #11
    ok great thanks
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook