Fourier series expansion problem

In summary: And I got lost in the signs too (they are important !) But if you want to make me happy, just solve the exercise (I think you are close) and post it in the homework forum !In summary, bbq has a problem with finding the Fourier coefficients for a given function and showing that π/4 can be represented as 1 - 1/3 + 1/5 ... using suitable values of x. After some discussion and corrections, bbq is able to correctly calculate the coefficients and choose the appropriate value for x to show the desired representation.
  • #1
bbq pizza
6
0
< Mentor Note -- thread moved to HH from the technical forums, so no HH Template is shown >

hi I've got a problem that I've partially worked but don't understand the next part/have made a mistake?

f(x)=0 for -π<x<0 and f(x)=x for 0≤x≤π
i got a0=π/4 and an=0 and bn=0 if n is even and 2/n if n is odd

so... f(x)= π/4 + ∑ (2/(2n+1)) * sin(2n+1) * π * x
n=0
now i need to show π/4 = 1 - 1/3 + 1/5 ... using suitable values of x
how would i go about doing this?
any help is much appreciated
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Hello bbq, welcome to PF :smile: !

Can you show how you found these Fourier coefficients ?

Your choices for x are pretty limited, right ? If you try ##x=\pi## (not the right answer I suppose) what does the series give you ?
 
  • #3
http://imageshack.com/a/img911/5796/jhLmo0.jpg
http://imageshack.com/a/img673/1972/xQeDHn.jpg
x=pi gives too high so i must have made a mistake on calculation of ceoffiscients but i don't see it
 
Last edited by a moderator:
  • #4
Wow. So you write it as a cosine series ? No sines ? Wouldn't that (##b_n = 0## the coefficents for sin nx for all n) give an even function as a result ?

[edit] oh, wait, the picture continues further down. Need some time to decrypt...


And $$a_n \equiv {1\over 2\pi} \int_0^\pi x\cos (nx)\; dx\quad {\rm ?} $$
 
  • Like
Likes bbq pizza
  • #5
I can see ##a_n = 0## for n = even. What if n is odd ?
 
  • #6
f(x)= π/4 + ∑ (2/(2n+1)) * sin ( (2n+1) * π * x )
could that be f(x)= π/4 + 1/(2π) ∑ (2π/(2n+1)) * sin((2n+1) * x) ? And then you choose x = π/2 to get the (-1)n ?

(a choice that gets rid of the cosines too ! )

Modulo further errors on my part ...
 
  • #7
thanks BvU.
I looked over it and noticed some mistakes, so.. an=( (-1)^n -1) / (π * n^2)
and bn= - ( (-1)^n ) / n
i see the π/2 getting rid of cosine but how do i achieve the π/4 = 1 - 1/3 + 1/5 ... using suitable values of x.
do i set x=π/4 then get 1 for ??
 
  • #8
You're real close now !
But I suspect the (-1)n-1 and (-1)n is wishful thinking ? Could you explain ?

On the one hand you have ##f(x) = x##
On the other you have ##f(x) = π/4 + ...\Sigma ... \cos((2n+1)x)\ + \ ... \sin ((2n+1)x)##
Now make sure you have the right multipliers and coefficients
and pick an x that let's the cosines disappear and the sines be (-1)n
 
  • #9
i got π/4 + ( ( -1)n-1 ) cos(nx) ) /π*n2+( (-1)nsin(nx) ) /n
with the an=(-1)n-1) / (πn2) because during the an calculation i get an=( cos(nπ)-cos(n0) ) / (πn2) and cos1π=-1 and cos(0)=cos2π=1 so -1n=+1 for n=even and =-1 for n=odd
and bn= - ( (-1)n ) / n from ( -nπcos(nπ) )/πn2

I'm still unsure if I've made a mistake or not, as when i make x=π/4 i don't get 1 at n=0 like in the sequence but do get -0.37 for n=1. could that mean a mistake in the equation for the even term?
 
Last edited:
  • #10
Hi there,

Yes, sorry, the (-1)n re-appears if you go back from summing 2n+1 to summing n .

I've been piling error on top of error in this exercise (*) as well (nobody is perfect), but I convinced myself you are perfectly correct (I cheated by finding the series in a textbook example). Even made a plot for the first eight terms:

Fourier_sawtooth.jpg


Nice to see a triangle (no discontinuities) is easier to reproduce than a sawtooth !


Now I'm not sure what you mean with "when i make x=π/4 i don't get 1 at n=0 like in the sequence"

You make x a certain value and you add a good number of terms. At n = 0 you are supposed to get only the π/4 and the summation for the sines and cosines start at n = 1.

Going back to your original exercise: to show π/4 = 1 - 1/3 + 1/5 you need a value for x that makes the cosine terms to go away. In fact the plot above makes the choice obvious ! So sorry for spoiling :wink: ...


(*) E.g. the ##\ ... \sin ((2n+1)x)## in post #8 should have been ##\ ... \sin (nx)##
 

Related to Fourier series expansion problem

1. What is the Fourier series expansion problem?

The Fourier series expansion problem is a mathematical concept that involves representing a periodic function as a combination of sine and cosine functions. This allows for the analysis and manipulation of complex periodic functions using simpler trigonometric functions.

2. How is the Fourier series expansion problem used in science?

The Fourier series expansion problem is used in a variety of scientific fields, including physics, engineering, and signal processing. It is commonly used to analyze and manipulate data that has periodic behavior, such as sound and electromagnetic waves.

3. What is the difference between Fourier series and Fourier transform?

Fourier series and Fourier transform are both mathematical techniques used to represent functions as combinations of sine and cosine functions. However, Fourier series is used for periodic functions, while Fourier transform is used for non-periodic functions.

4. What are the applications of Fourier series expansion problem?

The applications of Fourier series expansion problem are vast and diverse. It is used in fields such as image processing, data compression, and solving differential equations. It also has practical applications in music and audio engineering, where it is used to analyze and manipulate sound waves.

5. What are the limitations of Fourier series expansion problem?

While Fourier series expansion is a powerful tool, it does have some limitations. It can only be used for periodic functions and may not accurately represent functions with discontinuities. Additionally, it requires a large number of terms to accurately represent complex functions, which can be computationally demanding.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
460
  • Calculus and Beyond Homework Help
Replies
3
Views
358
  • Calculus and Beyond Homework Help
Replies
1
Views
285
  • Calculus and Beyond Homework Help
Replies
1
Views
569
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
337
  • Calculus and Beyond Homework Help
Replies
12
Views
5K
  • Calculus and Beyond Homework Help
Replies
2
Views
404
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
6
Views
439
Back
Top