# semi urgent Fourier series question (small)

by toneboy1
Tags: fourier series
 P: 174 1. The problem statement, all variables and given/known data Hi, 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.
 Mentor P: 10,853 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.
P: 296
 Quote by toneboy1 1. The problem statement, all variables and given/known data 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
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.

P: 174

## semi urgent Fourier series question (small)

 Quote by mfb 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.
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:

Thanks!!
P: 174
 Quote by aralbrec 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.
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!
 P: 174 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
P: 296
 Quote by toneboy1 how would one integrate: an = 2/2pi ∫02pi (1/2 + cos(t) + cos(2t)).cos(nω0t) dt
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:

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

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)

$a_{1} = \frac{1}{\pi}\int^{2\pi}_{0}(\frac{1}{2} + cos t + cos 2t) cos (t) dt$
$a_{1} = \frac{1}{\pi}\int^{2\pi}_{0}cos (t) cos (t) dt$
$a_{1} = \frac{1}{\pi}\int^{2\pi}_{0} cos^{2}t dt$
$a_{1} = \frac{1}{\pi}\int^{2\pi}_{0} \frac{1+cos(2t)}{2} dt$

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.
P: 174
 Quote by aralbrec 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)
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?

THANKS

P.S I can understand if I'm being impetuous by bring this up again but did you get a chance to look at: http://www.physicsforums.com/showthread.php?t=654650
P: 296
 Quote by toneboy1 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
That's right. Over a period is the key.

 but because (cos(x))^2 is the same frequency of 1/2pi.
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.

 Likewise integrating: sin(t).(sin(2t))^2 would be zero?
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.
P: 174
 Quote by aralbrec 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.
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?

Thanks!
P: 296
 Quote by toneboy1 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?
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.

 Ok so sinusoids2 don't really come up in Fourier, so if I get one I'm probably doing something wrong.
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.

 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?
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.
 P: 174 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.

 Related Discussions Electrical Engineering 3 Engineering, Comp Sci, & Technology Homework 1 Introductory Physics Homework 16 Precalculus Mathematics Homework 3 Calculus & Beyond Homework 2