Finding the Fourier Series of f(x)

Click For Summary

Homework Help Overview

The discussion revolves around finding the Fourier series for a piecewise function defined as f(x) = 0 for -π < x < 0 and f(x) = sin(x) for 0 < x < π. Participants are exploring the calculation of Fourier coefficients and discussing the implications of the function's properties.

Discussion Character

  • Exploratory, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • Participants are attempting to calculate the Fourier coefficients a₀, aₙ, and bₙ, with some expressing difficulty in evaluating the integrals involved. Questions arise regarding the values of the coefficients, particularly whether certain coefficients can be zero.

Discussion Status

There is an ongoing exploration of the coefficients with some participants suggesting methods for simplification, while others express uncertainty about the results. The discussion includes considerations of the function's behavior at specific points and the implications of odd and even functions on the coefficients.

Contextual Notes

Participants are also discussing the extension of a function to make it odd for the purpose of Fourier series expansion, raising questions about the implications of this extension on the coefficients.

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

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

These integrals are not that diffucult are they? I mean [tex]a_0[/tex] is easy. And for [tex]a_n,b_n[/tex] 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
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K