Fourier sine series integration

The Fourier series is a sum of sin(nπx) terms. However, the order of these terms is not always the same.f
  • #1
174
0

Homework Statement


The question is to get Fourier sine series of e^-x =f(x) on 0<x<1

Homework Equations



Bn = 2/L ∫ (e^-x) * sin(nπx/L) over the limits 1 to 0, where L = 1

f(x) = summation of Bn*sin(nπx/L)

The Attempt at a Solution


So I integrated ∫ by part integration

so I took u = sin(nπx) and v = -e^-x and u' = nπ*cos(nπx)

so equation was

(-e^-x)*sin(nπx) - ∫-(e^-x)*nπ*(cos(nπx))

then again I did part integration where u = nπ*cos(nπx), v = e^-x and u' = -n^2*π^2*sin(nπx)

so I got

(e^-x)*nπ*(cos(nπx)) + ∫(e^-x)*n^2*π^2*sin(nπx)

∫(e^-x)*sin(nπx) = (-e^-x)*sin(nπx) - (e^-x)*nπ*(cos(nπx)) - ∫(e^-x)*n^2*π^2*sin(nπx)

Now taking ∫(e^-x)*sin(nπx) = L i can write the above equation as

L = (-e^-x)*sin(nπx) - (e^-x)*nπ*(cos(nπx)) - n^2*π^2 L

So L = (-e^-x)*sin(nπx) - (e^-x)*nπ*(cos(nπx))/(1+n^2*π^2)

Can someone please confirm if my integration is correct? Many thanks. I will only put the limits after someone confirms the integration is correct.
 
  • #2
It looks OK except you dropped the ##2##.
 
  • #3
It looks OK except you dropped the ##2##.

What 2 are you talking about? I was not asking if the Bn is correct in the post, just wanted to know if the integration is correct. Can you confirm if there is any other 2 I need to worry about?
 
  • #4
What 2 are you talking about? I was not asking if the Bn is correct in the post, just wanted to know if the integration is correct. Can you confirm if there is any other 2 I need to worry about?

Bn = 2/L ∫ (e^-x) * sin(nπx/L) over the limits 1 to 0, where L = 1

That 2.
 
  • #5
That 2.

Okay so after doing the integration part by putting the limits I get nπ*(1-((e^-1)*(-1)^n))/(1+n^2*π^2). Is that correct? Keep in mind that 2 of Bn I am still keeping it out as its a constant.
 
  • #6

Homework Statement


The question is to get Fourier sine series of e^-x =f(x) on 0<x<1

Homework Equations



Bn = 2/L ∫ (e^-x) * sin(nπx/L) over the limits 1 to 0, where L = 1

This equation is the relationship that one uses for Bn when one is expanding f(x) as a so-called "half wave" Fourier sine series (that I was referring to in another thread)

f(x) = summation of Bn*sin(nπx/L)

The Attempt at a Solution


So I integrated ∫ by part integration

so I took u = sin(nπx) and v = -e^-x and u' = nπ*cos(nπx)

so equation was

(-e^-x)*sin(nπx) - ∫-(e^-x)*nπ*(cos(nπx))

then again I did part integration where u = nπ*cos(nπx), v = e^-x and u' = -n^2*π^2*sin(nπx)

so I got

(e^-x)*nπ*(cos(nπx)) + ∫(e^-x)*n^2*π^2*sin(nπx)

∫(e^-x)*sin(nπx) = (-e^-x)*sin(nπx) - (e^-x)*nπ*(cos(nπx)) - ∫(e^-x)*n^2*π^2*sin(nπx)

Now taking ∫(e^-x)*sin(nπx) = L i can write the above equation as

L = (-e^-x)*sin(nπx) - (e^-x)*nπ*(cos(nπx)) - n^2*π^2 L

So L = (-e^-x)*sin(nπx) - (e^-x)*nπ*(cos(nπx))/(1+n^2*π^2)

Can someone please confirm if my integration is correct? Many thanks. I will only put the limits after someone confirms the integration is correct.
I confirm that the integration is correct. And I evaluated the integral with the functions that you used for u and v interchanged, so I'm sure that this result is correct. But, you can always confirm that the integration is correct simply by differentiating it.

However, I would not have used the symbol L for the integral, since you already used that symbol earlier to represent the length of the x interval.

Chet
 
  • #7
Okay so after doing the integration part by putting the limits I get nπ*(1-((e^-1)*(-1)^n))/(1+n^2*π^2). Is that correct? Keep in mind that 2 of Bn I am still keeping it out as its a constant.
Yes, I confirm this result too.
 
  • #8
Yes, I confirm this result too.

Thanks. So after multiplying it by 2 I get the Bn, however in the question now its asking me to show that the Fourier sine series of ## f(x) = e^-x ## is equal to ## \frac {1} {1+π^2} ## -## \frac{3} {1+9π^2} ## + ## \frac {5} {1+25π^2} ## ...

How is this possible...? I thought f(x) would just be Bn*sin(nπx). when I did that for n=1, My Bn numerator was like 6.65 when I replaced the n in the final integral by 1. Also, as its getting multiplied by sin(nπx) shouldn't all terms be just zero?
 
  • #9
Thanks. So after multiplying it by 2 I get the Bn, however in the question now its asking me to show that the Fourier sine series of ## f(x) = e^-x ## is equal to ## \frac {1} {1+π^2} ## -## \frac{3} {1+9π^2} ## + ## \frac {5} {1+25π^2} ## ...

How is this possible...? I thought f(x) would just be Bn*sin(nπx). when I did that for n=1, My Bn numerator was like 6.65 when I replaced the n in the final integral by 1. Also, as its getting multiplied by sin(nπx) shouldn't all terms be just zero?
Are they asking for the value of the series at some specific value of x?

Chet
 
  • #10
Are they asking for the value of the series at some specific value of x?

Chet

Nope nothing specific, like I stated in the question at the top 0<x<1. this is the only information given about x value...

its actually asking me to find the Fourier sine series of F(x) = ## e^{-x} ## and then use the result of this to show

## \frac {1} {1+π^2}- \frac {3} {1+9π^2} + \frac {5} {1+25π^2} \ ##... = ## \sum_{k=0}^\infty \frac {(2k+1)(-1)^k} {1+(2k+1)^2 (π^2)} \ ## = ## \frac {\sqrt {e}} {2π(e+1)} \ ##

I can see the relationship between the summation and the terms in the series...but don't know how I can actually get those terms in the first place...The summation represents the Bn I suppose and the Bn I got from the integration doesn't match this...
 
  • #11
Nope nothing specific, like I stated in the question at the top 0<x<1. this is the only information given about x value...

its actually asking me to find the Fourier sine series of F(x) = ## e^{-x} ## and then use the result of this to show

## \frac {1} {1+π^2}- \frac {3} {1+9π^2} + \frac {5} {1+25π^2} \ ##... = ## \sum_{k=0}^\infty \frac {(2k+1)(-1)^k} {1+(2k+1)^2 (π^2)} \ ## = ## \frac {\sqrt {e}} {2π(e+1)} \ ##

I can see the relationship between the summation and the terms in the series...but don't know how I can actually get those terms in the first place...The summation represents the Bn I suppose and the Bn I got from the integration doesn't match this...
I can see how they got this result from your solution. You need to evaluate both sides of the equation for the specific case of x = 1/2.

Chet
 
  • #12
I can see how they got this result from your solution. You need to evaluate both sides of the equation for the specific case of x = 1/2.

Chet

I calculated Bn for n =1 and then multiplied with sin(nπx) with x = 0.5, the answer comes 0.79 which is not the first term of the series...how do we even get the exponential format from this?
 
  • #13
I calculated Bn for n =1 and then multiplied with sin(nπx) with x = 0.5, the answer comes 0.79 which is not the first term of the series...how do we even get the exponential format from this?
You're supposed to derive this result algebraically. Write out your expressions for B1, B2, B3, B4, and B5 algebraically. What is e^-x when x =1/2?
 
  • #14
You're supposed to derive this result algebraically. Write out your expressions for B1, B2, B3, B4, and B5 algebraically. What is e^-x when x =1/2?


2 ( ## \frac {π (e^{-1} +1) } {1+π^2} \ ## - ## \frac {3π (e^{-1} +1) } {1+9π^2} \ ## + ## \frac {5π (e^{-1} +1) } {1+25π^2} \ ##) = ## \sqrt{e} \ ##

The 2 is from the Bn formula so now taking ## \ 2π(e^{-1} +1) \ ## common and moving it to other side I get

## \frac {1} {1+π^2} \ ## - ## \frac {3} {1+9π^2} \ ## + ## \frac {5} {1+25π^2} \ ## = ## \frac { \sqrt{e} } { \ 2π(e^{-1} +1) } \ ##

## \frac {1} { \frac {1} {e^{-1}}} \ ## = e so

## \frac {1} {1+π^2} \ ## - ## \frac {3} {1+9π^2} \ ## + ## \frac {5} {1+25π^2} \ ## = ## \frac { \sqrt{e} } { \ 2π(e+1) } \ ##

Seems like its correct...Sorry I took so long to understand this...Thanks a lot . anyways can you please help with that heat equation. I think I am almost near to the solution to that as well...
 
  • #15
2 ( ## \frac {π (e^{-1} +1) } {1+π^2} \ ## - ## \frac {3π (e^{-1} +1) } {1+9π^2} \ ## + ## \frac {5π (e^{-1} +1) } {1+25π^2} \ ##) = ## \sqrt{e} \ ##

The 2 is from the Bn formula so now taking ## \ 2π(e^{-1} +1) \ ## common and moving it to other side I get

## \frac {1} {1+π^2} \ ## - ## \frac {3} {1+9π^2} \ ## + ## \frac {5} {1+25π^2} \ ## = ## \frac { \sqrt{e} } { \ 2π(e^{-1} +1) } \ ##

## \frac {1} { \frac {1} {e^{-1}}} \ ## = e so

## \frac {1} {1+π^2} \ ## - ## \frac {3} {1+9π^2} \ ## + ## \frac {5} {1+25π^2} \ ## = ## \frac { \sqrt{e} } { \ 2π(e+1) } \ ##

Seems like its correct...Sorry I took so long to understand this...Thanks a lot . anyways can you please help with that heat equation. I think I am almost near to the solution to that as well...
Nicely done. For the heat transfer problem, you do the exact same thing you did on this problem to get the Fourier Series. You can even use the exact same half wave equation to get Bn.

Chet
 
  • #16
I can see how they got this result from your solution. You need to evaluate both sides of the equation for the specific case of x = 1/2.

Chet

Hi I just realized when x =1/2 its not ## \sqrt {e} \ ## but its ## \frac {1} { sqrt{e} } \ ## as its ## \ e^{-x} \ ##. So then what I did can't be correct right? If I take x =-1/2 then my signs becomes opposite then the signs of the terms in the series...What do I do? Please help...
 
  • #17
Hi I just realized when x =1/2 its not ## \sqrt {e} \ ## but its ## \frac {1} { sqrt{e} } \ ## as its ## \ e^{-x} \ ##. So then what I did can't be correct right? If I take x =-1/2 then my signs becomes opposite then the signs of the terms in the series...What do I do? Please help...
You need to check your algebra. I solved the problem and got the desired result, and so did you too earlier. Find out what you're doing wrong now.

Chet
 
  • #18
You need to check your algebra. I solved the problem and got the desired result, and so did you too earlier. Find out what you're doing wrong now.

Chet

But that was wrong! I got the correct result by writing ## \ e^{-x} \ ## when x = 1/2 as ## \sqrt{e} \ ##. That's the wrong part. You told it was correct earlier but I think you also didn't realize that I was actually doing it wrong...How do I get the desired result by doing it the correct way now
 
  • #19
But that was wrong! I got the correct result by writing ## \ e^{-x} \ ## when x = 1/2 as ## \sqrt{e} \ ##. That's the wrong part. You told it was correct earlier but I think you also didn't realize that I was actually doing it wrong...How do I get the desired result by doing it the correct way now
I didn't just look over what you did and agree to it. I obtained the result on my own even before you presented your results. My results agreed with the relationship that was given.

Chet
 
  • #20
I didn't just look over what you did and agree to it. I obtained the result on my own even before you presented your results. My results agreed with the relationship that was given.

Chet

So you got it by taking x as 0.5? Because if you do that then sqrt e just remains in the denominator instead of being on the numerator
 
  • #21
So you got it by taking x as 0.5? Because if you do that then sqrt e just remains in the denominator instead of being on the numerator
There is another e which it cancels into.
 

Suggested for: Fourier sine series integration

Replies
1
Views
582
Replies
26
Views
921
Replies
12
Views
4K
Replies
20
Views
808
Replies
5
Views
1K
Replies
9
Views
778
Replies
2
Views
841
Back
Top