Diffusion equation by seperation of variables

saddlepoint
Messages
6
Reaction score
0

Homework Statement



A uniform rod of length l has an initial (at time t = 0) temperature distribution given by u(x, 0) = sin(\frac{πx}{l}), 0 \leq x \leq l.

The temperature u(x, t) satisfies the classical one-dimensional diffusion equation, ut = kuxx

The ends of the rod are perfectly insulated, so ux(0, t) = ux(l, t) = 0.

Find general solution u(x, t) by the method of separation of variables. What happens to the solution as t -> ∞ ? (Do not find the Fourier coefficients other than the one required to answer the last part.)

Homework Equations





The Attempt at a Solution



We have method of Seperation of Variables so set:

u(x, t) = X(x)T(t) so we have XT' = kX''T (by using this with ut = kuxx)

This gives us: \frac{X''}{X} = \frac{T'}{kT} = λ (by separating the variables where λ is a constant)

Looking at X:

we have X'' = Xλ so X'' - Xλ = 0

this means we have \alpha2 = λ and so \alpha = \pm\sqrt{λ}

we require λ < 0, so let λ = -\omega2 and so we now have: \alpha = i\omega

this gives us X(x) = Asin(\omegax) + Bcos(\omegax)

Applying our boundary conditions to X(x) we have:

X' = A\omegacos(\omegax) - B\omegasin(\omegax)

thus X'(0) = A\omega = 0 so we know A=0

and X'(l) = -B\omegasin(\omegal) = 0 so we know sin(\omegal) = 0 and so \omegal = nπ

this means \omega = \frac{nπ}{l}

then finally for X we have that: X(x) = Bcos(\frac{nπx}{l}), n=0,1,2,3,...

Looking at T:

we have \frac{T&#039;}{T} = kλ and integrate to find:

ln|T| = kλt + C so T = Cekλt

and we know that λ = -\omega2 = (-n2π2)/(l2)

Hence we know our General Solution is u(x,t) = X(x)T(t) so

Our General Solution is:

u(x,t) = \sumBncos(\frac{nπx}{l})exp{(-n2π2kt)/(l2)}



Also given an initial condition:

u(x,0) = sin(\frac{πx}{l})

using this, we set t=0 in u(x,t) so we have:

u(x,0) = \sumBncos(\frac{nπx}{l}) = sin(\frac{πx}{l})

so by inspection when n=0, B0 = sin(\frac{πx}{l})

and when n=1,2,3,... we have B1, B2, B3, ... = 0.

Thus our full solution for these boundary conditions and initial conditions is:

u(x,t) = sin(\frac{πx}{l})

__________________________________________________________

Is this all correct what I've done? The reason I'm unsure if I'm correct is due to the last part of the question asking "What happens to the solution when t --> ∞?" as you can see there is no t in the final solution. It also notes "Do not find the Fourier coefficients other than the one required to answer the last part" and I'm not sure what this means or how it effects the question really.

ANY help is very much appreciated! Thanks very much!
 
Physics news on Phys.org
saddlepoint said:

Homework Statement



A uniform rod of length l has an initial (at time t = 0) temperature distribution given by u(x, 0) = sin(\frac{πx}{l}), 0 \leq x \leq l.

The temperature u(x, t) satisfies the classical one-dimensional diffusion equation, ut = kuxx

The ends of the rod are perfectly insulated, so ux(0, t) = ux(l, t) = 0.

Find general solution u(x, t) by the method of separation of variables. What happens to the solution as t -> ∞ ? (Do not find the Fourier coefficients other than the one required to answer the last part.)

Homework Equations





The Attempt at a Solution



We have method of Seperation of Variables so set:

u(x, t) = X(x)T(t) so we have XT' = kX''T (by using this with ut = kuxx)

This gives us: \frac{X&#039;&#039;}{X} = \frac{T&#039;}{kT} = λ (by separating the variables where λ is a constant)

Looking at X:

we have X'' = Xλ so X'' - Xλ = 0

this means we have \alpha2 = λ and so \alpha = \pm\sqrt{λ}

we require λ < 0, so let λ = -\omega2 and so we now have: \alpha = i\omega

this gives us X(x) = Asin(\omegax) + Bcos(\omegax)

Applying our boundary conditions to X(x) we have:

X' = A\omegacos(\omegax) - B\omegasin(\omegax)

thus X'(0) = A\omega = 0 so we know A=0

and X'(l) = -B\omegasin(\omegal) = 0 so we know sin(\omegal) = 0 and so \omegal = nπ

this means \omega = \frac{nπ}{l}

then finally for X we have that: X(x) = Bcos(\frac{nπx}{l}), n=0,1,2,3,...

Several comments here. You have ##\lambda = -\omega^2 < 0## and ##\omega_n = \frac {n\pi} l##. This does not include ##n=0##. The corresponding eigenfunction is ##X_n =
\cos(\frac{n\pi x}{l})##. You do need the subscript on the ##X## and you don't need the ##B## out in front at this stage.

At this point you should check the case ##\lambda = 0##. You will find a nonzero solution ##X_0##.

Looking at T:

we have \frac{T&#039;}{T} = kλ and integrate to find:

ln|T| = kλt + C so T = Cekλt

and we know that λ = -\omega2 = (-n2π2)/(l2)

Hence we know our General Solution is u(x,t) = X(x)T(t) so

No. We would build terms ##u_n(x,t) = X_n(x)T_n(t)## and look for a solution as a sum of those.
Our General Solution is:

u(x,t) = \sumBncos(\frac{nπx}{l})exp{(-n2π2kt)/(l2)}

You also have to check the ##T## equation for when ##\lambda = 0## to see if you get a ##T_0##. This matters because you need to know if your solution includes an ##X_0T_0## term or not.

Also given an initial condition:

u(x,0) = sin(\frac{πx}{l})

using this, we set t=0 in u(x,t) so we have:

u(x,0) = \sumBncos(\frac{nπx}{l}) = sin(\frac{πx}{l})

Where does this sum start? ##n=1## or ##n=0##. See above about checking the case ##\lambda = 0##.

so by inspection when n=0, B0 = sin(\frac{πx}{l})

and when n=1,2,3,... we have B1, B2, B3, ... = 0.

Thus our full solution for these boundary conditions and initial conditions is:

u(x,t) = sin(\frac{πx}{l})

No, this is as wrong as it can be. You haven't shown there is a ##B_0## and even if you had, it would be constant, not a function of ##x##. At this point you need to expand a sine term in a half range cosine series. Given your instructions not to calculate the coefficients you don't need, I think the problem is mis-stated or mistyped. If your initial temperature distribution was ##\cos(\frac{πx}{l})## you would have only one term in the FS. You need to ask your teacher about that.
__________________________________________________________

Is this all correct what I've done? The reason I'm unsure if I'm correct is due to the last part of the question asking "What happens to the solution when t --> ∞?" as you can see there is no t in the final solution.

What happened to the exponentials in your general solution above (in red)? Also note I have removed your huge bold type which is irritating and violates the forum rules.
 
saddlepoint said:

Homework Statement



A uniform rod of length l has an initial (at time t = 0) temperature distribution given by u(x, 0) = sin(\frac{πx}{l}), 0 \leq x \leq l.

The temperature u(x, t) satisfies the classical one-dimensional diffusion equation, ut = kuxx

The ends of the rod are perfectly insulated, so ux(0, t) = ux(l, t) = 0.

Find general solution u(x, t) by the method of separation of variables. What happens to the solution as t -> ∞ ? (Do not find the Fourier coefficients other than the one required to answer the last part.)

Homework Equations





The Attempt at a Solution



We have method of Seperation of Variables so set:

u(x, t) = X(x)T(t) so we have XT' = kX''T (by using this with ut = kuxx)

This gives us: \frac{X&#039;&#039;}{X} = \frac{T&#039;}{kT} = λ (by separating the variables where λ is a constant)

Looking at X:

we have X'' = Xλ so X'' - Xλ = 0

this means we have \alpha2 = λ and so \alpha = \pm\sqrt{λ}

we require λ < 0, so let λ = -\omega2 and so we now have: \alpha = i\omega

this gives us X(x) = Asin(\omegax) + Bcos(\omegax)

Applying our boundary conditions to X(x) we have:

X' = A\omegacos(\omegax) - B\omegasin(\omegax)

thus X'(0) = A\omega = 0 so we know A=0
and X'(l) = -B\omegasin(\omegal) = 0 so we know sin(\omegal) = 0 and so \omegal = nπ

this means \omega = \frac{nπ}{l}

then finally for X we have that: X(x) = Bcos(\frac{nπx}{l}), n=0,1,2,3,...

Looking at T:

we have \frac{T&#039;}{T} = kλ and integrate to find:

ln|T| = kλt + C so T = Cekλt

and we know that λ = -\omega2 = (-n2π2)/(l2)

Hence we know our General Solution is u(x,t) = X(x)T(t) so

Our General Solution is:

u(x,t) = \sumBncos(\frac{nπx}{l})exp{(-n2π2kt)/(l2)}

So far this is correct, but you need to give limits for the sum:
<br /> u(x,t) = \sum_{n=0}^\infty B_n \cos\left( \frac{n\pi x}l\right) \exp\left(-\frac{n^2 \pi^2 kt}{l^2}\right).

Also given an initial condition:

u(x,0) = sin(\frac{πx}{l})

using this, we set t=0 in u(x,t) so we have:

u(x,0) = \sumBncos(\frac{nπx}{l}) = sin(\frac{πx}{l})

so by inspection when n=0, B0 = sin(\frac{πx}{l})

and when n=1,2,3,... we have B1, B2, B3, ... = 0.

That's not how you determine the B_n, which are constants; having one of them turn out to be a function of x immediately suggests an error.

To find the B_n for u(x,0) = f(x) you would use <br /> \int_0^l B_n \cos^2\left(\frac{n\pi x}l\right)\,dx = \int_0^l f(x) \cos\left(\frac{n\pi x}{l}\right)\,dx, but here the question asks you not to do that for general n.

The reason I'm unsure if I'm correct is due to the last part of the question asking "What happens to the solution when t --> ∞?" as you can see there is no t in the final solution. It also notes "Do not find the Fourier coefficients other than the one required to answer the last part" and I'm not sure what this means or how it effects the question really.

Look at the general solution again: <br /> u(x,t) = \sum_{n=0}^\infty B_n \cos\left( \frac{n\pi x}l\right) <br /> \exp\left(-\frac{n^2 \pi^2 kt}{l^2}\right).<br /> What is \lim_{t \to \infty} \exp\left(-\frac{n^2 \pi^2 kt}{l^2}\right)? Is it the same for all n \geq 0?
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top