Numerical solution of Fisher’s equation using finite difference Dr. Sharefa

A numerical method is proposed to approximate the numeric solutions of nonlinear Fisher’s reaction diffusion equation with finite difference method. The method is based on replacing each terms in the Fisher’s equation using finite difference method. The proposed method has the advantage of reducing the problem to a nonlinear system, which will be derived and solved using Newton method. FTCS and CN method will be introduced, compared and tested.


Introduction
The Fisher equation arises in heat and mass transfer, biology, and ecology. It's introduced to describe the spreading of genes [1] has found applications in different fields of research ranging from ecology [2] to plasma physics [3]. Lie symmetry method is applied to analyze Fisher's equation in cylindrical coordinates. Symmetry algebra is found and symmetry invariance is used to reduce the equation to a first order ODE. The first order ODE is further analyzed to obtain exact solution of Fisher's equation in explicit form. In this paper we will not investigate the theoretical methods how to solve the Fisher's equation. Let the integral equation (1) (2) where F is a given (presumably nonlinear) function of u(t, x), f(x) is also a given function, L is a constant and _(t, x) is is the diffusion function. We take t as a time variable and x ∈ [−L,L]. This problem can be transformed to nonlinear PDEs with Dirichlet boundary conditions and exactly we are going to solve the following problem: In the case where F is linear the PDE can an be solved by the separation of variables methods. Here, _ is the diffusion constant. This is a parabolic, nonlinear and nonhomogeneous PDE in two dimensions. In this equation, t plays the role of a time variable and x is a spatial variable; that is, we are going to solve the PDE as an initial value problem. In order to obtain a numeric solution, we will need to supplement the PDE with boundary and initial conditions. However if, as in many of the applications considered in [4], F is nonlinear function then the problem is much more burdensome. It is not usually possible to obtain general analytical traveling wave solutions and one must analyze such problems numerically. Spectral methods (see, for instance, [7,8,9,10,11]) are powerful techniques that we use to numerically solve linear and nonlinear partial differential equations either in their strong or weak forms. Legendre Spectral Collocation Method is used to solve the Fisher's equation, see [12]. In [13], the author solve the Fisher's equation using Petrov-Galerkin finite element method. In [14], some numerical study of Fisher's equation by Adomian's method was proposed. In [15], the author study a nonlinear reactiondiffusion equation for its traveling waves. These methods look very difficult. For this reason, we will focus on a nonlinear PDEs using finite difference methods and we restrict our work in the case where the function _(t, x) = _ constant. This method used in this paper can be applied for any nonlinear function, but here we limit our presentation to the case of Fisher's equation which corresponding to the choice of F(u) = u(1 − u). It was suggested by Fisher as a deterministic version of a stochastic model for the spatial spread of a favored gene in a population. The rest of this paper is organized as follows:In section 2, we present the two method FTCS and CN. In ??, we solve the Fisher's equation using FTSC and we look to it's stability and some remarks about maximum principle will be presented. Section 4, give a comparison between the FTCS and CN methods and their stability. Finally, we conclude.

Approximation
The key step in solving our Fisher's equation numerically using finite difference methods is to replace the derivatives with so-called "finite difference method. Note that the last term on the RHS of previous approximations is just the leading order term in the error; terms with higher powers of h have been omitted. The power of h in the leading error term is called the order of the method. One can give better approximation using more points in previous approximations. The FTCS (Forward time Centered space) is obtained by putting forward time and centered space approximation into the PDE, we get: The BTCS method is obtained by putting backward time and centered space method into the PDE: The Crank-Nicholson method is the average of the FTCS and BTCS: The method used is "centered" because u is evaluated at an equal number of points to the right and left of the point where we want to approximate the derivative. Fig 1, a configuration

Forward time centered-space solution
The time derivative will be replaced with a "forward time" right-oriented method with 2 point. The "forward time" label comes from the fact that we are approximating the time derivative at u(t, x) using a point to the future. Notice that we have denoted the step-size in the time direction by s. The spatial derivative will be approximated with a centered 3 point stencil with step-size h. The FTCS stencil can be solved for u(t + s, x) for any form of the potential F (u (t, x)): We can always calculation the solution u(t, x) at a future time step with knowledge of the field at a previous time step, irregardless of the nature of the nonlinearity in the potential F. This means that the numerical FTCS algorithm to solve our problem is virtually the same as it is for the linear equation. We introduce, some parameter will be used in our method: Figure 2 compare the numerical and the exact solution obtained using Maple. If the initial data u(0, x) = f(x) is nonnegative then the solution of the Fisher's equation remains nonnegative, this is consistent with its use as a density of probability or density of population. Figure 2 show that the maximum principle is satisfied. Indeed, the maximum principle is verified because if the solution changes sign from negative to positive or vice versa at (t0, x0) and if the solution has a nondegenerate minimum at x0 then uxx(t0, x0) > 0. Therefore, the solution cannot involve forward in time into the region u < 0. A more careful argument is required to deal with degenerate minimum. So, a similar argument so that if the initial data f(x) < 1 then the solution remains less than one, i.e. u(t, x) < 1.

Crank Nicholson solution
Here, we denote future field values as: _j = u (t + s, xj) and past field values as j = u (t, xj) Using Then we get Here is an example of the nonlinear system of equations we have to solve at each time step for 30 BMSA Volume 12 It is useful to organize the unknowns into a vector Then, we will linearize the problem by taking where is a guess and is the error in the guess. Expanding to linear order in the error, we obtain: Where

Bulletin of Mathematical Sciences and Applications Vol. 12 31
The matrix J (xk) is the Jacobian of the system. Then, the linear system (6) can be solved for which can then be used to update our guess via One can iterate this process until the distance between the iterates is less than some user defined tolerance. This method is know as a Newton method. Using Newton method to solve nonlinear equations of this type in the process of creating the Crank Nicholson solution. Note that for sufficiently small time steps we expect so a good initial guess for the future field values are just the corresponding past field values.

Bulletin of Mathematical Sciences and Applications Vol. 12 33
Our numerical results can be applied for It's a good application of the strategy proposed in this work. The Crank-Nicolson method is more accurate than FTCS or BTCS. Clearly, something is going very wrong with the FTCS method, while the CN one is returning reasonable results. Experimenting with different N and M for the Crank-Nicholson method convince us that its output for u(t, x) is always bounded and not exponentially diverging. Although all three methods have the same spatial truncation error h2 the better temporal truncation error for the Crank-Nicolson method is big advantage. The Crank-Nicolson scheme is recommended over FTCS and BTCS. One can seek a condition for unstable behavior of FTCS.