INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 90
www.rsisinternational.org
Numerical Simulation of Fitzhugh-Nagumo Dynamics Using a Finite
Difference-Based Method of Lines
Folakemi Margaret Okafor
1*
, Lolade Modupe Fatunsin
1
, Adetunji K. Ilori
2
, Joshua Kayode Odeyemi
3
1
Mathematics Program, National Mathematical Centre, Abuja, Nigeria
2
Statistics Program, National Mathematical Centre, Abuja, Nigeria,
3
Department of Mathematics and Statistics, Federal Polytechnic, Ilaro, Ogun State, Nigeria
*Correspondence Author


2126
ABSTRACT
This study investigates the numerical solution of the FitzHugh-Nagumo (FHN) equation, a canonical Nonlinear
Reaction-Diffusion system widely used in Neuroscience and Biophysics using the Method of Lines (MoL). The
MoL approach, known for its efficiency and flexibility, discretizes spatial variables to transform partial
differential equations ( PDEs ) into a system of Ordinary Differential Equations (ODEs), which are then
integrated in time. A fourth-order five-point central difference scheme is employed to approximate spatial
derivatives, and MATLAB is used to implement the method. To validate the Numerical scheme, the Newell-
Whitehead equation (a special case of the FHN model) is solved, and the results are benchmarked against exact
solutions. The results exhibit excellent accuracy, with errors remaining in the order of 10
7
to 10
4
across varying
time steps. Comparative analysis against results from the Galerkin Finite Element Method confirms the superior
accuracy and computational efficiency of the MoL approach. These findings affirm the reliability and robustness
of the Method of Lines in solving Nonlinear Reaction-Diffusion systems, suggesting its potential for broader
application in modeling complex Scientific and Engineering phenomena.
Keywords: Method of Lines, FitzHugh-Nagumo Equation, Reaction-Diffusion, Non-linear PDEs, Newell-
Whitehead Equation
INTRODUCTION
Our physical world is most generally described with respect to three-dimensional space and time in Sciences and
Engineering, abbreviated as Space-time (Samir, William & Graham, 2009). Partial differential equations (PDEs)
is one of the tools used to demonstrate how some quantities vary with position and time Tsega (2022). One of
such equations is the heat equation which is used to describe the variation of temperature in a body. The
complexity of many real situations makes it difficult to obtain analytical solutions, hence, numerical methods
Tsega (2022), Mazumder (2016), Dawson, D and Dupont (1991), Dalabev and Hasanova (2023) ,Kolar-Pozun
etal, (2024). Several approximate methods have been investigated to solve time dependent PDEs, Deghan and
Kazem (2017). The main subject in numerical analysis is to study these methods in terms of their convergence,
stability, and order of accuracy.
One of the ways to solve a time-dependent PDEs is the application of Method of Lines (MoL). MoL has formed
a broad interest in Science and Engineering. It discretizes the spatial dimension by using techniques such as
finite difference, finite element and finite volume, spectral or meshless methods. It serves as a general procedure
for the solution of partial differential equations (PDEs) (Samir, William & Graham 2009). The use of MoL yields
a system of first order differential equations with initial value Deghan and Kazem (2017). This method could be
described as a semi analytical procedure and a general way of viewing a partial differential equation as a system
of Ordinary Differential Equations (ODEs) Zafarullah (1970). Sadiku and Obiozor (2000) described MoL as a
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 91
www.rsisinternational.
org
special finite difference method and noted it to be more effective in terms of accuracy and computational time
than the standard finite difference method. Okafor et al., (2025) did a comparative study of stencil-based Method
of Lines to solve Non-linear PDEs. For the PDEs to which MOL is applied, the method typically proves to be
quite efficient.
Application of MoL cuts across various problems in general Science, Biomedical science and Engineering
(White and Subramanian, 2010). It had been applied for the solution of extended Boussinesesq equation(Hamdi,
et al., 2005), one dimensional wave equation subject to an integral conservation condition (Shakeri and Dhghan,
2008), the conservation laws problem (Hyman, 1979), among others.
Consider this family of equation



(1)
Where;
u represents the dependent variable (on x and t),
t represents the independent variable,
x represents an independent variable and one dimension of the three-dimensional space, and D represents a real
positive constant ( diffusivity ).
For a function U(x,y,z,t) of three spatial variables (x,y,z) and the time variable t, with an initial condition, the heat
equation is given as:


󰇡



󰇢, 
󰇛
󰇜
(2)
U(x,y,z,0) = f(x,y,z)
Where Ω  R
3
is an open bounded domain with smooth boundary Ω.
Reaction-diffusion equations are a type of PDEs that model how different substances diffuse through a medium
and interact with each other. These equations are of high importance for modeling various natural and engineered
processes, including chemical reactions, biological pattern formation, and environmental dynamics. The general
form of a reaction-diffusion equation for a single substance u(x,t) in one dimension is:



󰇛󰇜 (3)
where:


represents the time rate of change of u
D is the diffusion coefficient that quantifies the rate of diffusion,

is the second spatial derivative, modeling
the diffusion process,
R(u) is a nonlinear term representing the reaction kinetics.
Reaction-diffusion equation has its applications in numerous scientific fields. In Biology, it models pattern
formation, population dynamics, and tumor growth. In Chemistry, is describes auto-catalytic reactions and
chemical wave propagation. In Physics, it is used to analyze phase transitions and heat conduction in reactive
materials. In Ecology, they help study species distribution, habitat interactions, and environmental changes.
Additionally, reaction-diffusion processes are employed in developing sensors and devices for signal processing
(Murray, 2002; Murray, 2003; Nagumo, Arimoto andYoshizawa,1962; Meinhardt, 1982)
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 92
www.rsisinternational.org
Analytical solutions for reaction-diffusion equations are often limited to specific cases involving linear reactions
or symmetric boundary conditions. For more complex, real-world problems, numerical methods are
indispensable. Common numerical approaches include the Finite Difference Method (FDM), Finite Element
Method (FEM), and the Method of Lines (MOL).
Reaction-diffusion equations are essential for understanding processes involving the combined effects of
diffusion and reaction. Although analytical solutions are rare, numerical techniques, particularly the Method of
Lines, are effective for investigating these complex systems. The study of reaction-diffusion equations remains
a vibrant research field with far-reaching implications across both natural and applied sciences. The
FitzHughNagumo (FHN) equations are a well-known example of nonlinear reaction-diffusion systems.
Originally developed for Neuroscience in the 1960s, Richard FitzHugh introduced the model in 1961 as a
simplified version of the complex Hodgkin-Huxley model. The model was further refined in 1962 by Fitzhugh
(1961) and Nagumo, Arimoto andYoshizawa,(1962).
It has become a key tool for understanding the behavior of excitable neuron cells. Beyond its applications in
Neuroscience, the FHN equations have been used in cardiac physiology, cell division, population dynamics,
electronics, and the study of complex phenomena, such as traveling waves and pattern formation in coupled
systems.
Hariharan and Kannan (2010) developed the Haar wavelet method to solve the FitzHugh-Nagumo equation. Ali
et al., (2020) solved a specific FitzHugh-Nagumo equation using the Galerkin Finite Element Method and
demonstrated the method’s accuracy through error analysis. Cevikel et al, (2022) introduced the tanh-coth
method for solving nonlinear space-time conformable partial differential equations, obtaining exact and traveling
wave solutions for the FitzHugh-Nagumo equation. Zhou et al., (2023) applied the Chebyshev Fourth Order
Runge-Kutta scheme with Neumann boundary conditions to the FitzHugh-Nagumo equation to simulate spiral
waves over a long period.
METHODS
Algorithm Of Method Of Lines
To evaluate the numerical solution of nonlinear equations using the Method of Lines, the following steps are
considered;
1. Discretize the spatial derivatives in PDE
2. Formulate the approximate system of ODEs
3. Apply any integration algorithm for the initial value of ODE to compute an approximate numerical solution
to the PDE.
Consider the partial differential equation (PDE) with the initial condition is

󰇛
󰇠
 (3)
󰇛
󰇜
=󰇛󰇜, 󰇛
󰇠 (4)
Evaluating the diffusion operator

using a five-point central finite difference gives:

󰆒
= 







󰇛
󰇜
,  (5)
with the initial condition:
󰇛
󰇜
=
󰇛
󰇜
(6)
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 93
www.rsisinternational.
org
=

Equation (5) can be written in matrix form as:

=  U
󰇛
󰇜
=
󰇟
󰇛
󰇜

󰇛
󰇜
󰇛
󰇜󰇠
(7)
Where A, for periodic boundary condition is
󰇛

󰇜
=
󰇛

󰇜
and
󰇛

󰇜
=
󰇛

󰇜
=
,

=

,
From Equation (5), for i = M + 2, we can write:


󰆒
= 
+

30

+


(8)
Also
Taking i = 0, we have:
Take

󰆒
= 





+
󰇛
󰇜
(9)
Take

=


+
󰇛
󰇜

󰆒
= 





+
󰇛
󰇜
(10)
For

=

,
we have;

󰆒
= 





+
󰇛
󰇜
(11)
Let

=
󰇛

󰇜
+O
󰇛
󰇜

󰆒
= 



󰇛

󰇜
+
󰇛
󰇜
(12)
But
=
, hence we have

󰆒
= 




+
󰇛
󰇜
(13)
Now, matrix A for the periodic condition according to equations (8) and (9), is obtained as:
A=
  
  
   
   
  

(14)
Direct Method of Lines for Solving Partial Differential Equations
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 94
www.rsisinternational.org
Consider the three-dimensional heat equation satisfying the initial condition
=

+

+

,

󰇠
,

,

󰇠
, t, (15)
󰇛
 
󰇜
=
󰇛
󰇜
,

󰇠
,

,

󰇠
Evaluating the diffusion operators

,

and

using five point finite difference, gives

󰆒
=








+








+








- 30




,

󰇛
󰇜
=

=


(16)
Where
=
󰇛
󰇜
,
,
󰇛
󰇜
. This system of ODE has solution in
the form
󰇛
󰇜
=

󰇛
󰇜
(17)
Where, U(0) and
will be obtained for some boundary conditions
Application and Results
Consider the FitzHugh-Nagumo equation:


=

+
󰇛
󰇜󰇛
󰇜
,
󰇛
󰇜
󰇟

󰇠
󰇟󰇠 (18)
λ is an arbitrary constant and 0 ≤ λ 1.
When λ = 1, the equation reduces to the famous Newell-Whitehead equation


=

+
, 󰇟󰇠 (18a)
With Boundary conditions

󰇛

󰇜

󰆤

=
󰇛
󰇜
, 󰇟󰇠 (19)

󰇛

󰇜

󰆤

=
󰇛
󰇜
, 󰇟󰇠
󰇛
󰇜
=

󰇡

󰇢
󰇛
󰇜
=

󰇡

󰇢
The boundary conditions are non- homogeneous Neumann boundary conditions,
with the initial conditions:
󰇛
󰇜
=
󰇛
󰇜
󰆤

󰇟󰇠
󰇛
󰇜
=
󰇣  󰇡

󰇢󰇤 (20)
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 95
www.rsisinternational.
org
The Exact solution of Equation (18) is:
󰇛
󰇜
=
󰇣  󰇡

󰇛

󰇜
󰇢󰇤 (21)
For Numerical computation, we consider
=
 and
Applying the MoL Algorithm discussed in the previous section to equation (18) and solve using MATLAB
Table 1: Numerical Solution obtained with the Method of Lines, exact solution and error obtained at various
time, t
X
t = 0.05
Numerical
Exact
t = 0.1
Numerical
Exact
Error
t = 0.3
Numerical
Exact
Error
-1.0
9.25E-06
9.25E-
06
9.02E-06
9.02E-
06
0.00000
8.16E-06
8.16E-
06
0.00000
-0.8
7.76E-06
7.57E-
06
7.41E-06
7.38E-
06
2.92E-
08
6.29E-06
6.68E-
06
3.94E-
07
-0.6
6.35E-06
6.20E-
06
6.07E-06
6.06E-
06
2.95E-
08
5.11E-06
5.47E-
06
3.55E-
07
-0.4
5.20E-06
5.07E-
06
4.98E-06
4.95E-
06
2.65E-
08
4.16E-06
4.48E-
06
3.21E-
07
-0.2
4.26E-06
4.15E-
06
4.09E-06
4.07E-
06
1.79E-
08
3.41E-06
3.69E-
06
2.85E-
07
0.0
3.49E-06
3.40E-
06
3.34E-06
3.32E-
06
1.78E-
08
2.79E-06
2.98E-
06
2.11E-
07
0.2
2.86E-06
2.78E-
06
2.73E-06
2.72E-
06
1.47E-
08
2.28E-06
2.46E-
06
1.73E-
07
0.4
2.32E-06
2.28E-
06
2.21E-06
2.21E-
06
9.42E-
09
1.85E-06
1.98E-
06
1.41E-
07
0.6
1.91E-06
1.87E-
06
1.83E-06
1.83E-
06
5.63E-
09
1.54E-06
1.65E-
06
1.12E-
07
0.8
1.57E-06
1.53E-
06
1.50E-06
1.49E-
06
7.16E-
09
1.27E-06
1.35E-
06
8.29E-
08
1.0
1.25E-06
1.25E-
06
1.22E-06
1.22E-
06
0.00000
1.10E-06
1.10E-
06
0.00000
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 96
www.rsisinternational.org
Graphical Illustration of the Numerical Solution, Exact and the Error obtained
Figure 1: Numerical solution vs exact at t=0.05
Figure 2: Numerical vs Exact at t=0.1
Figure 3: Numerical vs Exact solution at t=0.3
Table 2: Comparing the Absolute Error of MoL with Ali et al. [20]
X
t = 0.05 MoL
Ali et al.
t = 0.1MoL
Ali et al.
t = 0.3MoL
Ali et al.
-1.0
0.00000
1.14E-02
0.00000
2.51E-02
0.00000
9.02E-02
-0.8
1.92E-07
8.85E-04
2.96E-08
2.14E-02
3.81E-07
8.17E-02
-0.6
1.57E-07
5.68E-04
3.16E-08
1.51E-02
3.77E-07
6.56E-02
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 97
www.rsisinternational.
org
-0.4
1.28E-07
3.55E-04
2.70E-08
9.11E-03
3.21E-07
4.91E-02
-0.2
1.05E-07
2.27E-04
2.17E-08
6.41E-03
2.60E-07
3.56E-02
0.0
8.61E-08
1.49E-04
1.78E-08
4.19E-03
2.13E-07
2.39E-02
0.2
7.05E-08
1.01E-04
1.45E-08
2.80E-03
1.74E-07
1.77E-02
0.4
5.77E-08
7.01E-05
1.20E-08
1.92E-03
1.43E-07
1.25E-02
0.6
4.73E-08
5.01E-05
9.63E-09
1.36E-03
1.15E-07
9.11E-03
0.8
3.87E-08
3.74E-05
6.63E-09
9.10E-04
8.31E-08
7.14E-04
1.0
0.00000
3.22E-05
0.00000
9.12E-05
0.00000
6.48E-04
Graphical Illustration comparing Absolute errors of MoL with Ali etal[20]
Figure 4: Absolute errors compared at t=0.05
Figure 5: Absolute errors compared at t=0.1
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 98
www.rsisinternational.org
Figure 6: Absolute errors compared at t=0.3
Interpretation of Results
In this paper, FitzHugh-Nagumo equation, a type of reaction-diffusion equation is presented. The numerical
solutions obtained using Method of Lines were compared with the exact solution in Table 1 and also displayed
graphically in Figures 1-3. Both the table and graphs provide results for spatial points X at various time levels
(t = 0.05, t = 0.1, and t = 0.3). The error is calculated as the difference between the numerical and exact solutions.
Error values are very low, indicating high accuracy for most points: At t = 0.05, errors are generally below 10
7
,
demonstrating strong alignment with the exact solution. At t = 0.3, errors increase slightly but remain small,
showing stability in the MOL solution even over longer time frames.
Comparison of the numerical solutions of the Galerkin Finite Element Method by Ali etal [20] with that of the
Method of Lines scheme were presented in Table 2 and graphically displayed in Figures 4 through 6. MoL
demonstrates strong accuracy with minimal deviation from the exact solution, evidenced by near-zero errors in
most cases compared to that of Ali [20]. Considering the low error values and consistent results across time
levels, the MOL scheme appears more efficient and potentially well-suited for more complex nonlinear
problems. This comparison highlights the reliability of the Method of Lines (MOL) in solving nonlinear
diffusion-reaction equations, especially the Fitzugh -Nagumo equation.
CONCLUSION
This paper demonstrates the effectiveness of the Method of Lines (MoL) in solving FitzHugh-Nagumo equation.
We solved a well renowned Newell-Whitehead equation to verify consistency of the scheme. Solutions obtained
from the scheme were compared to analytical and existing numerical methods to demonstrate the advantages
and limitations of each approach. This research validates MoL’s capability in handling stability and convergence
challenges, making it a versatile tool for solving complex partial differential equations in Science and
Engineering.
REFERENCES
1. Tsega, E. G. (2022). Numerical solution of three-dimensional transient heat conduction equation in
cylindrical coordinates. Journal of Applied Mathematics, 2, 1 8.
2. Deghan, M., and S, Kazem. (2017). Application of finite difference method of lines on the heat equation.
Numerical Methods for Partial Differential Equations, 135.
3. Mazumder, S. (2016). Numerical methods for partial differential equations: Finite difference and finite volume
methods. Academic Press.
4. Dawson, C. N., Du, Q., and Dupont, T. F. (1991). A finite difference domain decomposition algorithm
for numerical solution of the heat equation. Mathematics of Computation, 57(195), 6371.
https://doi.org/10.1090/S0025-5718-1991-1069577-3
5. Dalabaev, U., and Hasanova, D. (2023). Construction of an approximate-analytical solution for boundary
value problems of a parabolic equation. Mathematics and Computer Science, 8(2), 3945.
https://doi.org/10.11648/j.mcs.20230802.11 doi: 10.11648 /j.mcs. 20230802.11
6. Kolar-Pozuna, A., Jancic, M., Rot, M., and Koseca, G. (2024). Some observations regarding the RBF-
FD approximation accuracy dependence on stencil size. Journal of Computational Science.
https://arxiv.org/abs/2404-03793v1 [ math.NA ].
7. Samir, H., William, E. S., and Graham, W. G. (2009). Method of lines. Scholarpedia, 2(3), 2859.
8. Zafarullah A. (1970). Application of the Method of Lines to Parabolic Partial Differential Equations with
Error Estimates. Journal of the Association for Computing Machinery, 17(3), 1970.
9. Sadiku, M. N. O., and Obiozor, C. N. (2000). A simple introduction to the method of lines. International Journal
of Electrical Engineering Education, 37, 282296. https://doi.org/10.117
10. Okafor, F.M, Mary O. Durojaye, J. Kayode Odeyemi, G.B. Ogunware (2025). A Comparative Study of
Stencil-Based Method of Lines for Solving the BurgersHuxley Equation. FUDMA Journal of Sciences,
9(7), 1-7
INTERNATIONAL JOURNAL OF RESEARCH AND SCIENTIFIC INNOVATION (IJRSI)
ISSN No. 2321-2705 | DOI: 10.51244/IJRSI |Volume XII Issue VIII August 2025
Page 99
www.rsisinternational.
org
11. White, R. E., and Subramanian, V. R. (2010). Method of lines for parabolic partial differential equations
in Computational methods in chemical engineering with Maple (pp. 353505). Springer Berlin
Heidelberg.
12. Hamdi, S., Enright, W., Ouellet, Y., and Schiesser, W. (2005). Method of lines solutions of the extended
Boussinesq equations. Journal of Computational and Applied Mathematics, 183(1), 327342.
13. Shakeri, F., and Dehghan, M. (2008). The method of lines for the solution of the onedimensional wave
equation subject to an integral conservation condition. Computers and Mathematics with Applications,
56, 21752188. https://doi.org/10.1016/j.camwa.2008.06.0
14. Hyman, J. M. (1979). A method of lines approach to the numerical solution of conservation laws.
Advances in computational methods for partial differential equations (Vol. 3, pp. 13321).
15. Murray, J. D. (2002). Mathematical biology I: An introduction (3rd ed.). Springer.
https://doi.org/10.1007/b98868
16. Murray, J. D. (2003). Mathematical biology II: Spatial models and biomedical applications. Springer.
17. Nagumo, J., Arimoto, S., and Yoshizawa, S. (1962). An active pulse transmission line simulating nerve
axon. Proceedings of the IRE, 50(10), 20612070. https://doi.org/10.1109/JR
18. FitzHugh, R. (1961). Impulses and Physiological States in Theoretical Models of Nerve Membrane.
Biophysical Journal, 1(6), 445-466.
19. Hariharan, G., and Kannan, K. (2010). Haar wavelength method for solving FitzHughNagumo equation.
International Journal of Computational and Mathematical Sciences, 4(6).
20. Ali, H., Kamrujjaman, M., and Islam, M. S. (2020). Numerical computation of FitzHugh-Nagumo
equation: A novel Galerkin finite element approach. International Journal of Mathematical Research,
9(1), 2027.
21. Cevikel, A., Bekir, A., Abu Argub, O., and Abukhaled, M. (2022). Solitary wave solutions of FitzHugh-
Nagumo-type equations with conformable derivatives. Frontiers in Physics. . Retrieved from
https://www.frontiersin.org
22. Zhou, H., Liu, X., Zhang, W., and Liao, Y. (2023). Efficient numerical method for the FitzHugh-Nagumo
equations with Neumann boundary conditions. SCIREA Journal of Physics, 8(2).
https://doi.org/10.1016/j.apnum.2024.02.010https://doi.org/10.1016/j.a
23. Meinhardt, H. (1982). Models of biological pattern formation. Academic Press.