Semi Fourier series question (small)

In summary, the conversation discusses a question about a Fourier series for a given function. The speaker is confused about the value of an in the equation, and is unsure whether they have made a mistake in their calculations. They also ask for clarification on how to integrate certain terms in the equation. The expert responds by explaining the concept of the Fourier series and how the coefficients are related to the frequencies of the function. They also provide a detailed explanation on how to calculate the integral for specific terms in the equation.
  • #1
toneboy1
174
0
semi urgent Fourier series question (small)

Homework Statement




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.
 
Physics news on Phys.org
  • #2


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.
 
  • #3


toneboy1 said:

Homework Statement



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.
 
  • #4


mfb said:
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:
https://www.physicsforums.com/showthread.php?t=654650

Thanks!
 
  • #5


aralbrec said:
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 realize 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:
https://www.physicsforums.com/showthread.php?t=654650

Thanks very much!
 
  • #6


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
 
  • #7


toneboy1 said:
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:

[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:
  • #8


aralbrec said:
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: https://www.physicsforums.com/showthread.php?t=654650
thanks anyway for your time.
 
  • #9


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

I'm glad it helped :)

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.
 
  • #10


aralbrec said:
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!
 
  • #11


toneboy1 said:
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.
 
  • #12


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.
 

1. What is a Semi-Fourier series?

A Semi-Fourier series is a mathematical tool used to represent a periodic function as a sum of sines and/or cosines. Unlike a full Fourier series, a Semi-Fourier series only uses a limited number of harmonics, which makes it useful for approximating functions that are not strictly periodic.

2. How is a Semi-Fourier series different from a full Fourier series?

A Semi-Fourier series only uses a limited number of harmonics, while a full Fourier series uses an infinite number of harmonics. This means that a Semi-Fourier series is only an approximation of a periodic function, while a full Fourier series is an exact representation.

3. What are the applications of Semi-Fourier series?

Semi-Fourier series have many applications in mathematics, engineering, and physics. They are used to approximate non-periodic functions, solve differential equations, and analyze signals and systems.

4. How do you calculate a Semi-Fourier series?

To calculate a Semi-Fourier series, you first need to determine the period of the function and the number of harmonics to use. Then, you can use the Fourier coefficients formula to find the coefficients of each harmonic. Finally, you can combine these coefficients to form the Semi-Fourier series.

5. What are the advantages of using a Semi-Fourier series?

One of the main advantages of using a Semi-Fourier series is that it can approximate non-periodic functions, which cannot be represented by a full Fourier series. Additionally, Semi-Fourier series are often simpler and easier to work with than full Fourier series, making them useful for practical applications.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
94
  • Calculus and Beyond Homework Help
Replies
3
Views
163
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Math POTW for University Students
Replies
3
Views
743
  • Engineering and Comp Sci Homework Help
Replies
3
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
26
Views
3K
  • Calculus and Beyond Homework Help
Replies
3
Views
265
  • Engineering and Comp Sci Homework Help
Replies
3
Views
950
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
1K
Back
Top