Heat equation problem so confusing

JI567
Messages
173
Reaction score
0

Homework Statement


The problem is f(x) = sin2πx - (1/πsquare)*sinπx

and its given Bn sin (nπx) = f(x)

Question is find Bn.

Homework Equations



Bn = 2/L ∫ (sin2πx - (1/πsquare)*sinπx) * sin(nπx/L) where L is 1

The Attempt at a Solution


I did
[/B]
∫ sin2πx * sin (nπx) - (1/πsquare)*sin square πx
then I tried changing it to cos but it doesn't make sense, for the first term ∫sin2πx * sin (nπx)
∫sin2πx * sin (nπx) = -1/2 ∫cos(2π+nπ)-cos(2π-nπ)

But how do i actually integrate the above with the n in it i am so confused...I know cosnπ = (-1)^n but I can only use that after final integration and even if I finally somehow manage to integrate it, it will be changed to sinnπ. Please can anyone help!
. Is there any simple way to do this?
 
Physics news on Phys.org
JI567 said:
The problem is f(x) = sin2πx - (1/πsquare)*sinπx

and its given Bn sin (nπx) = f(x)
That doesn't make sense. Please correct the problem statement.
 
Did you mean to have a summation sign in front of the Bnsin(nπx)?
 
JI567 said:

Homework Statement


The problem is f(x) = sin2πx - (1/πsquare)*sinπx

and its given Bn sin (nπx) = f(x)

Question is find Bn.

Homework Equations



Bn = 2/L ∫ (sin2πx - (1/πsquare)*sinπx) * sin(nπx/L) where L is 1

The Attempt at a Solution


I did
[/B]
∫ sin2πx * sin (nπx) - (1/πsquare)*sin square πx
then I tried changing it to cos but it doesn't make sense, for the first term ∫sin2πx * sin (nπx)
∫sin2πx * sin (nπx) = -1/2 ∫cos(2π+nπ)-cos(2π-nπ)

But how do i actually integrate the above with the n in it i am so confused...I know cosnπ = (-1)^n but I can only use that after final integration and even if I finally somehow manage to integrate it, it will be changed to sinnπ. Please can anyone help!
. Is there any simple way to do this?

Your question seems to be asking for the ##B_n## in
\sum_{n=1}^{\infty} B_n \sin(n \pi x) =\sin(2 \pi x) - \frac{1}{\pi^2} \sin(\pi x)
Is that really your question?
 
Ray Vickson said:
Your question seems to be asking for the ##B_n## in
\sum_{n=1}^{\infty} B_n \sin(n \pi x) =\sin(2 \pi x) - \frac{1}{\pi^2} \sin(\pi x)
Is that really your question?

Yesss! I didn't know how to insert the symbols like that, but yes that's exactly my question. Is there any simple way to find Bn? Many thanks
 
JI567 said:
Yesss! I didn't know how to insert the symbols like that, but yes that's exactly my question. Is there any simple way to find Bn? Many thanks
Just write out the first two terms of the summation on the left hand side and see what you get.

Chet
 
Chestermiller said:
Just write out the first two terms of the summation on the left hand side and see what you get.

Chet

Sorry how do i do that? is it just Bn Sin(πx) + Bn sin (2πx)

I just used n =1 and n =2. Is that correct?
 
JI567 said:
Sorry how do i do that? is it just Bn Sin(πx) + Bn sin (2πx)

I just used n =1 and n =2. Is that correct?
No. It's B1sin(πx)+B2sin(2πx).

Now compare that with the right hand side of your equation.

Chet
 
Chestermiller said:
No. It's B1sin(πx)+B2sin(2πx).

Now compare that with the right hand side of your equation.

Chet

So B1 = -1/π square and B2 = 0, right? So do I just take Bn as -1/π square then? Isn't Bn a general constant for all the B values in the summation? I am just confused how two different B values can have the similar Bn value.
 
  • #10
Sorry I meant B2 = 1
 
  • #11
JI567 said:
So do I just take Bn as -1/π square then?
No. You take B1=-1/π2, B2 = 1, B3...B = 0
Isn't Bn a general constant for all the B values in the summation? I am just confused how two different B values can have the similar Bn value.
I don't understand this question.

Chet
 
  • #12
Chestermiller said:
No. You take B1=-1/π2, B2 = 1, B3...B = 0

I don't understand this question.

Chet

You know heat equation solution is in a format of T(x,t) = Bn*sin(nπx)*e^-(nsquare*pi square* t) - T(x). So you are saying I will have one T(x,t) equation with B1 and another T(x,t) equation with B2? Do I add up both the equations together to get a final T(x,t) solution.
 
  • #13
JI567 said:
You know heat equation solution is in a format of T(x,t) = Bn*sin(nπx)*e^-(nsquare*pi square* t) - T(x). So you are saying I will have one T(x,t) equation with B1 and another T(x,t) equation with B2? Do I add up both the equations together to get a final T(x,t) solution.
There should be a summation sign in your equation right in front of the Bn.

You seem very confused. This is not the proper venue to teach you the entire solution approach over again. You need to go back and review your notes and text.

Chet
 
  • #14
O
Chestermiller said:
There should be a summation sign in your equation right in front of the Bn.

You seem very confused. This is not the proper venue to teach you the entire solution approach over again. You need to go back and review your notes and text.

Chet

No I am just confused which format should I present my answer. Do I just put the summation sign infront of Bn and then write when n = 1 bn = -1/pi square. And when n = 2 Bn= 1.
Is that how you present the final answer. Please confirm
 
  • #15
JI567 said:
You know heat equation solution is in a format of T(x,t) = Bn*sin(nπx)*e^-(nsquare*pi square* t) - T(x). So you are saying I will have one T(x,t) equation with B1 and another T(x,t) equation with B2? Do I add up both the equations together to get a final T(x,t) solution.

When you write "nsquare" do you mean n^2? By pi square do you mean pi^2? Where is the summation in front of your nth term? (In text you can just write sum_{n} B_b... if you don't want to try using LaTeX and you don't want to use fancy symbols.
 
  • #16
Yes exactly that's what I mean. And yes there will be the summation sign, apologies. So is that it then? I just write T(x,t) = sum_{n}B_n *sin(nπx)*e^-(n^2*pi^2* t) - T(x). Then I just mention when n =1 and 2 there will be corresponding B values. Will that be the final answer?
 
  • #17
JI567 said:
Yes exactly that's what I mean. And yes there will be the summation sign, apologies. So is that it then? I just write T(x,t) = sum_{n}B_n *sin(nπx)*e^-(n^2*pi^2* t) - T(x). Then I just mention when n =1 and 2 there will be corresponding B values. Will that be the final answer?

Why bother with the summation? You just have two terms, so just writing them out in detail answers the question.
 
  • #18
To the OP: Setting your heat equation problem aside, what you need to understand is that some FS are finite. For example if you want to expand ##f(x) = 5\sin(3x) + 3\sin(4x)## in a half range sine expansion on ##(0,\pi)## you are wanting to write$$
5\sin(3x) + 3\sin(4x) = \sum_{n=1}^\infty b_n \sin(nx) = b_1\sin(x)+b_2\sin(2x) + b_3\sin(3x)+b_4\sin(4x)+...$$As you noticed in your original post, solving for the ##b_n## can be very tedious and requires working the integrals for ##b_3## and ##b_4## separately. Actually, I don't think you got that far in those calculations. But looking at the above equation you can see by inspection that taking ##b_3=5,~b_4=3## and all the other ##b_n=0## makes the two sides identical. The FS for this function has finitely many nonzero terms, and in fact, the function itself is its own FS.

Similarly, in your solution, you will have only a couple of nonzero terms in your FS and consequently won't need any infinite sum in your answer. Just write out the nonzero terms.
 
  • #19
LCKurtz said:
To the OP: Setting your heat equation problem aside, what you need to understand is that some FS are finite. For example if you want to expand ##f(x) = 5\sin(3x) + 3\sin(4x)## in a half range sine expansion on ##(0,\pi)## you are wanting to write$$
5\sin(3x) + 3\sin(4x) = \sum_{n=1}^\infty b_n \sin(nx) = b_1\sin(x)+b_2\sin(2x) + b_3\sin(3x)+b_4\sin(4x)+...$$As you noticed in your original post, solving for the ##b_n## can be very tedious and requires working the integrals for ##b_3## and ##b_4## separately. Actually, I don't think you got that far in those calculations. But looking at the above equation you can see by inspection that taking ##b_3=5,~b_4=3## and all the other ##b_n=0## makes the two sides identical. The FS for this function has finitely many nonzero terms, and in fact, the function itself is its own FS.

Similarly, in your solution, you will have only a couple of nonzero terms in your FS and consequently won't need any infinite sum in your answer. Just write out the nonzero terms.

Alright so my solution will be like this :

T(x,t) = b1sin(πx)*e^-(n^2*pi^2* t)+b2sin(2πx)*e^-(n^2*pi^2* t) - T(x).

Is that correct for the final answer?
 
  • #20
JI567 said:
Alright so my solution will be like this :

T(x,t) = b1sin(πx)*e^-(n^2*pi^2* t)+b2sin(2πx)*e^-(n^2*pi^2* t) - T(x).

Is that correct for the final answer?

No. You have undefined ##n##'s on the right side and undefined ##b_1## and ##b_2## on the left.
 
  • #21
LCKurtz said:
No. You have undefined ##n##'s on the right side and undefined ##b_1## and ##b_2## on the left.

The n's are going to be 1 and 2 respectively. B1 = -1/pie square and b2 = 1. Is that correct now?
 
  • #22
If you wrote that out I think it would finally make sense. Is it correct? Who knows? You never wrote out the heat equation or showed your work getting the solution.
 
  • #23
Ray Vickson said:
∑n=1∞Bnsin(nπx)=sin(2πx)−1π2sin(πx)​
\sum_{n=1}^{\infty} B_n \sin(n \pi x) =\sin(2 \pi x) - \frac{1}{\pi^2} \sin(\pi x)
Is that really your question?

How would I go about finding Bn if the right hand side was instead cos(2πx) - 1/π^2 *(sin(πx)? Can you please tell me. Thanks.
 
  • #24
Ray Vickson said:
Your question seems to be asking for the ##B_n## in
\sum_{n=1}^{\infty} B_n \sin(n \pi x) =\sin(2 \pi x) - \frac{1}{\pi^2} \sin(\pi x)
Is that really your question?

How would I go about finding Bn if the right hand side was instead cos(2πx) - 1/π^2 *(sin(πx)? Can you please tell me. Thanks.
 
  • #25
JI567 said:
How would I go about finding Bn if the right hand side was instead cos(2πx) - 1/π^2 *(sin(πx)? Can you please tell me. Thanks.

You wouldn't. The formula ##f(x) \equiv \sum_{n} B_n \sin(n \pi x)## describes an odd function of ##x##---that is--a function giving ##f(-x) = - f(x)##. Your new function does not have this property, so cannot be expressed in the form you want.
 
  • #26
Ray Vickson said:
You wouldn't. The formula ##f(x) \equiv \sum_{n} B_n \sin(n \pi x)## describes an odd function of ##x##---that is--a function giving ##f(-x) = - f(x)##. Your new function does not have this property, so cannot be expressed in the form you want.

Okay fine. So it will be Summation of An cos (nπx) = cos(2πx) - 1/π^2 *(sin(πx)

Now how will I solve this...Do I really need to integrate or I can compare sides and find coefficient. Please tell me...
 
  • #27
JI567 said:
Okay fine. So it will be Summation of An cos (nπx) = cos(2πx) - 1/π^2 *(sin(πx)

Now how will I solve this...Do I really need to integrate or I can compare sides and find coefficient. Please tell me...
JI567 said:
Okay fine. So it will be Summation of An cos (nπx) = cos(2πx) - 1/π^2 *(sin(πx)

Now how will I solve this...Do I really need to integrate or I can compare sides and find coefficient. Please tell me...

What you wrote is incorrect: the summation will not be ##\sum_n A_n \cos(n \pi x)## and not be ##\sum_n B_n \sin(n \pi x)##, but both.

You really do need to do some reading on these issues; look up Fourier series, and make sure you understand the material before trying to use it. Make sure you go through some of the illustrative examples that will be present in any textbook that treats the subject.
 
  • Like
Likes Chestermiller
  • #28
Ray Vickson said:
What you wrote is incorrect: the summation will not be ##\sum_n A_n \cos(n \pi x)## and not be ##\sum_n B_n \sin(n \pi x)##, but both.

You really do need to do some reading on these issues; look up Fourier series, and make sure you understand the material before trying to use it. Make sure you go through some of the illustrative examples that will be present in any textbook that treats the subject.

No offence, but its easy to advice then actually do. I have tried it enough times already, all the textbook examples have simple initial conditions, I haven't found a single example where it has trigonometric terms in the question and also as initial condition, so its not so easy to understand, specially when I am new to this entire topic. So maybe you can link me some solved examples similar to this question instead of just lecturing if you really want me to do some reading.
 
  • #29
JI567 said:
No offence, but its easy to advice then actually do. I have tried it enough times already, all the textbook examples have simple initial conditions, I haven't found a single example where it has trigonometric terms in the question and also as initial condition, so its not so easy to understand, specially when I am new to this entire topic. So maybe you can link me some solved examples similar to this question instead of just lecturing if you really want me to do some reading.

The idea of examples is that they illustrate a method; it is then up to you to apply the method in situations that are NOT covered in the textbook.

You can find relevant articles yourself; just Google "Fourier Series", and you will find dozens of web pages at various levels of sophistication. YOU choose the ones you want. I have no way of knowing which of the many articles out there are the ones that will "speak to you".
 
Last edited:
  • #30
I tend to agree with Ray. But, maybe you can give us an example of a specific problem you are struggling with (from start to finish, not just the final equation), and we can help you through it. I don't think that the equation you presented in the initial post of this thread is a correct relationship for any heat equation problem that I have ever seen (and I've seen lots of them).

Chet
 
  • #31
Chestermiller said:
I tend to agree with Ray. But, maybe you can give us an example of a specific problem you are struggling with (from start to finish, not just the final equation), and we can help you through it. I don't think that the equation you presented in the initial post of this thread is a correct relationship for any heat equation problem that I have ever seen (and I've seen lots of them).

Chet

Okay like you suggested I have given the whole problem.

Tt = 4Txx + 4 sin(πx)

with 0 < x < 1, x is actually less than and equal too 0, greater than and equal too 1

Boundary is T(0,t) = T(1,t) = 0
Initial condition is T (x,0) = cos (2πx)

So I attempted to find the U(x,t) by U(x,0) = T(x,0) - T(x)

I found T(x) by boundary condition and got -1/π^2 * (sin(πx))

So then I wanted to find U(x,t) by using the summation of An * cos(nπx) + summation of Bn* sin (nπx). So now to find An and Bn there are separate formulas that involves integration but its going to be complex. So i tried comparing coefficients.

So I had cos(2πx) - 1/π^2 * sin(πx) = summation of An*cos(nπx) + summation of Bn * sin(nπx). So my An = 1 and Bn = -1/π^2. Is this correct then?
Ray Vickson said:
The idea of examples is that they illustrate a method; it is then up to you to apply the method in situations that are NOT covered in the textbook.

You can find relevant articles yourself; just Google "Fourier Series", and you will find dozens of web pages at various levels of sophistication. YOU choose the ones you want. I have no way of knowing which of the many articles out there are the ones that will "speak to you".

As for you sir, there is absolutely nothing on the web about a sin function and cosine function for the same equation. I have checked everywhere, even youtube. So please cut me some slack as I don't have experience of solving heat equations for 5 or 10 years. I need a solid example similar to this to understand as I just had lecture for 2 weeks on heat equation. If reading was helpful I wouldn't be asking for help on this forum. Cheers.
 
  • #32
JI567 said:
Okay like you suggested I have given the whole problem.

Tt = 4Txx + 4 sin(πx)

with 0 < x < 1, x is actually less than and equal too 0, greater than and equal too 1

Boundary is T(0,t) = T(1,t) = 0
Initial condition is T (x,0) = cos (2πx)

So I attempted to find the U(x,t) by U(x,0) = T(x,0) - T(x)

I found T(x) by boundary condition and got -1/π^2 * (sin(πx))

I get ##-\frac {4}{\pi^2}\sin(\pi x)##

So then I wanted to find U(x,t) by using the summation of An * cos(nπx) + summation of Bn* sin (nπx).

Where did you get those summations? Did you separate variables and solve the ##X## eigenvalue problem? I don't get any cosine eigenfunctions, so please show your work.

So now to find An and Bn there are separate formulas that involves integration but its going to be complex. So i tried comparing coefficients.
So I had cos(2πx) - 1/π^2 * sin(πx) = summation of An*cos(nπx) + summation of Bn * sin(nπx). So my An = 1 and Bn = -1/π^2. Is this correct then?
No, it isn't. I thought we had cleared this up in post #21. Equating coefficients would give ##A_2=1##, not ##A_n=1## and similarly for the B. But that's assuming your summation was correct, which I don't think it is. Show us your separation of variables steps.
 
  • #33
LCKurtz said:
I get ##-\frac {4}{\pi^2}\sin(\pi x)##
That's not what I get. For the solution at long times, it get
T(x)=+\frac {1}{\pi^2}\sin(\pi x)

Chet
 
  • #34
Chestermiller said:
That's not what I get. For the solution at long times, it get
T(x)=+\frac {1}{\pi^2}\sin(\pi x)

Chet
Yeah, I think my substitution was slightly different than the OP's, so what I am calling T(x) is slightly different. That's not the major issue for the OP though.
 
  • #35
JI567 said:
Okay like you suggested I have given the whole problem.

OK. I can see what you were doing, and you kinda had the right idea.
Tt = 4Txx + 4 sin(πx)

with 0 < x < 1, x is actually less than and equal too 0, greater than and equal too 1

Boundary is T(0,t) = T(1,t) = 0
Initial condition is T (x,0) = cos (2πx)

So I attempted to find the U(x,t) by U(x,0) = T(x,0) - T(x)
This last equation is incorrect. It should be U(x,t)=T(x,t) - T(x,∞)
I assume you are using T(x) to represent T(x,∞)
I found T(x) by boundary condition and got -1/π^2 * (sin(πx))
I get T(x)=+1/π^2 * (sin(πx))
So, ##U(0,t)=cos(2πx)-\frac{1}{π^2}sin(πx)##

Are we together so far?

Chet
 
  • #36
Chestermiller said:
OK. I can see what you were doing, and you kinda had the right idea.

This last equation is incorrect. It should be U(x,t)=T(x,t) - T(x,∞)
I assume you are using T(x) to represent T(x,∞)

I get T(x)=+1/π^2 * (sin(πx))
So, ##U(0,t)=cos(2πx)-\frac{1}{π^2}sin(πx)##

Are we together so far?

Chet

Yeah I am with you. What are the next steps, i am confused there...
 
  • #37
JI567 said:
Okay like you suggested I have given the whole problem.

Tt = 4Txx + 4 sin(πx)

with 0 < x < 1, x is actually less than and equal too 0, greater than and equal too 1

Boundary is T(0,t) = T(1,t) = 0
Initial condition is T (x,0) = cos (2πx)

So I attempted to find the U(x,t) by U(x,0) = T(x,0) - T(x)

I found T(x) by boundary condition and got -1/π^2 * (sin(πx))

So then I wanted to find U(x,t) by using the summation of An * cos(nπx) + summation of Bn* sin (nπx). So now to find An and Bn there are separate formulas that involves integration but its going to be complex. So i tried comparing coefficients.

So I had cos(2πx) - 1/π^2 * sin(πx) = summation of An*cos(nπx) + summation of Bn * sin(nπx). So my An = 1 and Bn = -1/π^2. Is this correct then?As for you sir, there is absolutely nothing on the web about a sin function and cosine function for the same equation. I have checked everywhere, even youtube. So please cut me some slack as I don't have experience of solving heat equations for 5 or 10 years. I need a solid example similar to this to understand as I just had lecture for 2 weeks on heat equation. If reading was helpful I wouldn't be asking for help on this forum. Cheers.

Well, when I Googled "nonhomogeneous heat equation" I got dozens of hits that all go through examples exactly like yours (but sometimes with a general function ##f(x)## or ##F(x,t)## in place of your specific forcing term ##4 \sin(\pi x)##). So, OK, they use ##f(x)## instead of a sin function, but they give detailed formulas that can be applied to any function, and they work out examples from start to finish. Different web pages work out different examples.
 
  • #38
Ray Vickson said:
Well, when I Googled "nonhomogeneous heat equation" I got dozens of hits that all go through examples exactly like yours (but sometimes with a general function ##f(x)## or ##F(x,t)## in place of your specific forcing term ##4 \sin(\pi x)##). So, OK, they use ##f(x)## instead of a sin function, but they give detailed formulas that can be applied to any function, and they work out examples from start to finish. Different web pages work out different examples.

Integrating with f(x) as a function to get Bn or An is way more simpler then actually putting sin function or cos function and trying to integrate. Specially in this one where its cos and sin both combined. I just don't get it and I probably won't unless I actually see it. I know when its cos its an even function so we use just An and when its odd its sin and we use Bn. For this problem both of them are there so I think we need to add An and Bn but I don't know how to integrate or do we even need to integrate, My head is going to burst, I just don't get it.
 
  • #39
In post #12, you were close to having the correct summation, but not quite. I got:
U(x,t)=\sum_{n=1}^∞ B_ne^{-4π^ 2 n^2t}sin(n\pi x)
So, at time t= 0, you need to satisfy:
U(x,0)=\sum_{n=1}^∞ B_nsin(n\pi x)=cos(2πx)-\frac{1}{π^2}sin(πx)
We need to find the infinite set of numbers Bn (n = 1,...,π) such that this equation is satisfied.

Are we still together?

Chet
 
  • #40
Chestermiller said:
In post #12, you were close to having the correct summation, but not quite. I got:
U(x,t)=\sum_{n=1}^∞ B_ne^{-4π^ 2 n^2t}sin(n\pi x)
So, at time t= 0, you need to satisfy:
U(x,0)=\sum_{n=1}^∞ B_nsin(n\pi x)=cos(2πx)-\frac{1}{π^2}sin(πx)
We need to find the infinite set of numbers Bn (n = 1,...,π) such that this equation is satisfied.

Are we still together?

Chet

How did you get the 4 in the exponential term?

And yes I am together with the Bn part, please continue.
 
  • #41
JI567 said:
How did you get the 4 in the exponential term?
First, substitute into the differential equation and see that each term satisfies the differential equation. The 4 comes from the coefficient of Txx.
And yes I am together with the Bn part, please continue.
Now, the next step to determine the Bns is a little new to you and tricky, so you are going to have to bear with me. This is where the "half wave" feature comes in. Even though the problem is only defined over the interval 0<x<1, we are going to make use of the entire interval from -1<x<+1. We are going to extend U(x,0) to the interval -1<x<0 in the following way:

##U(x,0) = -cos(2πx)-\frac{1}{π^2}sin(πx)## (-1<x<0)

##U(x,0) = +cos(2πx)-\frac{1}{π^2}sin(πx)## (0<x<1)

Note that, when we define U(x,0) in this way, U(x,0) is odd function of x, such that U(-x,0)=-U(x,0). As such, it is in perfect mathematical form for representation as a sin(nπx) series, which is also an odd function of x.

Still together?

Chet
 
  • #42
Chestermiller said:
First, substitute into the differential equation and see that each term satisfies the differential equation. The 4 comes from the coefficient of Txx.

Now, the next step to determine the Bns is a little new to you and tricky, so you are going to have to bear with me. This is where the "half wave" feature comes in. Even though the problem is only defined over the interval 0<x<1, we are going to make use of the entire interval from -1<x<+1. We are going to extend U(x,0) to the interval -1<x<0 in the following way:

##U(x,0) = -cos(2πx)-\frac{1}{π^2}sin(πx)## (-1<x<0)

##U(x,0) = +cos(2πx)-\frac{1}{π^2}sin(πx)## (0<x<1)

Note that, when we define U(x,0) in this way, U(x,0) is odd function of x, such that U(-x,0)=-U(x,0). As such, it is in perfect mathematical form for representation as a sin(nπx) series, which is also an odd function of x.

Still together?

Chet

I get the entire odd function approach as I am familiar with it from the wave equation questions. But however for the negative range of x why did you change the sign of cos function only and not the sin function? For the wave equation, I know the negative part in D'alembert is always (x-ct) so you just take it as -f(-x) there but not sure how it works here...
 
  • #43
JI567 said:
I get the entire odd function approach as I am familiar with it from the wave equation questions. But however for the negative range of x why did you change the sign of cos function only and not the sin function?
The sine term is already odd, so I don't need to do anything with it. But cosine is an even function, so, to use the sin(nπx) series to represent it, we have to give it "oddness."

Note that all we really care about is accurately representing U(x,0) over the region from x = 0 to x = 1. By doing what we have done, we are able to get an accurate representation with the sin(nπx) series.

Chet
 
  • #44
Chestermiller said:
The sine term is already odd, so I don't need to do anything with it. But cosine is an even function, so, to use the sin(nπx) series to represent it, we have to give it "oddness."

Note that all we really care about is accurately representing U(x,0) over the region from x = 0 to x = 1. By doing what we have done, we are able to get an accurate representation with the sin(nπx) series.

Chet
Yeah alright makes sense. Continue please, I am with you. next step
 
  • #45
OK. Now we are going to take the equation ##U(x,0)=\sum_{n=1}^∞ B_nsin(n\pi x)## (including the part from x = -1 to x = 0), multiply both sides of it by sin(mπx), and integrate both sides from x = -1 to x = +1. This will enable you to determine each Bm individually, since, for each value of m (where m is a positive integer), only one term in the summation on the right hand side will survive (i.e., be non-zero). Do you feel comfortable doing these integrations? (You need to integrate the cosine term from -1 to 0, and then switch the sign and continue the integration from 0 to +1).

Chet
 
  • #46
Chestermiller said:
OK. Now we are going to take the equation ##U(x,0)=\sum_{n=1}^∞ B_nsin(n\pi x)## (including the part from x = -1 to x = 0), multiply both sides of it by sin(mπx), and integrate both sides from x = -1 to x = +1. This will enable you to determine each Bm individually, since, for each value of m (where m is a positive integer), only one term in the summation on the right hand side will survive (i.e., be non-zero). Do you feel comfortable doing these integrations? (You need to integrate the cosine term from -1 to 0, and then switch the sign and continue the integration from 0 to +1).

Chet

How do you integrate cos(2πx)*sin(mπx)?

I will have this right

-cos(2πx)*sin(mπx)-1/π^2 * sin(πx)* sin(mπx) = summation of Bn*sin(nπx)*sin(mπx)?
 
  • #47
JI567 said:
How do you integrate cos(2πx)*sin(mπx)?
Consider this:
sin(A+B)=sin(A)cos(B)+cos(A)sin(B)
sin(A-B)=sin(A)cos(B)-cos(A)sin(B)
What happens if you add these two equations together?
I will have this right

-cos(2πx)*sin(mπx)-1/π^2 * sin(πx)* sin(mπx) = summation of Bn*sin(nπx)*sin(mπx)?
Yes. That will be what you will be integrating from -1 to 0. You will complete the integral over the full interval by integrating
cos(2πx)*sin(mπx)-1/π^2 * sin(πx)* sin(mπx) = summation of Bn*sin(nπx)*sin(mπx) from 0 to 1.

Chet
 
  • #48
Chestermiller said:
Consider this:
sin(A+B)=sin(A)cos(B)+cos(A)sin(B)
sin(A-B)=sin(A)cos(B)-cos(A)sin(B)
What happens if you add these two equations together?

Yes. That will be what you will be integrating from -1 to 0. You will complete the integral over the full interval by integrating
cos(2πx)*sin(mπx)-1/π^2 * sin(πx)* sin(mπx) = summation of Bn*sin(nπx)*sin(mπx) from 0 to 1.

Chet

Then it just become 2 sin a cos b. But that's not an integral...or do we do 1/2 * integration of sin (a+b) + integration of sin (a-b). But then m is our b here. How can we add or subtract m from 2. I am confused
 
  • #49
JI567 said:
Then it just become 2 sin a cos b. But that's not an integral...or do we do 1/2 * integration of sin (a+b) + integration of sin (a-b). But then m is our b here. How can we add or subtract m from 2. I am confused

Everything you need is in here: http://mathworld.wolfram.com/FourierSeries.html That is what makes Fourier analysis possible
 
  • #50
Ray Vickson said:
Everything you need is in here: http://mathworld.wolfram.com/FourierSeries.html That is what makes Fourier analysis possible

What's this kronecker delta? How do I convert it into actual numbers or simple things such as π because this delta thing is not present in the answers.
 

Similar threads

Back
Top