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: Semi Fourier series question (small)

  1. Nov 25, 2012 #1
    semi urgent Fourier series question (small)

    1. The problem statement, all variables and given/known data

    I have x(t) = 1/2 + cos(t) + cos(2t)

    so I can see that a0 = 1/2
    and that it is an even function so there is no bn
    Also that T = 2pi so
    an = 2/2pi ∫02pi x(t).cos(nω0t) dt

    but when I integrate this I get an = 0 yet I've been told that the answer is

    x(t) = 1/2 + Ʃn = 12 cos(nω0t)

    which would mean that an = 1, but I'm not sure how.
  2. jcsd
  3. Nov 25, 2012 #2


    User Avatar
    2017 Award

    Staff: Mentor

    Re: semi urgent Fourier series question (small)

    Your notation looks strange.

    You should not get 0 in the integral for n=1, n=2.
    x(t) = 1/2 + 1*cos(t) + 1*cos(2t) + 0*cos(3t) +... is expressed as fourier series already, you can simply read off the parameters.
  4. Nov 25, 2012 #3
    Re: semi urgent Fourier series question (small)

    It's not possible for the integral to be zero for cos2θ since cos2θ is always positive (it's a square of a number after all). The area underneath the function must be greater than zero. You've made a mistake in your math.

    But as mentioned, x(t) is already expressed as a fourier series -- a sum of harmonically related sinusoids. If you proceeded with your integrals anyway, you would find that the integral was zero for all terms except the one cosine term that matched the frequency of cos(nw0t) and therefore only those an would be non-zero (and would be equal to the coefficients you see in x(t) already). This property is what the fourier series depends on:- the area under the product of two sinusoids of different frequency over one period is zero.
  5. Nov 25, 2012 #4
    Re: semi urgent Fourier series question (small)

    Yeah, that notation is weird, maybe it didn't come out how I expected.
    Oh, ok, so what is the tell tale sign it is already a fourier series, if it a signal was just x(t) = cos(t) how would I know, without other terms to sum?

    P.S could you please have a look here:

  6. Nov 25, 2012 #5
    Re: semi urgent Fourier series question (small)

    H'mm, that is interesting, I didn't realise that it would always be positive, I was imagining it being like a nomal cos, where over 0 to 2pi it is zero. Ok, I'll try the integral again until I just get the one cosine term that maches the frequency.

    If you could, could you please take a look at this:

    Thanks very much!
  7. Nov 25, 2012 #6
    Re: semi urgent Fourier series question (small)

    Ok that got me nowhere fast. I still couldn't get it,

    how would one integrate:

    an = 2/2pi ∫02pi (1/2 + cos(t) + cos(2t)).cos(nω0t) dt


    Many Thanks again
  8. Nov 26, 2012 #7
    Re: semi urgent Fourier series question (small)

    First you need to identify the period of the signal
    x(t) = 1/2 + cos(t) + cos(2t)

    cos(t) has period 2∏
    cos(2t) has period ∏

    The period of x(t) will be least common multiple of ∏ and 2∏, so 2∏.

    So the fundamental frequency of x(t) will be w0 = 2∏f0 = 2∏/T = 2∏/2∏ = 1

    This means your fourier coefficients will be found from:

    [itex]a_{n} = \frac{1}{\pi}\int^{2\pi}_{0}(\frac{1}{2} + cos t + cos 2t) cos (nt) dt[/itex]

    The integral of the product of two sinusoids over one period is zero unless their frequencies are the same. So n=1 will only produce one non-zero term of x(t)

    [itex]a_{1} = \frac{1}{\pi}\int^{2\pi}_{0}(\frac{1}{2} + cos t + cos 2t) cos (t) dt[/itex]
    [itex]a_{1} = \frac{1}{\pi}\int^{2\pi}_{0}cos (t) cos (t) dt[/itex]
    [itex]a_{1} = \frac{1}{\pi}\int^{2\pi}_{0} cos^{2}t dt[/itex]
    [itex]a_{1} = \frac{1}{\pi}\int^{2\pi}_{0} \frac{1+cos(2t)}{2} dt[/itex]

    which is non-zero and equal to the coefficient of cos(t) in the x(t) equation. Likewise there will be a non-zero a2 term but all other terms n > 2 will be zero.
    Last edited: Nov 26, 2012
  9. Nov 26, 2012 #8
    Re: semi urgent Fourier series question (small)

    Wow, that was one of the most informative replies I've gotten in ages, thank you for the detail.

    So to varify I understand what you mean, the integral of (cos(x))/2 and (cos(x).cos(2x)) is zero over one period but because (cos(x))^2 is the same frequency of 1/2pi.

    Likewise integrating: sin(t).(sin(2t))^2
    would be zero?


    P.S I can understand if I'm being impetuous by bring this up again but did you get a chance to look at: https://www.physicsforums.com/showthread.php?t=654650
    thanks anyway for your time.
  10. Nov 26, 2012 #9
    Re: semi urgent Fourier series question (small)

    I'm glad it helped :)

    That's right. Over a period is the key.

    Because cos(x) and cos(x) are the same frequency, over a period the product cos2(x) will not be zero. You can see this is obvious because cos2(x) is always positive during the period so must have a non-zero integral over the period.

    I think you meant sin(t)*sin(2t). Yes the integral will be zero over a period. sin(t)*sin2(2t) will also be zero if integrated over a period but you have to be more careful because of the square term. This sort of thing does not show up when evaluating fourier series.

    You may have some doubt in considering whether sin(x)cos(x) will be zero if integrated over a period. Both sinusoids have the same frequency but you can see the integral will be zero by considering that sin(2x)=2sin(x)cos(x). Cross products of sin and cos will be zero if integrated over a period.

    This property of sinusoids is called orthogonality and that term is no accident. There is an analogy between orthogonal vectors and orthogonal functions where products of orthogonal functions integrated over a period equalling zero is analagous to taking the dot product of two vectors and coming up with zero. Just like you can expand vectors as the sum of orthogonal basis vectors (i, j, k eg) you can expand functions as the sum of orthogonal functions. In fourier series those functions are sums of harmnocially related sinusoids. That is not the only way to expand functions. Another way is via power series where a Taylor series represents a function as a sum of powers in x. There are infinitely many possible basis functions -- sinusoids in fourier series and powers in x in taylor series are not the only ones.
  11. Nov 26, 2012 #10
    Re: semi urgent Fourier series question (small)

    Thanks again, but if it's late where you are and you need to log off than don't let me keep you.

    Ok, I'll need to do some more digging into orthogonality, is that like with the wronskian?

    I'm a bit confused by that first paragraph you wrote, so you're saying because sin.cos is = sin(2x)/2, when integrated over a period ∏(?) it's zero?
    Ok so sinusoids2 don't really come up in Fourier, so if I get one I'm probably doing something wrong.

    Out of curiosity, you said sinusoids squared are tricky (always positive) so integrating like cos3(t) over a period will be positive or negative, but not zero?

  12. Nov 26, 2012 #11
    Re: semi urgent Fourier series question (small)

    The exact period is not important. sin(2x) has equal areas above zero and below 0 and that is why integrating over a period will be zero. It sometimes helps to sketch the function to keep these things straight. Integrating over a period is always the key.

    I shouldn't say that... you can get a sin2x term if the function you are decomposing as a fourier series contains sin x. I should have said *I* have to be more careful because *I* am not used to seeing those terms :D The issue is this.. the integral of cos(x) over a period is clearly zero because it has equal areas below and above zero over a period. The integral of cos2(x) over a period is clearly not zero because it is always positive over a period. So when you start throwing in functions with the square of sinusoids, one has to stop and think. The 'thinking' involves decomposing the higher powers of sinusoids using the half angle formulas. So sin(t)*sin2(t) = 0.5*sin(t)*(1-cos(4t))=0.5*sin(t)-0.5sin(t)cos(4t) which is zero over a period because the integral of sin(t) over a period is zero and the integral of the product of a sin and cos is zero over a period.

    I suspect there is a general result here if these things are expressed as exponentials but I have never investigated this.

    cos3(t) you will have to decompose as cos(t)*cos2(t) = 0.5*cos(t)*(1+cos(2t)) which is zero if integrated over a period.
  13. Nov 26, 2012 #12
    Re: semi urgent Fourier series question (small)

    I see. Could I just look at (sin(x))^3 and say 'well that's an odd function, so over a period it's zero'?
    I think I now understand what and how to take into concideration, thanks.
    (I hope I explained what I did in evaluating that transform in the other thread adoquately).

    Thanks heaps.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook