Fourier Series: Solving f(x) = e^x Homework

gtfitzpatrick
Messages
372
Reaction score
0

Homework Statement



f(x) = e^x for -\pi/2 \leq x \leq \pi/2

Homework Equations





The Attempt at a Solution



Having a bit of trouble getting this out.
This is a odd function right so a_n = 0 so i only have to find b_n , right?
 
Physics news on Phys.org
does the function repeat outside that interval?

the definition of odd is f(x) = -f(-x), does the function satisfy this?
 
lanedance said:
does the function repeat outside that interval?

i'm not sure what you mean by this, but i assume it does as the function is periodic.

lanedance said:
the definition of odd is f(x) = -f(-x), does the function satisfy this?

the definition of odd is f(-x) = -f(x) no?

i thought e^{-x} = -e^x but i guess I am wrong so i'll work the whole lot out
 
all the integrals below are over 0 to \pi/2

a_0 = 4/ \pi \int e^x dx = 4/ \pi (e^{\pi/2} - 1)a_0 = 4/ \pi (e^{\pi/2} - 1)


a_n = 4/ \pi \int e^x cos(2nx) dx
a_n = 4/ \pi(0-0) - 2/ n\pi n \int e^x sin(2nx)dx
a_n = /n^2\pi (e^x (cosnx-cos0)) - 1/ n^2\pi \int e^x cos(2nx) dx
a_n = e^x/ n^2\pi [ (-1)^2 - 1]

am i going the right way with this?
 
gtfitzpatrick said:
i'm not sure what you mean by this, but i assume it does as the function is periodic.
the definition of odd is f(-x) = -f(x) no?
yep this is the same as I wrote, but probably the way it is usually written

gtfitzpatrick said:
i thought e^{-x} = -e^x but i guess I am wrong so i'll work the whole lot out

f(-x) = e^{-x} \neq -e^x = -f(x)[/tex] <br /> <br /> so the function is not odd, hence you must calculate both an (cos terms) and bn (sin terms)<br /> <br /> the easiest way is to draw a sketch, it should eb pretty obvious whether it is symmetric (even) or anti-symmetric (odd)
 
gtfitzpatrick said:
all the integrals below are over 0 to \pi/2

a_0 = 4/ \pi \int e^x dx = 4/ \pi (e^{\pi/2} - 1)a_0 = 4/ \pi (e^{\pi/2} - 1)a_n = 4/ \pi \int e^x cos(2nx) dx
a_n = 4/ \pi(0-0) - 2/ n\pi n \int e^x sin(2nx)dx
a_n = /n^2\pi (e^x (cosnx-cos0)) - 1/ n^2\pi \int e^x cos(2nx) dx
a_n = e^x/ n^2\pi [ (-1)^2 - 1]

am i going the right way with this?

why do you only integrate on the interval 0\leq x &lt; \frac{\pi}{2}?

isn't the problem defined on -\frac{\pi}{2}\leq x &lt; \frac{\pi}{2}
 
ahhh yes thanks lancedance, i was only integrating on half the interval and multiplying by 2, the same way that you would if it was an odd or even function! I should do it over the full interval!

A general question...if i wanted to get the half range Fourier sine or cosine series for say f(x) = 2x if 0<x<1 ; f(x) = 2 if 1<x<2. This function can be extended over the y-axis or across the origin as appropriate. But when I am calculating the coefficients do i just integate over the 2 intervals and multiply be 2 in the way i would if i was dealing with and odd or even function? I'm thinking not.
?
 
I assume you mean it is known on the given interval and you a free to extend over the remaining x axis, the major importance is the Fourier series is representative over the given interval

you have bit of leeway to play with here, generally it is eaisest to deifne the function outside 0<x<2 as a reflection in the y=0 axis and then repeating from there. That makes it an even function and halves the terms. However you could similarly come up with a scheme to make it odd or just repeat the function as is. There may be advantages to each in terms of evaluating the integrals or conitinuity which will leader to a faster convergence of terms.
 
Back
Top