Abstract
The present study is committed to devising efficient spatial discretization with two non-central difference formulae incorporated in the method of lines (MOL). The method is then implemented numerically on the renowned dispersive evolution equation, the Korteweg-de Vries (KdV) model while infusing Euler and fourth-order Rung-Kutta (RK4) methods, respectively. The resulting schemes are proven to be numerically stable using Fourier’s stability approach, with the MOL matrix admitting negative real eigenvalues. Moreover, this proposal has been assessed on certain initial-boundary value problems of the KdV model by examining so many factors, like the percentage errors, absolute error differences, the error norms, and the invariants \(I_{k},\) for \(k=1,2,3,\) among others. In this work, we solve KdV by applying a new approach of MOL to improve the results presented in some published articles. Lastly, the assessment revealed that our proposal was found to be better than those of the exponential finite-difference method (Exponential) and the Heat Balance Integral (HBI) methods, respectively, which serve as competing approaches for validation, in terms of both the accuracy and efficiency. The numerical examples are obtained by using MATLAB.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
The Korteweg-de Vries equation (KdV) is a renowned dispersive evolution equation that was initially devised to propagate long waves with finite-small amplitudes in dispersive medium [1]. In fact, the KdV equation models weakly nonlinear long waves, integrating dispersion and leading order nonlinearity. The model is equally found to have immense applications in various areas of wave and fluid phenomena, including plasma physics [2], bubble-liquid mixtures [3], and anharmonic crystals [4], to mention a few. To more relevant works, we refer the readers to see [5,6,7,8,9,10,11].
Further, various exact solitary wave solutions for the KdV equation existed in the open literature through the utilization of many analytical approaches, see Gardner et al. [12] as an instance, where dissimilar exact analytical solutions were acquired, with the help of scattering theory. More so, different initial-boundary problems featuring the KdV equation were solved numerically to get hold of the corresponding numerical solutions using diverse proficient computational schemes, including finite difference method, spectral method, and finite element method [13,14,15] to mention a few. Also, all kinds of explicit solutions of the KdV equation were explored by Ma and You [16, 17]. In addition, the method of lines (MOL) is a universal numerical approach that tackles assorted classes of partial differential equations via the application of finite difference approximation on the related spatial derivatives; while the temporal derivatives are represented using ordinary differential equations (ODEs), for example see [18,19,20]. In particular, Schiesser [21] deployed MOL to examine a class KdV equations with central finite formula, while the resulting ODEs were solved with the help of Euler’s method.
This work aim to present the solution of KdV equation by applying modification of the method of lines. However, in the present study, we are set to devise efficient spatial discretization using the 5-point and 7-point non-central difference formulae incorporated in MOL to solve the class of the KdV equation. Indeed, we will be seeking the help of the Euler and RK4 numerical methods to solve the resulting ODEs. The stability of our proposal will be established using Fourier’s stability approach. Moreover, we will be examining the various factors to assess the suitability of our approaches, including, the percentage errors, absolute error differences, the error norms, and the invariants \(I_{k},\) for \(k=1,2,3,\) among others. Lastly, certain promising numerical approaches will be sought from the literature to validate the accuracy and efficiency of our proposed schemes.
The paper is arranged as follows: In Sect. 2, we describe non-central 5-point formula and 7-point formula in MOL. The stability analysis of the proposed formula is investigated in Sect. 3. Some numerical examples and comparisons are given in Sect. 4. Finally, the conclusion is displayed in Sect. 5.
2 Non-central m-point formula in MOL
The MOL is a universal approach for tackling diverse classes of partial differential equations (PDEs) through the application of finite difference approximation on the related spatial derivatives; while the temporal derivatives are represented using ODEs, read the known work by Schiesser in [21]. Indeed, MOL is a semi-discretization method that transforms the governing PDE to a coupled system of first-order ODEs and further approximates the spatial partial derivatives through finite difference relationships. In light of the finite difference method, a second-order finite difference approximation, which is often encountered, is utilized with a 3-point central difference, which at times necessitates the choice of the values of the dependent variable outside the endpoints.
Nevertheless, Hicks and Wei [22] introduced non-central difference approximations, which significantly improves the difference scheme. In this regard, a 5-point difference approximation was suggested, and further proven with regard to the MOL matrix to admit negative real eigenvalues, which guarantees the stability of the method. Further, in [23], Amr and Bakodah introduced a suitable spatial discretization that gave the best result with MOL. In the same vein, we recall the work by Bakodah [24] that applied yet a reliable spatial discretization with MOL; specifically, a non-central 7-point formula to a class of Burgers’ equation. Indeed, an efficient scheme was derived, which later revealed interesting computational results with high accuracy.
However, in this study, we shall simultaneously incorporate the non-central 5-point and non-central 7-point formulae into the MOL to solve the KdV equation. Remember that, the KdV equation is a real-valued dispersive evolution equation with vast applications in various areas of wave and fluid phenomena. Moreover, in the present study, we will be considering the KdV equation of the following form
with \(\epsilon\) and \(\mu\) serving as positive real constants. Further, we prescribe the initial condition for (1) as follows
together with the following 2-point boundary data
where f(x) is a given smooth function.
Moreover, to begin the MOL procedure, we start off by subdividing the rectangle \(a\le x\le b\), and \(0\le t \le T,\) into uniform (equal-sized) rectangular meshes by the lines \(x_{i}=i\,h,\,(i=1,2,3,...)\) and the lines \(t_{j}=j\,k,\,(j=1,2,3,...).\) Additionally, the spatial partial derivatives \(u_{x}\), and \(u_{xxx},\) the dispersion term, will be replaced with the non-central m-points as rightly deployed in [23].
2.1 5-point formula in MOL
We give the procedure of MOL in the presence of the non-central 5-point formula, to discretize the dispersion term, \(u_{xxx}\) and \(u_{x}\). For brevity, we refer to this method as MOL5, standing for MOL incorporating the non-central 5-point difference approximation. Therefore, on applying the non-central 5-point formula [23] to Eq. 1), a coupled system of ODEs in \(u_{i}\) as unknown functions in t is revealed as follows:
Hence, we have got above a coupled system of ODEs, featuring only the independent variable t. More so, this system will independently be solved computationally in the present study with the aid of the Euler and fourth-order Rung-Kutta methods.
2.2 7-point formula in MOL
In the same passion, we give the procedure of MOL in the presence of the non-central 7-point formula, to discretize the dispersion term, \(u_{xxx}\) and \(u_{x},\) as in [23]. We also refer to this method as MOL7, meaning the MOL incorporating non-central 7-point difference approximation. Then, on applying the non-central 7-point formula [23] to Eq. (1), a coupled system of ODEs in \(u_{i}\) as unknown functions in t is yielded as follows:
Equally, the obtained coupled system of ODEs above, featuring only the independent variable t, will independently be solved computationally with the help of the Euler and fourth-order Rung-Kutta methods.
3 Stability analysis
The present section establishes the stability conditions of the proposed MOL5 and MOL7 schemes for the solution of the governing KdV model. In fact, the stability analysis of any numerical scheme is a vital factor for the determination of a stable approximate solution (when existed), or otherwise. Hence, it is therefore relevant to establish the stability results for MOL for the treatment of the PDE of interest. Moreover, the nature of the resulting eigenvalues of the matrix, emanating from the implementation of MOL, is critical in examining a satisfactory solution for the given equation.
In particular, Kreiss and Scherer [25] have worked out the local stability conditions of the Rung-Kutta method when actualized on PDEs. More so, it was discovered with regard to the Rung-Kutta method that the method is only numerically valuable when it is stable for adequately small k/h; with k representing the time-step.
Furthermore, the standard Fourier’s analysis is the universal approach that deeply examines the stability of diverse difference schemes, let alone the stability of the MOL as a case of concern. Indeed, we will be using this method to get hold of the stability conditions of the proposed MOL5 and MOL7 schemes for the governing KdV equation. Beginning with the MOL5, which revealed the coupled system of ODEs in (4), we first assume \(u_{i}\) to be constant in the nonlinear term, with
Additionally, we seek a trail solution of the N ODEs expressed in (4) in order to get some vital information with regard to the resulting eigenvalues. Indeed, this trial solution must holistically satisfy all the variations of u(x, t) in both x and t variables, (alternatively i and t). Thus, we make use of a generalized product solution expression of the following form
where the function \(\Xi (x)\) is further assumed based on Van Neumann’s suggestion as follows
with K denoting the Fourier’s number. Then, upon substituting of (6) and (7) in (4), one gets
where \(\delta =max(u_{i})\). Hence,
Alternatively, upon using the relation \(\sin (2Kh)=2\,\sin (Kh)\,\cos (Kh),\) the latter equation reduces to the following system
where,
Furthermore, since \(|\sin (a)|\le 1\) and \(|\cos (a)|\le 1\), we observe that the eigenvalues of the system (4) admit negative real part, which indeed indicates that the coupled system of N equations is stable.
In a similar way, the numerical scheme for MOL7, which was implemented earlier and resulted in the coupled system of N equations in (5) admits the following eigenvalues
which also possesses negative real parts, indicating that the coupled system of N equations is stable.
4 Numerical results and discussion
In the present section, we demonstrate the applicability of the derived numerical methods, the MOL5, and MOL7, on two initial-boundary value problems of the KdV model. More so, as MOL is a semi-discretization method that transforms the governing PDE into a coupled system of first-order ODEs in t, and further approximate the spatial partial derivatives through finite difference approximations; these resulting ODEs will concurrently be solved using the Euler and fourth-order Rung-Kutta (RK4) methods, respectively.
Moreover, we will be computing the absolute error difference between the approximate and the corresponding exact analytical solutions at various mesh points, in addition to the determination of the discrete \(L_{2}\) and \(L_{\infty }\) error norms using
and
where \(u^{e}_{i}\) is an exact analytical solution. Equally, respective percentage errors will be determined using
Further, a bright soliton solution of the KdV equation, taking the following form
will be considered for comparative examination, where C, and \(B_i\) for \(i=1,2,3\) are constants to be determined. Also, as the KdV equation is known to possess different invariant polynomials, the following three invariant cases
will be adopted while simulating the proposed schemes, where \(u=u(x,t).\) Furthermore, we will equally be using these invariant polynomials in assessing the efficiency of the devised algorithms.
4.1 Example 1: Single soliton
In reference to the KdV equation expressed in (1), the following supportive boundary conditions
are defined at the two endpoints, and coupled with the following initial data
In addition, this problem satisfies the following exact analytical solution [26]
where \(B_1=\frac{1}{2}\sqrt{{\epsilon \,C\over {\mu }}},\) \(B_2=\epsilon B_1 C;\) while \(B_3\) and C are real constants. Moreover, for the numerical purpose, we consider \(B_3=-6,\) \(C=0.3,\) \(\epsilon =1,\) \(\mu =4.84\times 10^{-4},\) \(N=20,\) \(h=0.1,\) \(k=0.005\) and \(nt=20\). Further, to establish a more rigorous comparative study, we seek the computational results presented in [27, 28], using the exponential finite-difference method (Exponential) and Heat Balance Integral (HBI) method, respectively, in order to assess the proposed MOL5 and MOL7. Indeed, we will be computing the error norms with regard to \(L_{2}\) and \(L_{\infty }\) norms; in addition to the determination of the respective invariants \(I_{k}\) for \(k=1,2,3,\) at \(t=0.005\) and \(t=0.01\), sequentially.
Eventually, the obtained numerical results of the governing example, using the proposed MOL5 and MOL7 (via both the Euler and RK4), are tabulated in Tables 1 and 2, and further compared with the results reported in [27, 28] using the Exponential and HBI approaches, in addition to that of the exact analytical solution. More so, from these tables, we have deeply examined the proposed schemes by successfully simulating/portraying the resulting percentage errors, invariant and error norms, and absolute error difference graphically. Indeed, our proposed methods turn out to be better than those of the competing Exponential and HBI methods in terms of both accuracy and efficiency. More so, the invariants are noted to be almost constant with an increase in time.
In addition, Figs. 1-2 depict the graphical illustrations by comparing the obtained solutions using the proposed schemes (MOL, present method) and that of the exact analytical solution. As expected, both solutions satisfy all the physical assumptions of the model. Accordingly, the solution revealed by the devised methods is noted to match the exact solution with indeed an insignificant error (Tables 3, 4, 5).
4.2 Example 2: Interaction of two solitary waves
Let us consider the KdV equation as given in (1) that admits a two-soliton solution, together with the following endpoint boundary conditions
and further coupled with an appropriate initial condition, derivable from the exact solution that takes the following expression [29]
where
with \(a_{1}=\sqrt{{0.3\over {\mu }}},\) \(a_{2}=\sqrt{{0.1\over {\mu }}},\) \(\rho _{1}=-48,\) \(a_{1},\,\,\rho _{2}=-1.07a_{2}\) and \(\omega _{i}=a_{i}\,x-a_{i}^{3}\mu \,t+\rho _{i},\) for \(i=1,2.\) Additionally, we set \(\epsilon =1\), \(\mu =4.84\times 10^{-4},\) together with letting \(N=20,\) \(k=0.005,\) \(h=0.1,\) and \(nt=20\). In the same vein, and without further delay, Tables 6, 7 and 8 give the accuracy of devised methods and further compared with the results in [28], using HBI. More so, certain graphical illustrations are illustrated in Figs. 3-4, where a very good agreement has been noted between the proposed solution and that of the exact solution. Equally, the solutions satisfy the physical behaviour of the model.
5 Conclusion
In conclusion, the present paper modified two numerical methods, the MOL5 and MOL7, and further implemented them on the renowned KdV model, a real-valued dispersive evolution equation with vast applications in various areas of wave and fluid phenomena. Besides, MOL is a semi-discretization method that gives a system of first-order ODEs; this resulting system was concurrently solved numerically using the Euler and RK4 methods, respectively. In addition, Fourier’s stability analysis method via the use of Van Neumann’s suggestion has helped us in achieving stable numerical schemes, with the MOL matrix admitting negative real eigenvalues. Moreover, having assessed the devised approaches on two initial-boundary value problems of the KdV model, by establishing the resulting percentage errors, absolute error differences, the error norms \(L_{2}\) and \(L_{\infty }\) and the invariant \(I_{k},\) for \(k=1,2,3,\). Therefore, we can proudly conclude that the proposed methods are better than those of the competing Exponential and HBI results in terms of both accuracy and efficiency. Hence, we recommend that the proposed methods should be applied to other types of evolution equations, including the Schrodinger equations. In addition, a higher order of KdV will be considered in our future work.
Data availability statement
We do not analyse or generate any datasets, because our work proceeds within a theoretical and mathematical approach.
References
Korteweg DJ, DE Veries G (1895) On the change of form of long waves advancing in a rectangular canal and on a new type of a long stationary wave. Philos Mag 39:422–443
Washimi H, Taniuti T, (1966) Propagation of ion-acoustic sohtary waves of small amplitudes. Phys Rev Lett 17:996–998
Van Wijngoarden L (1908) On the equations of motion for mixtures of liquid and gas bubbles. J Fluid Mech 33:465–474
Kruskal MD (1965) A symptotology in numerical computation: progress and plans on the fermi-pasta-ulam problem. In: Proceeding s, IBM scientific computing symposium on large-scale problems
Ali K, Tarla S, Ali MR, Yusuf A, Yilmazer R (2023) Exact solutions. Ivancevic option pricing model in economy, unified auxiliary equation method, Jacobi elliptic functions. Results Phys. 52:1–10
Ali KK, Tarla S, Ali MR, Yusuf A (2023) Modulation instability analysis and optical solutions of an extended (2+1)-dimensional perturbed nonlinear Schrödinger equation. Results Phys 45:1–6
Ali KK, Tarla S, Ali MR, Yusuf A, Yilmazer R (2023) Physical wave propagation and dynamics of the Ivancevic option pricing model. Results Phys 52:1–10
Sadaf M, Arshed S, Akram G, Ali MR, Bano I (2023) Analytical investigation and graphical simulations for the solitary wave behavior of Chaffee-Infante equation. Results Phys 54:1–8
Jain PC, Shankar R, Bhardwaj D (1997) Numerical solution of the Korteweg-Devries (KdV) equation. Chaos Solitons Fractals 8:943–951
Rashid A (2007) Numerical solution of Korteweg-de Vries equation by the Fourier pseudospectral method. Bull Belg Math Soc Simon Stevin 14(4):709–721
Ma W (2002) Complexiton solutions to the Korteweg-de Vries equation. Phys Lett A 301:35–44
Gardner CS, Greene JM, Kruskal MD, Mlura RM (1967) Method for solving the KdV equation. Phys Rev Lett 19:1095–1097
Gardner GA, Ali AHA, Gradner LRT (1989) A finite element solution for the Korteweg-de Vries equation using cubic B-splin shape functions. In: Gruber R, Periaux J, Shaw RP (eds) ISNME-89, vol 2. Springer, Berlin, pp 565–570
Gode K (1975) On instability of some finite difference schemes for Korteweg-der Vries equation. J Phys Soc Jpn. 34:229–236
Fornberg B, Whitham GB (1978) A numerical and theoretical study of certain nonlinear wave phenomena. Philos Trans R Soc 289:373–404
Ma W, You Y (2005) Solving the Korteweg-De vries equation by its bilinear form: Wronskian solutions. Trans Am Math Soc 357:1753–1778
Ma W (2021) Linear superposition of Wronskian rational solutions to the KdV equation. Commun Theor Phys 73:1–5
Xiao-Wei G, Yu-Mo Z, Tao P (2023) Finite line method for solving high-order partial differential equations. Sci Eng Partial Differ Equ Appl. https://doi.org/10.1016/j.padiff.2022.100477
Manshoor B, Salleh H, Khalid A, Sayed Abdelaal MA (2021) Method of lines and Runge-Kutta method in solving partial differential equation for heat equation. J Complex Flow 3(1):21–25
Khalilzadeh H, Habibzadeh-Sharif A, Ziaee Bideskan M, Anvarhaghighi N (2023) Design of a triple-band black phosphorus-based perfect absorber and full-wave analysis using the semi-analytical method of lines. Photonics Nanostruct Fundam Appl 53:101–112. https://doi.org/10.1016/j.photonics.2023.101112
Schesser WE (1991) The numerical methods of lines-integration of partial differential equations. Academic press, San Diego
Hicks JS, Wei J (1967) Numerical solution of parabolic partial differential equations with two-point boundary conditions by use method of lines. J Acm 14(3):549–562
Sharaf AA, Bakodah HO (2005) A good spatial discretisation in the method of lines. Appl Math Comput 171:1253–1263
Bakodah HO (2011) Non-centeral 7-point formula in the method of lines for parabolic and Burgers’ equations. IJRRAS 8(3):328–336
Kreiss HO, Scherer G (1992) Method of lines for hyperbolic differential equations. SIAM J Numer Anal 29(3):640–646
Alexander ME, Morris JLI (1979) Galerkin methods for some model equations for nonlinear dispersive waves. J Comput Phys 30:428–451
Refik Bahadir A (2005) Exponential finite-difference method applied to Korteweg-de Vries equation for small times. Appl Math Comput 160:675–682
Kutluay S, Bahadir AR, Özdeş A (2000) A small time solutions for the Korteweg-de Vries equation. Appl Math Comput 107:203–210
Taha TR, Ablowitz MJ (1984) Analytic and numerical aspects of certain non-linear evolution equations III. Numerical KdV equation. J Comp Phys 55:231–253
Funding
“The authors declare that no funds, grants, or other support were received during the preparation of this manuscript.”
Author information
Authors and Affiliations
Contributions
All authors contributed to the study conception and design. Material preparation, data collection and analysis were performed by Dr. Abeer Alshareef and Prof. Huda Bakodah. The first draft of the manuscript was written by Dr. Abeer Alshareef and Prof. Huda Bakodah. All authors commented on previous versions of the manuscript. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Conflict of interest
On behalf of all authors, the corresponding author states that there is no Conflict of interest
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Alshareef, A., Bakodah, H.O. Non-central m-point formula in method of lines for solving the Korteweg-de Vries (KdV) equation. J.Umm Al-Qura Univ. Appll. Sci. (2024). https://doi.org/10.1007/s43994-024-00154-w
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s43994-024-00154-w