Introduction

Fisher [1] introduced Fisher’s equation to investigate the propagation of a virile gene in an infinite long habitat. The equation is found to be consistent with all possible velocities of advance above a certain lower limit and is represented as follows:

$$\begin{aligned} u_t= \nu u_{xx}+\rho f(u(x,t)),x\in (-\infty ,\infty ), \quad t>0. \end{aligned}$$
(1)

Here, \(\nu\) is the coefficient of diffusion and \(\rho\) is reaction term. This equation consists of linear diffusion term \(u_{xx}\) and nonlinear multiplication term f(u(xt)). This equation also describes the approximate behavior of neutron population in nuclear reactions [2, 3] in which neutron multiplication takes place in such a way that it is a nonlinear function of neutron population. Fisher’s equation is also used to model flame propagation [4] in any medium. Fisher’s equation is used to study biological invasion in which we can study migration and population habits of a variety of biological species. Fisher’s equation also has applications in autocatalytic chemical reactions [5] and branching Brownian motion processes [6]. It is used to describe Belousov–Zhabotinsky (BZ) reaction in non-scalar models in excitable media [7]. The medium represented by (1) has two homogeneous stationary states, \(u=0\) and \(u=1\), and is referred as bistable medium.

There are a number of methods to solve Fisher’s equation analytically and numerically. Ablowitz and Zepetella studied explicit solutions of Fisher’s equation [8]. Al-Khaled [9] presented a sinc collocation method to study numerical solutions of nonlinear reaction diffusion Fisher’s equation. Mittal and Kumar applied wavelet Galerkin method [10], while Olmos and Shizgal [11] applied pseudo-spectral method to get numerical solutions of Fisher’s equation. Some other numerical methods may be studied in [12,13,14]. A Petrov–Galerkin finite-element method has been presented by Tang and Weber [15]. Twizell et al., proposed implicit and explicit finite-difference algorithms to get numerical solutions of Fisher’s equation. Gazdag and Canosa [16] applied accurate space derivative method. An alternating group explicit iterative method has been applied by Evans and Sahimi [17]. Mittal and Arora [18] developed an efficient B-spline scheme to solve Fisher equation.

B-spline functions have emerged as powerful and popular tools in the field of boundary and initial value problems, image processing, and approximation theory. B-splines have been applied to solve linear and nonlinear partial differential equations. In the proposed fourth-order method, B-spline collocation is used to solve Fisher’s equation. Earlier work on B-spline collocation method uses second-order approximation for double derivative and fourth-order approximation for single derivative. In this work, we have improved approximation for double derivative by taking one more term in Taylor series expansion. Therefore, the approximations for single and double derivatives are of fourth order.

Lots of spline based numerical methods have been developed to solve partial differential equations. B-spline differential quadrature method and B-spline collocation methods have been applied to deal with different kinds of problems arising in various areas of science and engineering. Cubic B-spline collocation method has been used by Goh et al. [19] to study one-dimensional heat and advection diffusion equations. Kadalbajoo and Arora [20] obtained numerical solutions of singular perturbation problems using B-spline collocation method. Dag and Saka [21] applied B-spline collocation method to study equal width equation. Mittal [22] used B-splines to get numerical solutions of coupled reaction diffusion systems. Wave equations have been studied by Mittal and Bhatia [23] using modified cubic B-spline functions. Trigonometric B-splines [24] and exponential cubic B-splines [25] have been used by Zahra and Dag, respectively, to study different types of partial differential equations. Korkmaz et al., studied shock waves and sinusoidal disturbance of Burgers’ equation by quartic B-spline method [26]. Tamsir et al., applied an algorithm based on exponential modified cubic B-spline differential quadrature method for nonlinear Burgers’ equation [27]. Shukla et al. [28] studied B-spline differential quadrature method to study three-dimensional problems.

Table 1 Absolute errors of Example 3 with \(N=101, \Delta t=0.1\)
Table 2 Maximum absolute errors(\(L_{\infty }\) error ) of Example 3 with \(N=40, \Delta t=0.00001\) and \(\rho =2000\)
Table 3 Comparison of maximum absolute errors (\(L_{\infty }\) error ) of Example 4

Rest of the paper is framed as follows. B-spline functions and their properties have been discussed in “Cubic B-splines and properties”. “Implementation of the method” contains description of the numerical method. Stability of the method is discussed in “Stability of the scheme” which is followed by “Results and discussion” having four numerical experiments on important problems. “Conclusion” concludes the outcomes and findings of the research work.

Cubic B-splines and properties

A B-spline is a spline function that has minimal support with respect to given degree smoothness and domain partition. We consider a uniform partition of the domain \(a\le x \le b\) by the knots \(x_j\), \(j=0,1, 2 \ldots N\), such that \(x_{j}-x_{j-1}=h\) is the length of each interval. The cubic B-spline functions are defined as follows:

$$\begin{aligned} B_j(x)=\frac{1}{h^3} {\left\{ \begin{array}{ll} (x-x_{j-2})^3 & x\in [x_{j-2},x_{j-1}),\\ (x-x_{j-2})^3-4(x-x_{j-1})^3, & x\in [x_{j-1},x_j),\\ (x_{j+2}-x)^3-4(x_{j+1}-x)^3, & x \in [x_{j},x_{j+1}),\\ (x_{j+2}-x)^3 & x\in [x_{j+1},x_{j+2}),\\ 0 & \text{otherwise} \end{array}\right. } \end{aligned}$$
(2)

where \(\big \{B_{-1}(x),B_0(x),B_1(x),B_2(x), \ldots ,B_N(x),B_{N+1}(x)\big \}\) forms a basis over the considered interval.

In cubic B-spline collocation method, we approximate exact solution u(xt) by S(xt) in the form:

$$\begin{aligned} S(x,t)=\displaystyle \sum _{j=-1}^{N+1} c_j(t)B_j(x), \end{aligned}$$
(3)

where \(c_j(t)\)’s are time-dependent quantities which we determine from the boundary conditions and collocation from the differential equation. We assume that the approximate solution S(xt) satisfies following interpolatory and boundary conditions:

$$\begin{aligned} S(x_j,t)= & u(x_j,t), \quad 0 \le j\le N\end{aligned}$$
(4)
$$\begin{aligned} S^{''}(x_j,t)= & u^{''}(x_j,t)-\frac{1}{12}h^2u^{(4)}(x_j,t), \quad j=0,N. \end{aligned}$$
(5)

If u(xt) is sufficiently smooth and S(xt) be the unique cubic spline interpolant satisfying above end conditions then we have from [31]:

$$\begin{aligned} S^{'}(x_j,t)= & u^{'}(x_j,t)+O(h^4), \quad 0\le j \le N\end{aligned}$$
(6)
$$\begin{aligned} S^{''}(x_j,t)= & u^{''}(x_j,t)-\frac{1}{12}h^2u^{(4)}(x_j,t)+O(h^4), \quad 0 \le j \le N \end{aligned}$$
(7)

The approximate values S(xt) and its first-order derivatives at the knots are defined using finite difference and Taylor expansions as follows:

$$\begin{aligned} u^{(4)}(x_j,t)= & \frac{S^{''}(x_{0},t)-5S^{''}(x_{1},t)+4S^{''}(x_{2},t)-S^{''}(x_{3},t)}{h^2}+O(h^2),\quad j=0\end{aligned}$$
(8)
$$\begin{aligned} u^{(4)}(x_j,t)= & \frac{S^{''}(x_{j-1},t)-2S^{''}(x_{j},t)+S^{''}(x_{j+1},t)}{h^2}+O(h^2), \quad 1 \le j \le N-1\end{aligned}$$
(9)
$$\begin{aligned} u^{(4)}(x_j,t)= & \frac{S^{''}(x_{n},t)-5S^{''}(x_{n-1},t)+4S^{''}(x_{n-2},t)-S^{''}(x_{n-3},t)}{h^2}+O(h^2),\quad j=N. \end{aligned}$$
(10)

Using (8)–(10) in (6)–(7), we get

$$\begin{aligned} u^{'}(x_j,t)= & S^{'}(x_j,t)+O(h^4), \quad 0 \le j \le N\end{aligned}$$
(11)
$$\begin{aligned} u^{''}(x_0,t)= & \frac{14S^{''}(x_{0},t)-5S^{''}(x_{1},t)+4S^{''}(x_{2},t)-S^{''}(x_{3},t)}{12}+O(h^4), \quad \ j=0\end{aligned}$$
(12)
$$\begin{aligned} u^{''}(x_j,t)= & \frac{S^{''}(x_{j-1},t)+10S^{''}(x_{j},t)+S^{''}(x_{j+1},t)}{12}+O(h^4), \quad 1 \le j \le N-1\end{aligned}$$
(13)
$$\begin{aligned} u^{''}(x_N,t)= & \frac{14S^{''}(x_{N},t)-5S^{''}(x_{N-1},t)+4S^{''}(x_{N-2},t)-S^{''}(x_{N-3},t)}{12}+O(h^4), \quad j=N \end{aligned}$$
(14)

(12)–(14) can be written as

$$\begin{aligned} u^{''}(x_0,t)= & \frac{14 \sum _{j=-1}^{N+1} c_j(t)B^{''}_j(x_0)-5 \sum _{j=-1}^{N+1} c_j(t)B^{''}_j(x_1)+4 \sum _{j=-1}^{N+1} c_j(t)B^{''}_j(x_2)- \sum _{j=-1}^{N+1} c_j(t)B^{''}_j(x_3)}{12}\end{aligned}$$
(15)
$$\begin{aligned} u^{''}(x_j,t)= & \frac{\sum _{j=-1}^{N+1} c_j(t)B^{''}_j(x_{j-1})+10 \sum _{j=-1}^{N+1} c_j(t)B^{''}_j(x_j)+ \sum _{j=-1}^{N+1} c_j(t)B^{''}_j(x_{j+1})}{12}, \quad 1 \le j \le N-1\end{aligned}$$
(16)
$$\begin{aligned} u^{''}(x_N,t)= & \frac{14 \sum _{j=-1}^{N+1} c_j(t)B^{''}_j(x_n)-5 \sum _{j=-1}^{N+1} c_j(t)B^{''}_j(x_{N-1})+4 \sum _{j=-1}^{N+1} c_j(t)B^{''}_j(x_{N-2})- \sum _{j=-1}^{N+1} c_j(t)B^{''}_j(x_{N-3})}{12},\quad j=N. \end{aligned}$$
(17)

Using (2)–(3), (15)–(17) can be further simplified to get

$$\begin{aligned} u^{''}(x_0,t)= & \frac{14c_{-1}-33c_0+28c_1-14c_2+6c_3-c_4}{2h^2}\end{aligned}$$
(18)
$$\begin{aligned} u^{''}(x_j,t)= & \frac{c_{j-2}+8c_{j-1}-18c_j+8c_{j+1}+c_{j+2}}{2h^2}\end{aligned}$$
(19)
$$\begin{aligned} u^{''}(x_N,t)= & \frac{14c_{N+1}-33c_{N}+28c_{N-1}-14c_{N-2}+6c_{N-3}-c_{N-4}}{2h^2}. \end{aligned}$$
(20)

We will use these formulae in the next section.

Implementation of the method

We discretize Eq. (1) by Crank Nicolson scheme to get

$$\begin{aligned} \frac{u^{n+1}-u^n}{\Delta t}=\nu \frac{u_{xx}^{n+1}+u_{xx}^n}{2}+\rho \frac{[((u(1-u)^{({n})}+(u(1-u))^{({n+1})}]}{2}. \end{aligned}$$
(21)

Separating the terms of (n)th and (n + 1)th time levels, we get

$$\begin{aligned} u^{n+1}\left( 1-\frac{\rho \Delta t}{2}+\rho \Delta t u^{(n)}\right) - \frac{\nu \Delta t u^{(n+1)}_{xx}}{2}=u^{(n)}\left( 1+\frac{\rho \Delta t}{2}\right) +\frac{\nu \Delta t u^{(n)}_{xx}}{2}. \end{aligned}$$
(22)

For \(j=0\)

$$\begin{aligned}&(c^{n+1}_{-1}+4c^{n+1}_0+c^{n+1}_1)\left( 1-\frac{\rho \Delta t}{2}+\rho \Delta t u^{(n)}\right) -\frac{\nu \Delta t}{4h^2} (14c^{n+1}_{-1}-33c^{n+1}_0+28c^{n+1}_1-14c^{n+1}_2+6c^{n+1}_3-c^{n+1}_4)\nonumber \\&\quad =(c^{n}_{-1}+4c^{n}_0+ c^{n}_1)\left( 1+\frac{\rho \Delta t}{2}\right) +\frac{\nu \Delta t}{4h^2} (14c^{n}_{-1}-33c^{n}_0+28c^{n}_1-14c^{n}_2+6c^{n}_3-c^{n}_4) \end{aligned}$$
(23)

we may write \(s_1c^{n+1}_{-1}+s_2c^{n+1}_0+s_3c^{n+1}_1+s_4c^{n+1}_2+s_5c^{n+1}_3+s_6c^{n+1}_4=v_1c^{n}_{-1}+v_2c^{n}_0+v_3c^{n}_1+v_4c^{n}_2+v_5c^{n}_3+v_6c^{n}_4.\) For \(1 \le j \le N-1\)

$$\begin{aligned}&(c^{n+1}_{j-1}+4c^{n+1}_{j}+c^{n+1}_{j+1})\left( 1-\frac{\rho \Delta t}{2}+\rho \Delta t u^{(n)}\right) -\frac{\nu \Delta t}{4h^2} (c^{n+1}_{j-2}+8c^{n+1}_{j-1}-18^{n+1}c_j+8c^{n+1}_{j+1}+c^{n+1}_{j+2})\nonumber \\&\quad =(c^{n}_{j-1}+4c^{n}_{j}+ c^{n}_{j+1})\left( 1+\frac{\rho \Delta t}{2}\right) +\frac{\nu \Delta t}{4h^2} (c^{n}_{j-2}+8c^{n}_{j-1}-18c^{n}_j+8c^{n}_{j+1}+c^{n}_{j+2})\end{aligned}$$
(24)
$$\begin{aligned} -x_1c^{n+1}_{j-2}+x_2c^{n+1}_{j-1}+x_3c^{n+1}_{j}+x_4c^{n+1}_{j+1}-x_1c^{n+1}_{j+2}= x_1c^{n}_{j-2}+x_5c^{n}_{j-1}+x_6c^{n}_{j}+x_7c^{n}_{j+1}+x_1c^{n}_{j+2} \end{aligned}$$
(25)

for \(j=N,\) we have

$$\begin{aligned}&(c^{n+1}_{N-1}+4c^{n+1}_{N}+c^{n+1}_{N+1})\left( 1-\frac{\rho \Delta t}{2}+\rho \Delta t u^{(n)}\right) -\frac{\nu \Delta t}{4h^2} (14c^{n+1}_{N+1}-33c^{n+1}_N+28c^{n+1}_{N-1}-14c^{n+1}_{N-2}+6c^{n+1}_{N-3}-c^{n+1}_{N-4})\nonumber \\&\quad =(c^{n}_{N-1}+4c^{n}_{N}+c^{n}_{N+1})\left( 1+\frac{\rho \Delta t}{2}\right) +\frac{\nu \Delta t}{4h^2} ((14c^{n}_{N+1}-33c^{n}_N+28c^{n}_{N-1}-14c^{n}_{N-2}+6c^{n}_{N-3}-c^{n}_{N-4}) \end{aligned}$$
(26)

which gives

$$\begin{aligned} t_1c^{n+1}_{N-4}+t_2c^{n+1}_{N-3}+t_3c^{n+1}_{N-2}+t_4c^{n+1}_{N-1}+t_5c^{n+1}_{N}+t_6c^{n+1}_{N+1} = b_N. \end{aligned}$$
(27)

Thus, we get the following system:

$$\begin{aligned} AC^{n+1}=BC^{n} \end{aligned}$$
(28)

where \(C=[c_{-1},c_0,c_1,c_2...c_{N},c_{N+1}]^T\) \(A=\begin{pmatrix} s_1 &{} s_2 &{} s_3 &{} s_4 &{} s_5&{} s_6 &{} &{} &{}\\ -x_1 &{} x_2 &{} x_3 &{} x_4 &{}-x_1 &{} &{} &{} &{}\\ &{}-x_1 &{} x_2 &{} x_3 &{} x_4 &{}-x_1 &{} &{} &{} \\ .. &{} .. &{} .. &{} .. &{} .. &{} .. &{} ..&{} &{}\\ &{}&{}&{}&{}-x_1 &{} x_2 &{} x_3 &{} x_4 &{}-x_1 \\ &{} &{} &{} t_1&{}t_2 &{} t_3&{} t_4 &{} t_5 &{} t_6\\ \end{pmatrix}\) and \(B=\begin{pmatrix} v_1 &{} v_2 &{} v_3 &{} v_4 &{} v_5&{} v_6 &{} &{} &{}\\ x_1 &{} x_5 &{} x_6 &{} x_7 &{}x_1 &{} &{} &{} &{}\\ &{}x_1 &{} x_5 &{} x_6 &{} x_7 &{}x_1 &{} &{} &{} \\ .. &{} .. &{} .. &{} .. &{} .. &{} .. &{} ..&{} &{}\\ &{}&{}&{}&{}x_1 &{} x_5 &{} x_6 &{} x_7 &{}x_1 \\ &{} &{} &{} e_1&{}e_2 &{} e_3&{} e_4 &{} e_5 &{} e_6\\ . \end{pmatrix}\) We have \(N+1\) equations in \(N+3\) unknowns. It may be observed that \(c_{-1}\) and \(c_{N+1}\) can be eliminated with the help of Dirichlet or Neumann’s boundary conditions to get \(N+1\) equations in \(N+1\) unknowns. System obtained on eliminating \(c_{-1}\) and \(c_{N+1}\) can be solved at any desired time level starting with the initial vector \([c^{(0)}_{0},c^{(0)}_{1},c^{(0)}_{2} \ldots c^{(0)}_{N-1},c^{(0)}_{N}]^T\). Initial vector can be determined using B-spline approximation of initial condition of the problem.

Stability of the scheme

As discussed earlier, by discretizing Eq. (1), we obtain following equation:

$$\begin{aligned} u^{(n+1)}\left( 1-\frac{\rho \Delta t}{2}+\rho \Delta t u^{(n)}\right) - \frac{\nu \Delta t u^{(n+1)}_{xx}}{2}=u^{(n)}\left( 1+\frac{\rho \Delta t}{2}\right) +\frac{\nu \Delta t u^{(n)}_{xx}}{2}. \end{aligned}$$
(29)

Let us assume \(u^n=k\) , \(1-\frac{\rho \Delta t}{2}+\rho \Delta t u^{(n)}=p_1\) and \(1+\frac{\rho \Delta t}{2}=p_2\),, so that we obtain following:

$$\begin{aligned} (c^{(n+1)}_{j-1}+4c^{(n+1)}_j+c^{(n+1)}_{j+1})p_1-\frac{\nu \Delta t}{4h^2}(c^{(n+1)}_{j-2}+8c^{(n+1)}_{j-1}-18c^{(n+1)}_j+8c^{(n+1)}_{j+1}+c^{(n+1)}_{j+2}) \end{aligned}$$
$$\begin{aligned} =p_2(c^{(n)}_{j-1}+4c^{(n)}_j+c^{(n)}_{j+1})+\frac{\nu \Delta t}{4h^2}(c^{(n+1)}_{j-2}+8c^{(n)}_{j-1}-18c^{(n)}_j+8c^{(n)}_{j+1}+c^{(n)}_{j+2}). \end{aligned}$$
(30)

Assume \(\frac{\nu \Delta t}{h^2}=L\)

$$\begin{aligned} -\frac{L}{4}c^{(n+1)}_{j-2}+(-2L+p_1)c^{(n+1)}_{j-1}+\left( \frac{9L}{2}+4p_1\right) c^{(n)}_j+(p_1-2L)c^{(n+1)}_{j+1}-\frac{L}{4}c^{(n+1)}_{j+2} \end{aligned}$$
$$\begin{aligned} \frac{L}{4}c^{(n)}_{j-2}+(2L+p_1)c^{(n)}_{j-1}+\left( 4p_2-\frac{9L}{2}\right) c^{(n)}_j+(p_2+2L)c^{(n)}_{j+1}+\frac{L}{4}c^{(n)}_{j+2}. \end{aligned}$$
(31)

Simplifying we get, substituting \(c^n_j=A\xi ^n \mathrm{exp}(ij\phi h)\), where \(i=\sqrt{-1}\), A is amplitude, h is step length, and \(\phi\) is mode number, we get

$$\begin{aligned} \xi= & \frac{\frac{L}{4}e^{-2\phi i h}+(2L+p_2)e^{-\phi i h}+(4p_2-\frac{9L}{2})+(p_2+2L) e^{\phi i h}+\frac{L}{4} e^{2\phi i h}}{-\frac{L}{4}e^{-2\phi i h}+(-2L+p_1)e^{-\phi i h}+(4p_1+\frac{9L}{2})+(p_1-2L) e^{\phi i h}-\frac{L}{4} e^{2\phi i h}}\end{aligned}$$
(32)
$$\begin{aligned} \xi= & \frac{\frac{L}{2}\cos 2\phi h+2(2L+p_2) \cos \phi h+(4p_2-\frac{9L}{2})}{-\frac{L}{2}\cos 2\phi h+2(p_1-2L)\cos \phi h+\frac{9L}{2}+4p_1} \end{aligned}$$
(33)

or

$$\begin{aligned} \xi =\frac{A}{B}. \end{aligned}$$
(34)

For stability of the derived scheme, we must have

$$\begin{aligned} |\xi |< 1 \end{aligned}$$
(35)
  • \(\frac{A}{B}< 1\).

  • \(\Rightarrow -1<\frac{A}{B}< 1\).

  • \(\Rightarrow A+B> 0\) and \(B-A>0\).

  • Here, \(A+B=2(p_1+p_2)\cos {\phi h}+4p_1+4p_2\).

  • However, \(p_1+p_2=2+\rho \Delta t k\) which is obviously positive.

  • Hence, \(A+B>0\).

  • Now, \(B-A=-L \cos 2\phi h+2(p_1-p_2-4L)\cos \phi h+9L+4p_1-4p_2\).

  • \(=-2L\cos ^2 \phi h+2(-\rho \Delta t+\rho \Delta t k -4L)\cos \phi h+10L+4(-\rho \Delta t+\rho \Delta t k)\).

  • We calculate minimum possible value of \(B-A\). For minimum value, \(\cos \phi h=1\).

  • So that \(B-A=6\rho \Delta t(k-1)\) which is obviously greater than zero.

Hence, the proposed fourth-order B-spline collocation method is unconditionally stable.

Results and discussion

We apply cubic B-spline-based method to some well-known problems taken from the literature. The accuracy of the method has been measured by finding following error norms given by

$$\begin{aligned} L_2= & \sqrt{\displaystyle \sum _0^N|u_j-U_j|^2}\end{aligned}$$
(36)
$$\begin{aligned} L_\infty = & \mathrm{max}|u_j-U_j| \end{aligned}$$
(37)

where \(u_j\) and \(U_j\) denote the exact and numerical solutions, respectively, at the knot \(x_j\).

Example 1

We consider (1) with \(f=u(1-u)\), \(\nu =0.1\), and \(\rho =1.0\) with zero boundary conditions and following initial condition with various domains:

$$\begin{aligned} u_0(x)=\sec h^{2} (10x). \end{aligned}$$
(38)

Initial condition has a sharp peak in the middle. Figure 1 shows the results from \(t=0\) to \(t=0.2\) with an increment of \(k=0.05\) in time. In the beginning, near \(x=0\), diffusion dominates over reaction, and therefore, the peak goes down and flattens itself. In Fig. 2, contours have been drawn from \(t=0.5\) to \(t=5.0\) with an increment \(k=0.5\). It may be noticed that when contour peak attains a lowest level, reaction dominates over diffusion and peak moves upwards to attain its original height. Physical behavior of solutions from \(t=2\) to \(t=404\) with \(k=2\) has been depicted in Fig. 3. It can be seen from the figure that top of the contours become flatter and flatter.

Fig. 1
figure 1

Numerical solutions of Example 1 for \(t= 0.0,0.05,0.1 ,0.2\)

Fig. 2
figure 2

Numerical solutions of Example 1 for \(t=0.5\) to \(t=5.0\) with increment in time \(k=0.5\)

Fig. 3
figure 3

Numerical solutions of Example 1 for \(t=2.0\) to \(t=40.0\) with increment in time \(k=2.0\)

Fig. 4
figure 4

Numerical solutions of Example 2 for \(t=0.0\) to \(t=0.2\) with increment in time \(k=0.05\)

Fig. 5
figure 5

Numerical solutions of Example 2 for \(t=0.0\) to \(t=5.0\) with increment in time \(k=0.5\)

Example 2

We consider Eq. (1) with \(f=u(1-u)\)\(\nu =0.1\) and \(\rho =0.1\). The initial condition is given by

$$\begin{aligned} u(x,0) = \left\{ \begin{array}{lll} e^{10(x+1)} & \text{ if } x <-1 \\ 1 & \text{ if } -1\le x \le 1\\ e^{-10(x-1)}& \text{ if } x > 1 \end{array} \right. \end{aligned}$$
(39)

and boundary conditions are

$$\begin{aligned} u(a,t)=u(b,t)=0 \end{aligned}$$
(40)

Development of above initial condition has been depicted in Figs. 4, 5, and 6. In Fig. 4, middle parts of contours show that the effects of diffusion and reaction are very small. Contours get rounded at the edges showing that diffusion dominates in this part of the domain. Since diffusion takes place, contours go down a little as in Fig. 5 and then finally take the limiting form as in the previous example. This shows that limiting shape of the wavefront does not depend on initial condition.

Fig. 6
figure 6

Numerical solutions of Example 2 for \(t=0.0\) to \(t=40.0\) with increment in time \(k=2.0\)

Fig. 7
figure 7

Numerical solutions of Example 3 at \(t=0.001, 0.0015, 0.002, 0.0025\) and 0.003 with \(N=120\)

Fig. 8
figure 8

Numerical solutions of Example 3 at \(t=1, 2, 3, 4\) and 5 with \(N=120\)

Fig. 9
figure 9

Numerical solutions of Example 4 from \(t=1\) to \(t=15\)

Fig. 10
figure 10

Exact solutions of Example 4 from \(t=1\) to \(t=15\)

Example 3

Consider Fisher’s equation with following exact solutions:

$$\begin{aligned} u(x,t)=\frac{1}{\left( 1+{\rm exp}\left( \sqrt{\frac{\rho }{6} }x-\frac{5\rho }{6}t\right) \right) ^2}. \end{aligned}$$
(41)

Initial and boundary conditions have been taken from exact solution. This equation has been considered by Olmos and Shizgal [11] while solving Fisher’s equation by pseudo-spectral method. Numerical errors for different values of \(\rho\) and \(\mu\) have been presented in Table 1 at time levels 10, 20, 30, 40, 50, and 100. We can observe that very good results have been obtained. In Table 2, we have compared our results with the results obtained by trigonometric cubic B-spline differential quadrature method [29] and also with extended modified cubic B-spline differential quadrature method [29] at different time levels with \(N=40\) and \(\rho =2000\). Numerical and exact solutions are depicted in Figs. 7 and 8 with \(\rho =10{,}000\) and \(N=120\). It may be noticed that numerical solutions are very close to exact solutions.

Example 4

Consider the following Fisher’s equation in \([-30,30]\):

$$\begin{aligned} u_{t}=\gamma u_{xx}-bu^{2}+au. \end{aligned}$$
(42)

The exact solution is

$$\begin{aligned} u(x,t)=-\frac{1}{4}\frac{a}{b}\bigg [ \mathrm{sec}h^{2} \bigg ( \pm \sqrt{\frac{a}{24c}}x+\frac{5at}{12}\bigg )-2\mathrm{tan}h\bigg (\pm \sqrt{\frac{a}{24c}}x+\frac{5at}{12}\bigg )-2 \bigg ]. \end{aligned}$$
(43)

The boundary conditions are taken as

$$\begin{aligned} u(-30,t)=0.5,u(30,t)=0 \end{aligned}$$
(44)

and initial condition is given by

$$\begin{aligned} u(x,t)=-\frac{1}{4}\frac{a}{b}\bigg [ \mathrm{sec}h^{2} \bigg ( \pm \sqrt{\frac{a}{24c}}x\bigg )-2\mathrm{tan}h\bigg (\pm \sqrt{\frac{a}{24c}}x\bigg )-2 \bigg ]. \end{aligned}$$
(45)

The amplitude of the wave is proportional to \(\frac{a}{b}\) which increases with increasing a and also with decreasing b. Numerical solutions have been presented in Table 3. Numerical results at \(t=2\) and \(t=4\) show that our results are better than the results obtained using second-order approximations for the second derivative. Physical behavior of the solutions has been presented in Figs. 9 and 10 which shows a traveling wave front moving through the medium. We can observe that numerical and exact solution profiles look similar.

Conclusion

A fourth-order collocation method based on cubic B-spline functions has been developed to solve Fisher’s reaction diffusion equation. Proposed method gives good results. Results have been compared with results obtained by some earlier methods. Stability analysis shows that method is unconditionally stable, and hence, the value of \(\Delta t\) needs not to be taken very small. As a result, solutions have been calculated for large values of t with very small CPU time. Method uses very less storage and can be easily extended to solve higher dimensional problems from practical, mechanical, physical, and biophysical areas.