Heat equation problem so confusing

Click For Summary
The discussion revolves around solving a heat equation problem involving Fourier series, specifically finding the coefficients Bn for the function f(x) = sin(2πx) - (1/π²)sin(πx). Participants express confusion over the integration process required to derive Bn, particularly when dealing with sine functions and the presence of n in the integrals. Clarifications are provided about the need for a summation sign in the equation and the distinction between different B values for specific n values. The conversation highlights the importance of understanding Fourier series and suggests reviewing foundational material to grasp the concepts better. Ultimately, the participants are encouraged to write out their solutions clearly, focusing on the non-zero terms rather than an infinite summation.
  • #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?
 
Physics news on Phys.org
  • #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...?
 

Similar threads

  • · Replies 20 ·
Replies
20
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K