Consider the following diffusion equation: $$\frac{\partial}{\partial t}y(x,t)=D\frac{\partial^2}{\partial x^2}y(x,t)+Cy(x,t)$$ where both $D$ and $C$ are constants
Solve the equation over the interval, $\frac{L}{2}\le x \le \frac{L}{2}$ subjected to the following boundary conditions: $$y(-\frac{L}{2},t)=y(\frac{L}{2},t)=0$$
1) Analytically, determine the critical length of the system ($C,D=1.0$), beyond which always lead to an exponentially increasing solution.
2) Implement a numerical finte difference method in order to solve this equation.
For the analytical part, i tried solving this using the separations of variables:
$$y(x,t)=v(x)q(t)$$ Substitute $C,D=1$ into the diffusion equation and substituting the separation of variable into the diffusion equation and dividing though by $v(x)q(t)$:
$$\frac{1}{q(t)}\frac{\partial q}{\partial t}=\frac{1}{v(x)}\frac{\partial^2v}{\partial x^2}+1$$
I am quite confused at this part, and do not know if this is the correct method to solve this equation, if so, how do i proceed.