Diffusion equation by seperation of variables

253 Views Asked by At

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

The temperature $u(x, t)$ satisfies the classical one-dimensional diffusion equation, $u_t = ku_{xx}$.

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

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

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 $u_t = ku_{xx}$)

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

Looking at $X$:

we have $X'' = X\lambda$ so $X'' - X\lambda = 0$

this means we have $\alpha^2 = \lambda$ and so $\alpha = \pm\sqrt{\lambda}$

we require $\lambda < 0$, so let $\lambda = -\omega^2$ and so we now have: $\alpha = i\omega$

this gives us $X(x) = A\sin(\omega x) + B\cos(\omega x)$

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

$X' = A\omega\cos(\omega x) - B\omega\sin(\omega x)$

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

and $X'(l) = -B\omega\sin(\omega l) = 0$ so we know $\sin(\omega l) = 0$ and so $\omega l = n\pi$

this means $\omega = \frac{n\pi}{l}$

then finally for $X$ we have that: $X(x) = B\cos(\frac{n\pi x}{l})$, for $n=0,1,2,3,\ldots$

Looking at $T$:

we have $\frac{T'}{T} = k\lambda$ and integrate to find:

$\ln|T| = k\lambda t + C$ so $T = Ce^{k\lambda t}$

and we know that $\lambda = -\omega^2 = -\frac{n^2\pi^2}{l^2}$

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

Our General Solution is:

$$u(x,t) = \sum_{n=0}^\infty B_n\cos\left(\frac{n\pi x}{l}\right) \exp\left(-k\frac{n^2\pi^2}{l^2}t\right)$$

Also given an initial condition:

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

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

$u(x,0) = \sum_{n=0}^\infty B_n\cos(\frac{n\pi x}{l}) = \sin(\frac{\pi x}{l})$

so by inspection when $n=0$, $B_0 = \sin(\frac{\pi x}{l})$

and when $n=1,2,3,\ldots$ we have $B_1, B_2, B_3, \ldots = 0$.

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

$$u(x,t) = \sin(\frac{\pi 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!

2

There are 2 best solutions below

0
On

No, the last part is not correct, because $B_0$ is a constant and cannot depend on $x$.

Your Fourier expansion is relative to a $2l$ large interval (remember $T=2\pi/\omega$), and you have an even expansion (only cosines), so you should extend by even parity your initial condition to $[-l,0]$.

0
On

The problem is that your initial conditions doesn't fit your boundary condition.

$u(x,0) = f(x) = \sin(\frac{\pi x}{l})$ as initial condition.

Neumann boundary conditions are $u_x(0,t) = u_x(l,t) = 0$.

But $f'(x) = \frac{\pi}{l}cos(\frac{\pi x}{l}) \rightarrow f'(0) \neq 0$.

I'm trying to find a solution for nearly same problem, but I have no idea by now.