Fourier series expansion problem

Click For Summary

Homework Help Overview

The discussion revolves around a Fourier series expansion problem where the function f(x) is defined piecewise: f(x) = 0 for -π < x < 0 and f(x) = x for 0 ≤ x ≤ π. The original poster has calculated some Fourier coefficients and is attempting to demonstrate a specific series representation involving π/4.

Discussion Character

  • Exploratory, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • Participants discuss the calculation of Fourier coefficients and the implications of the chosen values for x. There are questions about the correctness of the coefficients and the approach to demonstrating the series representation of π/4.

Discussion Status

Participants are actively engaging with the problem, questioning each other's calculations and assumptions. Some have offered guidance on selecting values for x that simplify the series, while others express uncertainty about the correctness of their calculations.

Contextual Notes

There are indications of potential mistakes in the calculations of Fourier coefficients, and participants are exploring the implications of these errors on the overall problem. The discussion also highlights the limited choices for x and the need to ensure the correct terms are included in the series representation.

bbq pizza
Messages
6
Reaction score
0
< Mentor Note -- thread moved to HH from the technical forums, so no HH Template is shown >[/color]

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
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 ?
 
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:
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   Reactions: bbq pizza
I can see ##a_n = 0## for n = even. What if n is odd ?
 
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 ...
 
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 ??
 
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
 
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)##
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K
Replies
12
Views
7K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K