1. ## Pde

Assume a solution fo the form $u(x,t) = X(x)T(t)$ to the modified diffusion equation $u_t - Du_{xx} -\alpha u = 0$. First show that the equation seperates and find th general solution for X(x) and T(t). Next assuming that D>0, $\alpha \geq 0$ L>0, solve the boundary value problem
$u_t-Du_{xx}-\alpha u = 0$ for all $0 \leq x \leq L, t\geq 0$
$u(0,t) = u(L,t) = 0,$ for all $t \geq 0$
$u(x,0) = sin(\frac{\pi x}{L}) + sin(\frac{2 \pi x}{L})$
Finally characterise the difference between the solutions for $\alpha \geq \frac{D \pi^2}{L^2}$ and $\alpha \leq \frac{D \pi^2}{L^2}$

So $\frac{T'}{T} = D\frac{X''}{X} + \alpha = C \qquad (C \text{ constant})$
This gives us:
(1) $X''=\frac{C-\alpha}{D}X$
(2) $T' = CT$
Now we need to evaluate these for different values of C: (C=0,C>0,C<0)

C=0
Equation (1) gives...
(3) $X'' + \frac{\alpha}{D}X = 0$
Let $X = e^{\lambda x} \Rightarrow X'' = \lambda^{2}e^{\lambda x} = \lambda^{2} X$
So (3) becomes $\lambda^{2} X + \frac{\alpha}{D} X = 0 \Rightarrow \lambda = \pm i\sqrt{\frac{\alpha}{D}}$
Therefore, $X(x) = A\cos \Big(x\sqrt{\frac{\alpha}{D}}\Big) + B\sin \Big(x\sqrt{\frac{\alpha}{D}}\Big)$
Then
$u(0,t) = 0 \Rightarrow A=0$
$u(L,t)=0 \Rightarrow B\sin \Big(L\sqrt{\frac{\alpha}{D}}\Big) = 0 \Rightarrow \sin \Big(L\sqrt{\frac{\alpha}{D}}\Big) = 0 \Rightarrow L\sqrt{\frac{\alpha}{D}} = n\pi \quad ,n \in \mathbb{Z}$

$X(x) = B\sin \Big(x{\frac{n \pi}{L}}\Big)$

hence

For C=0, T(t) = constant. Because if C=0, then T'=Ct ==> T'=0

$u(x,t)=B\sin(\frac{n\pi x}{L})$

Moving to try the next step:
if $C > 0 = p^2$
$T' = p^2T$
$T' - p^2T= 0$
setting $T = e^{\lambda t}$
$\lambda e^{\lambda t} - p^2 e^{\lambda t}$
clearly $\lambda = p^2$
$X'' = (\frac{p^2 - \alpha}{D}) X$
setting $X = e^{\lambda x}$
$\lambda^2 e^{\lambda x} - (\frac{p^2 - \alpha}{D}) e^{\lambda x}$
clearly $\lambda = \pm \sqrt{ \frac{ p^2 - \alpha}{D}}$
Thus
$A e^{x \sqrt{ \frac{ p^2 - \alpha}{D}}} + Be^{-x \sqrt{ \frac{ p^2 - \alpha}{D}}}$
as before
$u(0,t) = 0 \Rightarrow A=-B$
$u(L,t)=0 \Rightarrow (A e^{L \sqrt{ \frac{ p^2 - \alpha}{D}}} - Ae^{-L \sqrt{ \frac{ p^2 - \alpha}{D}}}). e^{p^2 t}$

$u(L,t)=0 \Rightarrow A\Bigg(\exp\Big(L\sqrt{\frac{p^{2}-\alpha}{D}}\Big) - \exp\Big(L\sqrt{\frac{p^{2}-\alpha}{D}}\Big)\Bigg) = 0 \Rightarrow A=0 \Rightarrow B=0$
So here we get the trivial solution for C>0

so the last part is the bit I am unsure on:

if $C < 0 = -p^2$
$T' = -p^2T$
$T' + p^2T= 0$
setting $T = e^{\lambda t}$
$\lambda e^{\lambda t} + p^2 e^{\lambda t}$
clearly $\lambda = -p^2$
$X'' = (\frac{-p^2 - \alpha}{D}) X$
setting $X = e^{\lambda x}$
$\lambda^2 e^{\lambda x} + (\frac{p^2 + \alpha}{D}) e^{\lambda x}$
clearly $\lambda = \pm i \sqrt{ \frac{ p^2 + \alpha}{D}}$
Thus
$X(x) = A cos (x \sqrt{ \frac{ p^2 + \alpha}{D}}) + B sin (x \sqrt{ \frac{ p^2 + \alpha}{D}})$
as before
$u(0,t) = 0 \Rightarrow A=0$
$u(L,t)=0 \Rightarrow B sin (L \sqrt{ \frac{ p^2 + \alpha}{D}}) = 0 \Rrightarrow sin(L \sqrt{ \frac{ p^2 + \alpha}{D}}) =0 \Rightarrow L \sqrt{ \frac{ p^2 + \alpha}{D}} = n \pi$
$X(x) = B sin ( \frac{x n \pi}{L}$ which is the same as C = 0
$p^2 = (-\alpha +D(\frac{ n \pi }{L})^2)$
$T = C e^{(\alpha -D(\frac{ n \pi }{L})^2)t}$
Finally it says:
Finally characterise the difference between the solutions for $\alpha \geq \frac{D \pi^2}{L^2}$ and $\alpha \leq \frac{D \pi^2}{L^2}$
$\alpha$ only turns in the equation for T if $\alpha > \frac{D \pi^2}{L^2}$ then the function will tend to grow exponentially if $\alpha = \frac{D \pi^2}{L^2}$ then the function will tend to be sinusoidal due to the $X(x) = B sin ( \frac{x n \pi}{L})$ component if $\alpha < \frac{D \pi^2}{L^2}$ it will decay exponentially.
Is what I've said here sufficient (and correct?)

2. Hi

The only thing I noticed is that the solutions does not seem to respect the condition
Originally Posted by Bazman
$u(x,0) = sin(\frac{\pi x}{L}) + sin(\frac{2 \pi x}{L})$
which is quite strange as I didn't find any mistake. (it should gives us the value of $n$...)

3. I got the same concern .

I've shown it seperates and found the general solutions.

I've also solved for the first two boundary conditions but don't know how to incorporate the third one anyone get any idea?

Baz