Diffusion Equation finding the critical length? I have a $1D$ diffusion equation given by:
$$\frac{\partial}{\partial t}u(x,t) = D\frac{\partial^2}{\partial t^2}u(x,t) + Cu(x,t)$$
with boundary conditions $u \left(\frac{-L}{2},t \right) = u \left (\frac{L}{2},t \right)=0$.
By separation of variables, I have found what I believe is the correct general solution (verify?)
$$u(x,t)=\exp(-\lambda t) \left[A \cos \left( \sqrt{\frac{\lambda+C}{D}}x \right) + B \sin \left( \sqrt{\frac{\lambda+C}{D}} x \right) \right]$$
I have been asked to find the critical length $L$ which is defined as the point before the equation blows up exponentially but after the equation is ultimately quenched. Any hints or answers would be greatly appreciated.
 A: Upon separation of variables assuming $u(x,t)=X(x)T(t)$, we arrive at
$$\frac{T'}{DT} = \frac{X'' + CX}{X} = -\lambda^2$$
So that we've got the system of DE's,
$\begin{cases}
T' + D\lambda^2T=0 \\
X'' + (C+\lambda^2)X=0, X(\frac{-L}{2})=X(\frac{L}{2})=0
\end{cases}
$
If we're careful, we arrive at the solutions:
$T(t) = a_1\exp{(-D\lambda^2 t)}$, and $X(x)=a_2 \sin{x\sqrt{(\lambda^2 + C)}}$
Because we require $X(\frac{L}{2})=0$, we see that $\lambda = \sqrt{\frac{4n^2\pi^2}{L^2} - C}$, $n=1,2,...$.
Thus we arrive to the eigenfunctions $u_{n}(x,t) = A_n \exp{\left(-D\left(\frac{4n^2\pi^2}{L^2}-C \right)t \right)}\sin{\left(\frac{2n\pi}{L}x\right)}$, and so a general solution, after superposition is
$$u(x,t) = \sum_{n=1}^{\infty} A_n \exp{\left(-D\left(\frac{4n^2\pi^2}{L^2}-C \right)t \right)}\sin{\left(\frac{2n\pi}{L}x\right)}$$
In order for solutions not to blow up exponentially, we require that
$$D\left(\frac{4n^2\pi^2}{L^2}-C \right)>0$$
So we need $D>0$ and $\frac{4n^2\pi^2}{L^2}-C>0$. Note that the second condition follows because it is exactly $\lambda^2$, which is always positive anyways, there's no need to consider when both could be negative as a result. Hence we see $$L < \frac{2n\pi}{\sqrt{C}} \text{ and } D>0$$ is the required condition on L (and consequently D)to ensure solutions don't blow up.
