Fourier sine series integration

In summary: The Fourier series is a sum of sin(nπx) terms. However, the order of these terms is not always the same.
  • #1
JI567
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.
 
Physics news on Phys.org
  • #2
It looks OK except you dropped the ##2##.
 
  • #3
LCKurtz said:
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
JI567 said:
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?

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

That 2.
 
  • #5
LCKurtz said:
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
JI567 said:

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
JI567 said:
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
Chestermiller said:
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
JI567 said:
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
Chestermiller said:
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
JI567 said:
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
Chestermiller said:
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
JI567 said:
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
Chestermiller said:
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
JI567 said:
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
Chestermiller said:
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
JI567 said:
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
Chestermiller said:
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
JI567 said:
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
Chestermiller said:
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
JI567 said:
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.
 

1. What is a Fourier sine series?

A Fourier sine series is a mathematical representation of a periodic function using only sine functions. It is a special case of the more general Fourier series, which also includes cosine functions.

2. How is a Fourier sine series calculated?

A Fourier sine series is calculated by taking the integral of the original function multiplied by a sine function with a specific frequency. This process is repeated for different frequencies to obtain a series of sine functions that, when added together, approximate the original function.

3. What is the purpose of using a Fourier sine series?

The purpose of using a Fourier sine series is to simplify the representation of a periodic function and make it easier to analyze and manipulate mathematically. It is also useful in engineering and physics applications as it allows for the efficient calculation of certain quantities, such as power and energy, in systems with periodic behavior.

4. What is the difference between a Fourier sine series and a Fourier series?

The main difference between a Fourier sine series and a Fourier series is that a Fourier sine series only includes sine functions, while a Fourier series also includes cosine functions. This means that a Fourier sine series can only represent odd functions, while a Fourier series can represent both odd and even functions.

5. Are there any limitations of using a Fourier sine series?

One limitation of using a Fourier sine series is that it can only represent periodic functions. It also may not be an accurate representation of non-periodic functions. Additionally, the convergence of the series may be slow or may not converge at all for certain functions, requiring the use of other techniques for approximation.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
951
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
Replies
8
Views
308
  • Calculus and Beyond Homework Help
3
Replies
104
Views
6K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
Replies
2
Views
273
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
Back
Top