# Stability of a finite-difference scheme for the reaction-diffusion equation

I currently need to solve numerically the following reaction-diffusion equation:

$$\partial_tu=\partial^2_xu+u-u^2$$

For this purpose, I use the following numerical scheme (Crank-Nicolson??): $$\frac{u(x,t+\delta t)-u(x,t)}{\delta t} = \frac{1}{2(\delta x)^2} \left[u(x+\delta x,t+\delta t)-2u(x,t+\delta t)+u(x-\delta x,t+\delta t)+u(x+\delta x,t)-2u(x,t)+u(x-\delta x,t)\right] + u(x,t)-u^2(x,t)$$

How can I investigate the stability of this scheme?

• This is not truly Crank-Nicolson, as that it the trapezoidal method in time and would require $u-u^2$ to translate to $\frac12(u(x,t)−u(x,t)^2+u(x,t+δt)−u(x,t+δt)^2)$. This then requires a non-linear solver for the time step. The solution is close to the value of the Euler step or some other extrapolation of previous steps. – Dr. Lutz Lehmann Oct 6 at 6:15

Your discretization is correct but it's not the simplest one. I recommend to try the simplest one and if you find out it's not stable or doesn't give you desired accuracy, switch to the more advanced ones. I prefer this scheme cause it doesn't need to introduce linear system solvers into the implementation and maybe more efficient:

$$\partial^{2}_{x} u(x,t) = \frac{u^{t}_{x+\delta x}+u^{t}_{x-\delta x} - 2 u^{t}_{x}}{\delta x^{2}}$$

So, finally your update equation is:

$$u^{t+\delta t}_{x} = u^{t}_{x} + \delta t (\frac{u^{t}_{x+\delta x}+u^{t}_{x-\delta x} - 2 u^{t}_{x}}{\delta x^{2}} + u^{t}_{x} - (u^{t}_{x})^{2})$$

For stability, you should play around with a couple of $$\delta t$$ and $$\delta x$$ but for more detailed analysis I refer you to here: Linear Stability Analysis of Reaction-Diffusion Systems

• The discretization I used is from the Crank - Nicolson scheme. So I don't think it is wrong. – Lê Dũng Oct 2 at 16:40
• For the link you provided, I think it is for the investigation of the stability of the homogeneous states of the original continuous reaction-diffusion equation (i.e., not the discretization scheme). – Lê Dũng Oct 4 at 7:13
• The equation you state is basically the "fisher equation", also called fisher-KKP equation. That might help in researching appropriate schemes. – MPIchael Oct 4 at 8:36
• @MPIchael Thank you very much. Indeed I know that it is the FKPP equation. However, since I tried to search for general parabolic case, the searching result is diffused. Your suggestion is nice. – Lê Dũng Oct 4 at 13:59
• One should note that your discretization has order one in both directions, while a properly executed Crank-Nicolson has order two. – Dr. Lutz Lehmann Oct 6 at 6:16