Fourier cosine series of cos(x) from x=0 to Pi

Fourier series for e^jwt, you just get the first term, and the same if you find the Fourier series for the second one, and then you just add them together?In summary, the conversation is about finding the Fourier cosine series for f(x) = cos x, 0 < x < Pi. Through graphing and using the identities of cosx cos(nx), the final result is that the Fourier cosine series for cos(x) with a period of Pi is cos(x). It is also noted that this is a trivial result when using the exponential Fourier series.
  • #1
alias99
6
0

Homework Statement


Find the Fourier cosine series for f(x) = cos x, 0 < x < Pi

EDIT: I believe we are talking about a half-range extension..


Homework Equations


Fourier cosine series:
f(x) = a0/2 + Sum(n = 1 to infinity) (an * cos (nx))

where a0 = 2/L * integral (x = 0, x = L) (f(x) dx)

and an = 2/L * integral (x = 0, x = L) (f(x) * cos (n*Pi*x/L) dx)

Sorry if that's hard to understand...


The Attempt at a Solution



I graphed the function and extended the period to - Pi, i.e. -Pi < x < Pi

I found a0 = 2/Pi * integral (x = 0, x = L) (cos x dx) = 0
an = 2/Pi * integral (x = 0, x = L) (cos x * cos (nx) dx)
and evaluated the integral using IBP...

an = 2/Pi * (ncos(x)*sin (nx) - sin(x)cos(nx))*1/(n2-1)| x = 0, x = Pi
which gives me an = 0!

So the Fourier cosine series would be:
f(x) = 0

I would really appreciate any clarification as getting 0 for the series doesn't sound right..

Thank you in advance
 
Last edited:
Physics news on Phys.org
  • #2
Hi alias99! :smile:
alias99 said:
I found a0 = 2/Pi * integral (x = 0, x = L) (cos x dx) = 0
an = 2/Pi * integral (x = 0, x = L) (cos x * cos (nx) dx)
and evaluated the integral using IBP...

an = 2/Pi * (ncos(x)*sin (nx) - sin(x)cos(nx))*1/(n2-1)| x = 0, x = Pi
which gives me an = 0!

Nooo … no need for IBP here (and it doesn't help anyway :redface:) …

learn your https://www.physicsforums.com/library.php?do=view_item&itemid=18"

cosx cos(nx) = … ? :smile:
 
Last edited by a moderator:
  • #3
Hi tiny-tim! :smile: (reminds me of the Nudie juices..hmm)
Thanks for your response ;)

You're right, I do need to learn my identities :tongue:

I can now evaluate the integral much easier (Lol... funny thing is I did manage to get a result by IBP.. it looked like it would have continued indefinetely but I got the original integral on the RHS, took it over to the LHS and made it the subject)

so now..

cosx cos(nx) = 1/2 (cos (x-nx) + cos (x+nx)) :smile: which can be integrated fairly easily

I still get 0! hehe.. I guess it is 0 after all. probably has something to do with cos(x) having an area under the curve of 0 between x = -Pi and x = Pi (or even x = 0 to Pi)

I'm probably going to state that the Fourier cosine series of cos (x) with a period of Pi is cos(x) .. or is it 0.. lol :tongue:

I'd appreciate just a word of confirmation, if you don't mind :)
 
  • #4
Hi alias99! :smile:
alias99 said:
cosx cos(nx) = 1/2 (cos (x-nx) + cos (x+nx)) :smile: which can be integrated fairly easily

I still get 0! hehe.. I guess it is 0 after all. probably has something to do with cos(x) having an area under the curve of 0 between x = -Pi and x = Pi (or even x = 0 to Pi)

I'm probably going to state that the Fourier cosine series of cos (x) with a period of Pi is cos(x) .. or is it 0.. lol :tongue:

I'd appreciate just a word of confirmation, if you don't mind :)

Well, it seemed a strange question …
alias99 said:
Find the Fourier cosine series for f(x) = cos x, 0 < x < Pi
… if f is 2π-periodic, then yes obviously the only term in its Fourier cosine series is the first one, cosx.
 
  • #5
Great! Thanks a lot tiny-tim :biggrin:
 
  • #6
I also just tried to do this and it looks like this is pretty trivial if you try to get the exponential Fourier series instead? Because cosx can be written as e^jwt+e^-jwt
 

1. What is a Fourier cosine series?

A Fourier cosine series is a mathematical representation of a function as a sum of cosine functions with different frequencies and amplitudes. It is used to approximate a periodic function over a finite interval.

2. What is the Fourier cosine series of cos(x) from x=0 to Pi?

The Fourier cosine series of cos(x) from x=0 to Pi is given by the formula: f(x) = a0 + a1*cos(x) + a2*cos(2x) + a3*cos(3x) + ..., where the coefficients are calculated using the Fourier cosine series formula: an = (2/Pi)*∫cos(nx)*cos(x) dx from 0 to Pi.

3. Why is the interval from x=0 to Pi used for the Fourier cosine series of cos(x)?

This interval is used because the function cos(x) is periodic with a period of 2Pi, so the interval from 0 to Pi covers one full period of the function. This makes it easier to calculate the coefficients for the Fourier cosine series.

4. How accurate is the Fourier cosine series approximation of cos(x)?

The accuracy of the Fourier cosine series approximation depends on the number of terms used in the series. The more terms included, the closer the approximation will be to the actual function. However, even with a small number of terms, the Fourier cosine series can provide a good approximation of cos(x) within the given interval.

5. Can the Fourier cosine series be used to approximate non-periodic functions?

No, the Fourier cosine series is only applicable for periodic functions. For non-periodic functions, other techniques such as Fourier transforms or Taylor series must be used for approximation.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
280
  • Calculus and Beyond Homework Help
Replies
1
Views
282
  • Calculus and Beyond Homework Help
Replies
1
Views
212
  • Calculus and Beyond Homework Help
Replies
5
Views
681
  • Calculus and Beyond Homework Help
Replies
3
Views
343
  • Calculus and Beyond Homework Help
Replies
2
Views
420
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
340
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
352
Back
Top