Heat equation problem so confusing

  • #51
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
Yes. This is correct.
cos(2πx)sin(mπx)=\frac{sin((m+2)πx)+sin((m-2)πx)}{2}
So you can integrate that easily.

Please note that m and n are just dummy indices, and that, in the end, we will be able to change m back to n (including on the B's). So please, just bear with it.

You can use the same kind of trigonometic identities on the B summation terms, except there, they will involve cos(m+n)πx and cos(m-n)πx. See if you can do that.

Chet
 
Physics news on Phys.org
  • #52
Chestermiller said:
Yes. This is correct.
cos(2πx)sin(mπx)=\frac{sin((m+2)πx)+sin((m-2)πx)}{2}
So you can integrate that easily.

Please note that m and n are just dummy indices, and that, in the end, we will be able to change m back to n (including on the B's). So please, just bear with it.

You can use the same kind of trigonometic identities on the B summation terms, except there, they will involve cos(m+n)πx and cos(m-n)πx. See if you can do that.

Chet

I am confused.

I thought we just integrate the -cos(2πx)*sin(mπx)-1/π^2 * sin(πx)* sin(mπx) and then compare the coeffecients on the other side with Bn's m. Do I have to integrate summation of Bn side as well?

And to check, integration of ( sin(m+2)πx)/2 equals to (-cos(m+2)πx)/(2(m+2)π)

Is that correct? x values I can use -1 to 0 for this one but what about the m values? Do I just leave it as m?
 
  • #53
JI567 said:
I am confused.

I thought we just integrate the -cos(2πx)*sin(mπx)-1/π^2 * sin(πx)* sin(mπx) and then compare the coeffecients on the other side with Bn's m. Do I have to integrate summation of Bn side as well?
Yes. But you will find that, for any value of m, all the integrated terms are zero except when m = n.
And to check, integration of ( sin(m+2)πx)/2 equals to (-cos(m+2)πx)/(2(m+2)π)
Yes, but don't forget to apply the integration limits.
Is that correct? x values I can use -1 to 0 for this one but what about the m values? Do I just leave it as m?
Yes.

You need to perform the following integrations:
\int_{-1}^{+1}{\frac{(cos((m-n)\pi x)-cos((m+n)\pi x))}{2}dx}
\int_{-1}^{0}{\frac{(sin((m+2)\pi x)+sin((m-2)\pi x))}{2}dx}+\int_{0}^{+1}{\left(-\frac{(sin((m+2)\pi x)+sin((m-2)\pi x))}{2}\right)dx}
\int_{-1}^{+1}{\frac{(cos((m-1)\pi x)-cos((m+1)\pi x))}{2}dx}
Don't forget that, when m = n, ##cos((m-n)\pi x)=1## and ##sin((m-n)\pi x)=0##
For the first integral, you need to consider the two cases m≠n and m = n.
For the second integral, you need to consider the two cases, m≠2 and m = 2.
For the third integral, you need to consider the two cases, m≠1 and m = 1.

Chet
 
Last edited:
  • #54
Chestermiller said:
Yes. But you will find that, for any value of m, all the integrated terms are zero except when m = n.

Yes, but don't forget to apply the integration limits.

Yes.

You need to perform the following integrations:
\int_{-1}^{+1}{\frac{(cos((m-n)\pi x)-cos((m+n)\pi x))}{2}dx}
\int_{-1}^{0}{\left(-\frac{(sin((m+2)\pi x)+sin((m-2)\pi x))}{2}\right)dx}+\int_{0}^{+1}{\left(\frac{(sin((m+2)\pi x)+sin((m-2)\pi x))}{2}\right)dx}
\int_{-1}^{+1}{\frac{(cos((m-1)\pi x)-cos((m+1)\pi x))}{2}dx}
Don't forget that, when m = n, ##cos((m-n)\pi x)=1## and ##sin((m-n)\pi x)=0##
For the first integral, you need to consider the two cases m≠n and m = n.
For the second integral, you need to consider the two cases, m≠2 and m = 2.
For the third integral, you need to consider the two cases, m≠1 and m = 1.

Chet

Only the second integral makes complete sense. Is the first integral representing the integration of the Bn summation side of sin(nπx)*sin(mπx)? And the third integral the integration of sin(mπx)*-1/π^2 *(sin(πx))?

Then, why are we splitting it up to two parts for the second integral? Shouldn't the 0 to 1 range of integral for the second one be for the positive sin function, because remember we were doing positive cos for the 0 to 1 range and when we convert cos by angle identity we can't get negative sin. So I am really confused there.

And about these "cases", so let's say for the first integral. Do I need to integrate with respect to x then put limits -1 to +1? And after doing that I will end up with an equation with no x terms. Only then do I put m equal to n and put m as m and n as n to get two different equations? Should I add up the two equations or what do I do...

Explain please...
 
Last edited by a moderator:
  • #55
JI567 said:
Only the second integral makes complete sense. Is the first integral representing the integration of the Bn summation side of sin(nπx)*sin(mπx)?
Yes.
And the third integral the integration of sin(mπx)*-1/π^2 *(sin(πx))?
Yes.
Then, why are we splitting it up to two parts for the second integral?
Because of what we did with the cos(2πx) to make U(x,0) an odd function.

Shouldn't the 0 to 1 range of integral for the second one be for the positive sin function, because remember we were doing positive cos for the 0 to 1 range and when we convert cos by angle identity we can't get negative sin.
Yes. I made a mistake here. I should have had a negative sign on the integral from -1 to 0, and + sign from 0 to 1. I was hoping you wouldn't catch that error until I had a chance to change it. But your understanding is so good now that you were able to spot the error. After I finish this response, I'm going to go back and make the correction.

And about these "cases", so let's say for the first integral. Do I need to integrate with respect to x then put limits -1 to +1? And after doing that I will end up with an equation with no x terms. Only then do I put m equal to n and put m as m and n as n to get two different equations?
You can do it before you integrate and apply the integration limits or afterwards. Doing it before is easier, and doing it after requires you to take a limit.
Should I add up the two equations or what do I do...
Explain please...
Just do the integrations first and see what you get, OK.

Chet
 
  • #56
Regarding the first integration, see if you can show that:

\int_{-1}^{+1}{\left(\sum_{n=1}^∞{B_nsin(n\pi x)}\right)sin(m\pi x)dx}=B_m

Note that the right hand side has no n's in it. The integration has picked out and isolated the coefficient of the mth term of the summation Bm.

Chet
 
  • #57
Chestermiller said:
Regarding the first integration, see if you can show that:

\int_{-1}^{+1}{\left(\sum_{n=1}^∞{B_nsin(n\pi x)}\right)sin(m\pi x)dx}=B_m

Note that the right hand side has no n's in it. The integration has picked out and isolated the coefficient of the mth term of the summation Bm.

Chet

I have just done the first integration. let me know if its correct...

Keeping the Bn term out as its a constant so just integrating sin terms

So integration of sin(nπx)*sinπ(mπx) when m≠n after applying limits 1 and -1 is (sin((m-n)π))/((m-n)π) - (sin((m+n)π))/((m+n)π)

and integration of the same thing when m = n after applying limits 1 and -1 is 2- (sin(2nπ))/(nπ)

For the above one I first equated m = n when it was in cos form and then integrated to apply limits.

Should I add them up now? I have no idea how does this gives Bm...
 
  • #58
JI567 said:
I have just done the first integration. let me know if its correct...

Keeping the Bn term out as its a constant so just integrating sin terms

So integration of sin(nπx)*sinπ(mπx) when m≠n after applying limits 1 and -1 is (sin((m-n)π))/((m-n)π) - (sin((m+n)π))/((m+n)π)

and integration of the same thing when m = n after applying limits 1 and -1 is 2- (sin(2nπ))/(nπ)

For the above one I first equated m = n when it was in cos form and then integrated to apply limits.

Should I add them up now? I have no idea how does this gives Bm...
This is not what I get for the integral. I get integral=1 for n = m and I get integral=0 for n ≠ m. Don't forget when you do the integration that sin(kπ) = 0 for any integer value of k.

Chet
 
  • #59
Chestermiller said:
This is not what I get for the integral. I get integral=1 for n = m and I get integral=0 for n ≠ m. Don't forget when you do the integration that sin(kπ) = 0 for any integer value of k.

Chet

Oh yeah, my integration is fine then. Even I get the same as yours cause I got all sin terms. So for m=n i get 1. How do I change it to Bm now?
 
  • #60
JI567 said:
Oh yeah, my integration is fine then. Even I get the same as yours cause I got all sin terms. So for m=n i get 1. How do I change it to Bm now?
Well, if every term in the sum integrates to zero except the m'th term, and the integral of the sines in the m'th term integrate to 1, then all you are left with is 1 times the coefficient of the m'th term, which is Bm.

Now that you know all that, you should immediately be able to determine the value of the third integral. What is it when m =1 ? What is it when m ≠ 1?

Chet
 
  • #61
Chestermiller said:
Well, if every term in the sum integrates to zero except the m'th term, and the integral of the sines in the m'th term integrate to 1, then all you are left with is 1 times the coefficient of the m'th term, which is Bm.

Now that you know all that, you should immediately be able to determine the value of the third integral. What is it when m =1 ? What is it when m ≠ 1?

Chet

Hold on I am getting confused again. Why did we multiply Bn with sin(mπx) again? I mean what was the need of multiplication, i haven't seen this any example of Fourier series till now. How did you even know we have to multiply with sin(mπx) and not cos(mπx)? Lastly, is Bm and Bn the same thing?
 
  • #62
JI567 said:
Hold on I am getting confused again. Why did we multiply Bn with sin(mπx) again? I mean what was the need of multiplication, i haven't seen this any example of Fourier series till now. How did you even know we have to multiply with sin(mπx) and not cos(mπx)? Lastly, is Bm and Bn the same thing?
This is the standard method for determining the coefficients in a Fourier Series to represent a function. Have you studied Fourier Series yet? We don't need the cosine terms, because we know that our function is odd. The integration isolates the m'th coefficient of the series. Since the we are summing over the n's, the n's are just a counting index (and are nothing special). But our procedure picks out the m'th B in the series and automatically delivers it to us independent of all the other B's. This is very powerful stuff. How else would you determine the B's (particularly with that cosine term present in U(x,0), the function we are trying to develop the Fourier Series for)?

Chet
 
  • #63
Okay, so why do we need the m'th coefficient? What does this mth term actually tell us about the coefficient Bn? why are we doing these two types of cases. Sorry about the questions but I just really need to get to the bottom of this Fourier series thing. I just know that the Bn and An coefficients are usually determined at the end like

for odd n values the Bn or An is something
then for even n values the Bn or An is something else
or sometimes only when n = 1 Bn or An is something else

Are you implying the entire m and n case based on the above? Or this is just something different you did and at the end you will still find Bn for odd and even number of n's?
 
  • #64
Chestermiller said:
This is the standard method for determining the coefficients in a Fourier Series to represent a function. Have you studied Fourier Series yet? We don't need the cosine terms, because we know that our function is odd. The integration isolates the m'th coefficient of the series. Since the we are summing over the n's, the n's are just a counting index (and are nothing special). But our procedure picks out the m'th B in the series and automatically delivers it to us independent of all the other B's. This is very powerful stuff. How else would you determine the B's (particularly with that cosine term present in U(x,0), the function we are trying to develop the Fourier Series for)?

Chet
Okay, so why do we need the m'th coefficient? What does this mth term actually tell us about the coefficient Bn? why are we doing these two types of cases. Sorry about the questions but I just really need to get to the bottom of this Fourier series thing. I just know that the Bn and An coefficients are usually determined at the end like

for odd n values the Bn or An is something
then for even n values the Bn or An is something else
or sometimes only when n = 1 Bn or An is something else

Are you implying the entire m and n case based on the above? Or this is just something different you did and at the end you will still find Bn for odd and even number of n's?
 
  • #65
Chestermiller said:
Well, if every term in the sum integrates to zero except the m'th term, and the integral of the sines in the m'th term integrate to 1, then all you are left with is 1 times the coefficient of the m'th term, which is Bm.

Now that you know all that, you should immediately be able to determine the value of the third integral. What is it when m =1 ? What is it when m ≠ 1?

Chet

As for the third integral, its the same isn't it? For m ≠ 1 integral is 0 and for m = 1 integral is 1. So we will be just left with (-1/π^2)*1 for the integration of -1/π^2 (sin(πx))*(sin(mπx))
 
  • #66
Yikes. Let's take a step backwards. Suppose you had a known function f(θ) on the interval from θ =-π to θ=+π, and you wanted to express f(θ) in terms of a Fourier Series (assuming that f(θ) is neither an even nor an odd function of θ). How would you do it?

Chet
 
  • #67
JI567 said:
As for the third integral, its the same isn't it? For m ≠ 1 integral is 0 and for m = 1 integral is 1. So we will be just left with (-1/π^2)*1 for the integration of -1/π^2 (sin(πx))*(sin(mπx))
Yes.
 
  • #68
Chestermiller said:
Yikes. Let's take a step backwards. Suppose you had a known function f(θ) on the interval from θ =-π to θ=+π, and you wanted to express f(θ) in terms of a Fourier Series (assuming that f(θ) is neither an even nor an odd function of θ). How would you do it?

Chet

I have encountered this type of question in wave. I had to define f(0) as f(0) for + π and -f(-0) for -π in order to make it odd so that I could use D'alembert solution. I actually need to show you another wave question regarding that. I have done it and I could work back to match the initial and boundary conditions but still if you could check it .

As for Fourier series I assume we need to multiply the f(0) with sin and then integrate to get Bn to get Fourier sine series... and f(0) multiply with cos then integrate to get An for Fourier cosine series...
 
  • #69
JI567 said:
As for Fourier series I assume we need to multiply the f(0) with sin and then integrate to get Bn to get Fourier sine series... and f(0) multiply with cos then integrate to get An for Fourier cosine series...

Do you not recognize this as exactly what we have been doing? Suppose I wrote θ = πx and

B_1sinθ+B_2sin2θ+B_3sin3θ+B_4sin4θ+...=f(θ)
with

f(θ)=-cos2θ-\frac{1}{π^2}sinθ for -π<θ<0

f(θ)=+cos2θ-\frac{1}{π^2}sinθ for 0<θ<+π

Would you then be able to get the coefficients B1, B2, B3, B4, ... using the technique you described above?

Chet
 
  • #70
Chestermiller said:
Do you not recognize this as exactly what we have been doing? Suppose I wrote θ = πx and

B_1sinθ+B_2sin2θ+B_3sin3θ+B_4sin4θ+...=f(θ)
with

f(θ)=-cos2θ-\frac{1}{π^2}sinθ for -π<θ<0

f(θ)=+cos2θ-\frac{1}{π^2}sinθ for 0<θ<+π

Would you then be able to get the coefficients B1, B2, B3, B4, ... using the technique you described above?

Chet

For getting b1, b2,b3 and b4 do I just multiply the f(0) with sin(nπx) and integrate 4 times? with n being 1,2,3 and 4 consecutively?

My question is for integration of Bn the general formula is 2/L* integration of f(0)*sin(nπx) to give it the oddness. So as the sin function is already there why did we still multiply with another sin(mπx)?
 
  • #71
JI567 said:
For getting b1, b2,b3 and b4 do I just multiply the f(0) with sin(nπx) and integrate 4 times? with n being 1,2,3 and 4 consecutively?
Yes. This is one way to do it. Or you could just treat n as an algebraic parameter, and do it only once.
My question is for integration of Bn the general formula is 2/L* integration of f(0)*sin(nπx) to give it the oddness. So as the sin function is already there why did we still multiply with another sin(mπx)?
These questions indicate to me that you have not yet mastered the basics of Fourier series. You need to go back and review your notes and your textbook. Also, another good reference is section 9.2 of Advanced Engineering Mathematics by Kreizig. You are not going to be able to complete the solution to this problem until you better understand how to apply Fourier Series. Unfortunately, Physics Forums is not an appropriate venue for a complete tutorial on Fourier Series.

Chet
 
  • #72
Chestermiller said:
Yes. This is one way to do it. Or you could just treat n as an algebraic parameter, and do it only once.

These questions indicate to me that you have not yet mastered the basics of Fourier series. You need to go back and review your notes and your textbook. Also, another good reference is section 9.2 of Advanced Engineering Mathematics by Kreizig. You are not going to be able to complete the solution to this problem until you better understand how to apply Fourier Series. Unfortunately, Physics Forums is not an appropriate venue for a complete tutorial on Fourier Series.

Chet

Okay I will check it out but however for the continuation of this question after doing the three integrations you told me to do we find Bm = something. After that do we just write U(x,t) as Bm*e^-4n^2*π^2t*sin(mπx) ? For Bm subbing the value that we obtained from integrations. Is that it? Or there are more things needed to do to find Bn or Bm?
 
  • #73
JI567 said:
Okay I will check it out but however for the continuation of this question after doing the three integrations you told me to do we find Bm = something. After that do we just write U(x,t) as Bm*e^-4n^2*π^2t*sin(mπx) ? For Bm subbing the value that we obtained from integrations. Is that it? Or there are more things needed to do to find Bn or Bm?
It's a summation, but the counting index in the summation should be either m or n; both should not appear simultaneously in the terms of the summation.

Chet
 
  • #74
Okay so the final solution to the Heat equation will be T(x,t) = U(x,t) - T(x,infinity) right? With U(x,t) being summation of Bn*e^-4n^2*π^2t*sin(mπx) when n = 1 below the summation sign and with an infinity symbol at top of the summation sign. Is that correct?
 
  • #75
JI567 said:
Okay so the final solution to the Heat equation will be T(x,t) = U(x,t) - T(x,infinity) right? With U(x,t) being summation of Bn*e^-4n^2*π^2t*sin(mπx) when n = 1 below the summation sign and with an infinity symbol at top of the summation sign. Is that correct?

Ignore the n and m terms. I am just going to write it down as n everywhere.
 
  • #76
JI567 said:
Okay so the final solution to the Heat equation will be T(x,t) = U(x,t) - T(x,infinity) right? With U(x,t) being summation of Bn*e^-4n^2*π^2t*sin(mπx) when n = 1 below the summation sign and with an infinity symbol at top of the summation sign. Is that correct?
No, that m should be an n, and that should be a plus sign in front of T(x,infinity).
 
  • #77
Chestermiller said:
No, that m should be an n, and that should be a plus sign in front of T(x,infinity).

Alright cheers. I will get back to you with the final working out steps and final answer to the heat equation. Please check if that's correct
 
  • #78
Chestermiller said:
Yes. But you will find that, for any value of m, all the integrated terms are zero except when m = n.

Yes, but don't forget to apply the integration limits.

Yes.

You need to perform the following integrations:
\int_{-1}^{+1}{\frac{(cos((m-n)\pi x)-cos((m+n)\pi x))}{2}dx}
\int_{-1}^{0}{\frac{(sin((m+2)\pi x)+sin((m-2)\pi x))}{2}dx}+\int_{0}^{+1}{\left(-\frac{(sin((m+2)\pi x)+sin((m-2)\pi x))}{2}\right)dx}
\int_{-1}^{+1}{\frac{(cos((m-1)\pi x)-cos((m+1)\pi x))}{2}dx}
Don't forget that, when m = n, ##cos((m-n)\pi x)=1## and ##sin((m-n)\pi x)=0##
For the first integral, you need to consider the two cases m≠n and m = n.
For the second integral, you need to consider the two cases, m≠2 and m = 2.
For the third integral, you need to consider the two cases, m≠1 and m = 1.

Chet

Chestermiller said:
No, that m should be an n, and that should be a plus sign in front of T(x,infinity).

For the second integration, isn't it just going to be 0? I was doing the m = 2 and then i saw it can be written as -sin(4πx) + sin(0πx) which can be written as 0 for both, is that correct? Also when m ≠2 even there its going to be 0 right as for any sin(π)*(m-n) or (m+n) its always going to be 0, so entire second integral is 0, is that correct?
 
  • #79
So I am just left with Bn = -1/π^2. That's all right? I don't need to determine anything else right? any other coefficient ...
 
  • #80
Chestermiller said:
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

Okay I did it here. So I got Bn by

2 ## \int_0^1 (cos(2πx) - \frac {1} {π^2} \ ##sin(πx)) * sin(nπx)

L was just 1.

We know integration of cos(mπx)*sin(nπx) is always 0 so just ignore that. Then integration of sin(πx)*sin(nπx) is 0 for when n ≠1 and when n =1 the final integration value is -## \frac {1} {π^2} \ ##.

So at the end for Bn we have that when n = 1, Bn = -## \frac {2} {π^2} \ ##. And if n otherwise then Bn = 0.

Can you please confirm if I am correct so far? Thanks.
 
  • #81
JI567 said:
Okay I did it here. So I got Bn by

2 ## \int_0^1 (cos(2πx) - \frac {1} {π^2} \ ##sin(πx)) * sin(nπx)

L was just 1.

We know integration of cos(mπx)*sin(nπx) is always 0 so just ignore that. Then integration of sin(πx)*sin(nπx) is 0 for when n ≠1 and when n =1 the final integration value is -## \frac {1} {π^2} \ ##.

So at the end for Bn we have that when n = 1, Bn = -## \frac {2} {π^2} \ ##. And if n otherwise then Bn = 0.

Can you please confirm if I am correct so far? Thanks.
The integral of cos(2πx)sin(nπx) is not equal to zero for any odd value of n for your integration limits.

Chet
 
Last edited:
  • #82
Cos(2πx)sin(nπx) = ## \frac {(sin(n+2)πx)+ (sin(n-2)πx)} {2} \ ##

If m is let's say a even of 4 then it becomes ## \frac {1} {2} \ ##((sin(6πx) + sin(2πx)) which = 0 and if m is let's say an odd of 3 then it comes ## \frac {1} {2} \ ##( sin(5πx) + sin(πx)) which = 0 as well. Am I missing something here cause I can't see how it can not equal to 0. Can you please tell...
 
  • #83
JI567 said:
Cos(2πx)sin(nπx) = ## \frac {(sin(n+2)πx)+ (sin(n-2)πx)} {2} \ ##

If m is let's say a even of 4 then it becomes ## \frac {1} {2} \ ##((sin(6πx) + sin(2πx)) which = 0 and if m is let's say an odd of 3 then it comes ## \frac {1} {2} \ ##( sin(5πx) + sin(πx)) which = 0 as well. Am I missing something here cause I can't see how it can not equal to 0. Can you please tell...
When were you planning on performing the integration?

Chet
 
  • #84
Chestermiller said:
When were you planning on performing the integration?

Chet

I thought I could just cancel the sin terms of as they equal to 0 on their own but well I will integrate and see now. I should just integrate for the limits 0 to 1 right?
 
  • #85
JI567 said:
I thought I could just cancel the sin terms of as they equal to 0 on their own but well I will integrate and see now. I should just integrate for the limits 0 to 1 right?
Sure.
 
  • #86
Okay so for the odd n integration of cos(2πx)*sin(nπx) after putting the limits I get a relationship of 2( ## \frac {1} {2((n+2)π)} \ ## + ## \frac {1} {2((n-2)π)} \ ##). Is this correct?
 
  • #87
JI567 said:
Okay so for the odd n integration of cos(2πx)*sin(nπx) after putting the limits I get a relationship of 2( ## \frac {1} {2((n+2)π)} \ ## + ## \frac {1} {2((n-2)π)} \ ##). Is this correct?
I'm have to check it later, but it certainly looks close. But at least reduce to common denominators and factor.

Chet
 
  • #88
okay after reducing it becomes

## \frac {1} {π} \ ## ( ## \frac {1} {n+2} \ ##+ ## \frac {1} {n-2} \ ##)

Let me know whenever you have checked it...
 
  • #89
JI567 said:
okay after reducing it becomes

## \frac {1} {π} \ ## ( ## \frac {1} {n+2} \ ##+ ## \frac {1} {n-2} \ ##)

Let me know whenever you have checked it...
Reduce to least common denominator? Otherwise, OK.
 
  • #90
## \frac {1} {π} \ ## ( ## \frac {2n} {n^2-4} \ ##)...please don't say I need to reduce more... so only when n = 1 my Bn will be the result of 2 ## \int_0^1 (cos(2πx) - \frac {1} {π^2} \ ##sin(πx)) * sin(nπx). When n = any other odd numbers except for 1 then Bn will be the result of 2 ## \int_0^1 (cos(2πx) \ ## sin(nπx). For n otherwise Bn = 0. Is this correct...?
 
  • #91
JI567 said:
## \frac {1} {π} \ ## ( ## \frac {2n} {n^2-4} \ ##)
Yes. Nicely done.
so only when n = 1 my Bn will be the result of 2 ## \int_0^1 (cos(2πx) - \frac {1} {π^2} \ ##sin(πx)) * sin(nπx). When n = any other odd numbers except for 1 then Bn will be the result of 2 ## \int_0^1 (cos(2πx) \ ## sin(nπx). For n otherwise Bn = 0. Is this correct...?

So,

##B_1= -\frac{4}{3\pi} - \frac {1} {π^2} \ ##

##B_n=\frac {4} {π} \left(\frac {n} {n^2-4}\right)## for all odd n≥3

##B_n=0## for all even n.

Chet
 
  • #92
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))

Chestermiller said:
Yes. Nicely done.So,

##B_1= -\frac{4}{3\pi} - \frac {1} {π^2} \ ##

##B_n=\frac {4} {π} \left(\frac {n} {n^2-4}\right)## for all odd n≥3

##B_n=0## for all even n.

Chet

So for this heat equation, can the final solution be written like this

when n = 1
T(x,t) = (-## \frac {4} {3π} \ ## - ## \frac {1} {π^2} \ ##) ## \ e^{-4π^2t} \ ## sin(πx) + ## \frac {1} {π^2} \ ## sin(πx)

and for any odd n greater than or equal to 3

T(x,t) = ((## \frac {4} {π} \ ## ( ## \frac {n} {n^2-4} \ ##)) ## \ e^{-4n^2π^2t} \ ## sin(nπx) + ## \frac {1} {π^2} \ ## sin(πx)

and for all even n

T(x,t) = ## \frac {1} {π^2} \ ## sin(πx)
 
  • #93
Not even close. I'll get back to you later.

Chet
 
  • #94
Here is the results you obtained rendered into a solution:

T(x,t)=\frac{sinπx}{π^2}-(\frac{4}{3\pi} + \frac {1} {π^2})e^{-4π^2t}sinπx+\frac{4}{π}\frac{3}{5}e^{-36π^2t}sin(3πx)+\frac{4}{π}\frac{5}{21}e^{-100π^2t}sin(5πx)+...
Rearranging this in a little different way gives:
T(x,t)=\frac{1}{π^2}(1-e^{-4π^2t})sinπx+\frac{4}{π}\sum_{k=1}^∞\frac{(2k-1)e^{-4(2k-1)^2π^2t}}{(2k-1)^2-4}sin((2k-1)πx)
Can you see how that works?

Chet
 
  • #95
Chestermiller said:
Here is the results you obtained rendered into a solution:

T(x,t)=\frac{sinπx}{π^2}-(\frac{4}{3\pi} + \frac {1} {π^2})e^{-4π^2t}sinπx+\frac{4}{π}\frac{3}{5}e^{-36π^2t}sin(3πx)+\frac{4}{π}\frac{5}{21}e^{-100π^2t}sin(5πx)+...
Rearranging this in a little different way gives:
T(x,t)=\frac{1}{π^2}(1-e^{-4π^2t})sinπx+\frac{4}{π}\sum_{k=1}^∞\frac{(2k-1)e^{-4(2k-1)^2π^2t}}{(2k-1)^2-4}sin((2k-1)πx)
Can you see how that works?

Chet

Oh I see...I added up each U(x,t) to the T(x) separately that's why and totally forgot about the summation thing for odd n. That makes sense. Cheers! However shouldn't the last equation be

T(x,t)=\frac{1}{π^2}(1-e^{-4π^2t}-\frac {4π} {3} e^{-4π^2t})sinπx+\frac{4}{π}\sum_{k=1}^∞\frac{(2k-1)e^{-4(2k-1)^2π^2t}}{(2k-1)^2-4}sin((2k-1)πx)
 
  • #96
JI567 said:
Oh I see...I added up each U(x,t) to the T(x) separately that's why and totally forgot about the summation thing for odd n. That makes sense. Cheers! However shouldn't the last equation be

T(x,t)=\frac{1}{π^2}(1-e^{-4π^2t}-\frac {4π} {3} e^{-4π^2t})sinπx+\frac{4}{π}\sum_{k=1}^∞\frac{(2k-1)e^{-4(2k-1)^2π^2t}}{(2k-1)^2-4}sin((2k-1)πx)
No. Then the summation would have to be from k = 2. I purposely wrote it in this form so that the term outside the summation would represent the separate effect of the heat generation, and the summation would represent the separate effect of the initial condition.

Chet
 
  • #97
Chestermiller said:
No. Then the summation would have to be from k = 2. I purposely wrote it in this form so that the term outside the summation would represent the separate effect of the heat generation, and the summation would represent the separate effect of the initial condition.

Chet

Okay cheers. One question outside solving problems. How in actual engineering does wave equation and heat equation help? How do I use these lengthy solution of equations for like making machines or something.
 
  • #98
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) = sin (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 wrote it like U(x,0)= - 1/π^2 * sin(πx) + sin(2πx) = B1 sin(πx) + B2sin(2πx) so B1 = -1/π^2 and B2 = 1 and Bn =0 for n otherwise

Can I then write the final solution for this heat equation as

T(x,t) = U(x,t) + T(x)
T(x,t) = ## \frac {1} {π^2} \ ## (1- ## \ e^{-4π^2t} \ ##) sin(πx)+ ## \ e^{-16π^2t} sin(2πx) \ ##

is this correct? please check...
 
  • #99
No way. What happened to all the other terms in the summation? Plus, there should be no terms containing sin(2πx). Just write out the terms in the result I gave in post #94.

Chet
 
  • #100
Chestermiller said:
No way. What happened to all the other terms in the summation? Plus, there should be no terms containing sin(2πx). Just write out the terms in the result I gave in post #94.

Chet

The one is post 94 was different initial condition which was cos(2πx). This is exactly the same question as of post 94 but the initial conditions in the previous post if you see is now sin(2πx). That's why the solution is different and thus the term with sin(2πx). Do you still think its wrong?
 

Similar threads

Back
Top