Finding the Fourier Series of f(x)

Click For Summary
SUMMARY

The discussion focuses on finding the Fourier series for the piecewise function f(x) defined as f(x) = 0 for -π < x < 0 and f(x) = sin(x) for 0 < x < π. The coefficients a_n and b_n are derived using integrals, with specific calculations provided for a_0, a_n, and b_n. The user encounters challenges with convergence and the graphical representation of the series, particularly noting that the series does not pass through the origin. The conversation also touches on extending the function to achieve odd symmetry for further analysis.

PREREQUISITES
  • Understanding of Fourier series and their coefficients
  • Familiarity with integral calculus, particularly definite integrals
  • Knowledge of trigonometric identities and product-to-sum formulas
  • Basic concepts of function symmetry (odd and even functions)
NEXT STEPS
  • Calculate Fourier coefficients for piecewise functions using integrals
  • Explore the application of Simpson's rule in evaluating integrals
  • Study the properties of odd and even functions in Fourier series
  • Investigate convergence issues in Fourier series and their graphical implications
USEFUL FOR

Students and educators in mathematics, particularly those studying Fourier analysis, as well as anyone involved in signal processing or applied mathematics requiring Fourier series expansions.

bon
Messages
547
Reaction score
0

Homework Statement



Trying to find the Fourier series for the function

f(x) = 0 for -pi<x<0 and f(x) = sinx for 0<x<pi


The Attempt at a Solution



im having a little trouble working it out..

are any of the sets of coefficients = 0?

Im getting two non-zero integrals for the coefficients an and bn which are difficult to work out :(
 
Physics news on Phys.org
You need to calculate

a_0= \frac{1}{2\pi} \int_0^\pi{sin(x) dx}
a_n= \frac{1}{\pi} \int_0^\pi{sin(x)cos(nx) dx}
b_n= \frac{1}{\pi} \int_0^\pi{sin(x)sin(nx) dx}

These integrals are not that diffucult are they? I mean a_0 is easy. And for a_n,b_n just apply the product-to-sum formulas (or Simpson's formula, whatever you call it).
 
ahh that comes out all horrible though :(

the an integral is like cos pin + 1 / pi - pi n^2
 
Yeah, the result is not very beautiful, I know ):
 
is bn = 0 since n is integer?
 
I don't think b1 is 0. The other bn probably are 0.
 
but bn = sinpi n / pi - pi n^2 so when n=1 we have sin pi on the top which = 0
 
sorry - ignore..
 
ok so i think i have it now..but when i graph it, it doesn't seem to fit that well...

trying the first few terms, f(x) = 1/pi -2/3pi cos2x -2/15pi cos4x + ... + 1/2sinx

For one thing, it doesn't go through (0,0)! why?
 
  • #10
That it doesn't go through (0,0) is expect. The value at 0 is a series and as such is not expected to go through (0,0).

As for the convergence problems. All I can say is that the convergence is probably slow... I do think you have the right solution however...
 
  • #11
thanks ok

my next question asks me to expand f(x) = xsinx 0<x<pi as a Fourier sine series

the hint is that i should extend the interval to -pi<x<pi and then require that f(-x) = -f(x) i.e. f(x) is odd.. but i don't get it...f(x) isn't odd.. :S

thanks
 
  • #12
oh i think i get it..

i say that f(x) = -xsinx for -pi to 0 and xsinx for 0 to pi?

Then can i just say all an = 0 as it is odd? Do i need to be careful about case n=1? so in general is it always true that if it is odd, an = 0 ? including n=1?
 
  • #13
They just mean that u define f(x)=xsin(x) for 0<x<pi. And then extend this function to [-pi,pi] so that the function is odd. So define f(x)=-xsin(x) for -pi<x<0.
 
  • #14
If a function is odd, then all an are indeed 0. So only the bn matter now.
If a function is even, then all bn are 0.
 
  • #15
Then can i just say all an = 0 as it is odd? Do i need to be careful about case n=1? so in general is it always true that if it is odd, an = 0 ? including n=1?
 
  • #16
Yay okay thanks
 
  • #17
am i right in thinking bn = 2/pi times the integral from 0 to pi of xsinx sin nx

that is a horrible integral..cant be right..?
 
  • #18
Yes, it IS a horrible integral :smile:

Try first Simpsons formula to split up sin(x)sin(nx) in sums.
Then do partial integration.

It's even less beautiful then last time
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K