Abstract
The KdV equation has special significance as it describes various physical phenomena. In this paper, we use two methods, namely, a variational homotopy perturbation method and a classical finite-difference method, to solve 1D and 2D KdV equations with homogeneous and non-homogeneous source terms by considering five numerical experiments with initial and boundary conditions. The variational homotopy perturbation method is a semi-analytic technique for handling linear as well as non-linear problems. We derive classical finite difference methods to solve the five numerical experiments. We compare the performance of the two classes of methods for these numerical experiments by computing absolute and relative errors at some spatial nodes for short, medium and long time propagation. The logarithm of maximum error vs. time from the numerical methods is also obtained for the experiments undertaken. The stability and consistency of the finite difference scheme is obtained. To the best of our knowledge, a comparison between the variational homotopy perturbation method and the classical finite difference method to solve these five numerical experiments has not been undertaken before. The ideal extension of this work would be an application of the employed methods for fractional and stochastic KdV type equations and their variants.
Keywords:
linear and non-linear KdV equations; homogeneous; non-homogeneous; variational homotopy perturbation method; classical finite difference method; stability; consistency MSC:
65M12; 65M06; 65M22; 35E15
1. Introduction
Different physical phenomena are modelled using partial differential equations (PDEs) in a variety of applied science fields, including fluid dynamics, cosmology, mathematical biology, quantum physics, chemical kinetics and linear optics. It is well known that the study of non-linear wave equations and their travelling wave solutions is of great importance in various areas. Palencia [1] explored travelling waves and instability in the case of a Fisher–KPP problem with a non-linear advection and a high-order diffusion (see [2,3] and the references therein). Solitary wave solutions of some PDE models have numerous applications in various scientific disciplines, including hydrodynamics, fluid mechanics, plasma physics, plasma waves and chemical physics, condensed matter and solid-state physics [4].
Numerous shallow water wave models have been developed to date [5], notably, the Korteweg–de Vries (KdV) equations, which govern the asymptotic dynamics of wave profiles of long waves in shallow water and are completely integrable. The KdV equation, which was formulated by Korteweg–de Vries in 1895, is recognised as a paradigm for the description of weakly non-linear long waves and is one of the most important non-linear evolution equations in the mathematical sciences [4,6,7,8]. It is given by
where Equation (1) admits solitary wave solutions [9] and is used as a model for ion-acoustic waves [10], non-resonant lattice vibrations, plasma magnetic current waves, pressure gauges for liquid-gas mixtures [7], cosmic inflations [11], long wave propagation through a channel [8], tectonic dynamics and earthquake prediction [12].
In general, the exact solution to the majority of non-linear PDEs may not be found; hence, many analytical techniques have been used for determining an approximate analytical solution. In some instances, the employment of numerical methods is an appropriate alternative. Some of the well-known numerical and analytical techniques used for non-linear PDEs include the spectral method [13], the finite element method [14], the collocation method [15,16,17,18], Adomian’s decomposition method (ADM) [19,20], the variational iteration method (VIM) [21,22,23], and the homotopy perturbation method (HPM) [24,25]. ADM has been applied to solve non-linear equations in [19,20] by separating the equation into linear and non-linear components. The method produces series solutions whose terms are computed from a recursive relation involving the Adomian polynomial, which itself is not an easy problem to address. To overcome these challenges, He [22] explored the variational iteration method (VIM) for solving linear and non-linear problems. We note that VIM was originally referred to in Inokuti et al. [26] as a modification of a general Lagrange multiplier method and it has been found that VIM is user-friendly. VIM was implemented to solve numerous non-linear ODEs and PDEs. VIM does not require exceptional treatment of the non-linear terms as in ADM [27], and it solves linear, as well as non-linear, problems directly. HPM was explored in [24,25] to solve different functional equations, by combining the standard homotopy technique of topology and a perturbation method. HPM has been applied to determine accurate asymptotic solutions for some non-linear PDEs that are used in modelling flows in porous media [28].
Due to the significance of the dispersive KdV equations and their applications, many researchers have been interested in studying various analytical and numerical techniques. These techniques include the differential quadrature method [29], the inverse scattering technique [4], the modified variational iteration technique [30], and the B-spline method [31] for fifth-order KdV equations. Wazwaz [32] applied the variational iteration method (VIM) to solve the Burgers, cubic Boussinesq, KdV, and equations. Nuruddeen et al. [33] studied a class of fifth-order KdV equations by formulating suitable novel hyperbolic and exponential estimates. The authors in [34] constructed classical and multisymplectic finite difference schemes for linearised KdV equations using numerical experiments and undertook dispersion analysis. Appadu et al. [35] solved some dispersive KdV equations via the LADM, the LADM based on Bernstein polynomials (BLADM), the HPM, and the reduced differential transform method. The authors derived an effective method, BALDM, using Bernstein polynomials, which is applicable to specific types of KdV equations; it was shown that the method diminished the large volume of calculations and its iteration steps towards an exact solution were straightforward. See also recent investigations reported in [36,37,38] for solving the dispersive KdV equations.
The numerical and analytical solutions of two- or higher-dimensional initial boundary value problems of real (or variable) coefficients, both linear and non-linear, are of considerable importance in the applied sciences. The dispersive KdV equation attracted our attention due to its various applications.
Motivated by recent research methodologies that have been developed for PDEs, we consider here an analytical method, known as the variational homotopy perturbation method (VHPM), to solve dispersive 1D and 2D KdV-type equations. VHPM is obtained by combining the homotopy perturbation approach and the variational iteration method [39]. VHPM uses Lagrange multipliers to identify the optimal values of parameters in a functional and homotopy perturbation method. This technique, when used, enables quick and accurate determination of the wave solution to the dispersive KdV equations. The proposed VHPM provides the solution in a quick convergent series, which can lead to a closed form solution and is in good agreement with other semi-analytic approaches [40] in which quite similar problems were solved using a decomposition method. The advantage of the VHPM over decomposition-based approaches is that it solves non-linear problems without the use of Adomian polynomials. For example, the Fisher’s equation is solved using VHPM [41]. It has also been successfully used with non-linear oscillators in [42].
In this investigation, our main objective is not only to apply the variational homotopy perturbation method (VHPM) to determine approximate analytical solutions to various 1D and 2D dispersive Korteweg–de Vries-type equations, but also to construct classical or standard finite difference methods for the experiments undertaken. We compare the performance of the two classes of methods. The investigation involved evaluation of the two methodologies, VHPM and FDM, to determine the most efficient method.
An original contribution of this study is the comparative investigation of the numerical solution of two classes of schemes, namely, the standard finite-difference method and a semi-analytic method, the VHPM, for solving linearised, as well as non-linear dispersive 1D and 2D KdV equations, with some initial and boundary conditions. The reason for working with short propagation times for the experiment pursued is because of their applications in earthquake modelling [12] and the simulation of optical laser pulses along fibres [36], whereas applications for medium and longer propagation times occur, for example, with respect to water waves, sound waves, surface and internal gravity waves arising in various oceanographic conditions [12], oscillations in a solid structure, and electromagnetic radiation [43]. We considered five numerical experiments; using Von Neumann’s analysis, we investigated the stability of the numerical schemes for all the experiments. Analytical proofs of the consistency of the numerical schemes are also given and it is shown that the numerical methods are convergent. The two- and three-dimensional surfaces of the obtained numerical, as well as analytical, solutions are plotted and the maximum error norms vs. time using loglog plots are computed for the experiments.
The remainder of this paper is organised as follows: Section 2 briefly describes the two classes of methods, namely, the semi-analytical variational homotopy perturbation method (VHPM) and the standard finite difference method (FDM). In this section, we describe how both the VHPM and the FDM schemes are constructed to solve the various partial differential equations for the numerical experiments considered. The five numerical experiments are described in Section 3. In Section 4, Section 5, Section 6, Section 7 and Section 8, we analyse the performance of the VHPM and FDM methods for 1D-homogeneous, 1D-non-homogeneous, 2D-homogeneous, 2D-non-homogeneous and 1D-non-homogeneous non-linear KdV equations, respectively. We compare the performance of the numerical schemes using the absolute and relative errors for short, medium and long time propagation. Finally, Section 9 highlights the key features of the paper.
2. The Methods
This section introduces the techniques employed in this paper to solve dispersive KdV problems, namely the standard FDM and VHPM.
2.1. Variational Homotopy Perturbation Method (VHPM)
The variational homotopy perturbation method is derived by combining VIM with HPM. Let us consider a general PDE
where , is a linear operator that includes partial derivatives with respect to x, is a non-linear operator and g is a non-homogeneous term, which is u-independent. By relying on VIM in [22,39], the correct functional for the problem in Equation (2) can be written as
where is a Lagrange multiplier that can be identified optimally via VIM [22]. Here, is considered to be a restricted variation which shows that . Making the correct functional (3) stationary yields
Its stationary conditions can be obtained using the technique of integration in Equation (4). Hence, we obtain [22,23]
By applying HPM, we obtain the following relation:
2.2. The Standard (Classical) Finite Difference Method
In order to derive the finite difference method for solving 1D and 2D dispersive KdV-type equations, we use the following difference approximations to approximate the derivatives:
where a uniform grid is introduced with
where and are the spatial and temporal step sizes, respectively. We obtain the stability region using von Neumann stability analysis and we also study the consistency of the numerical schemes.
3. Numerical Experiments
We solve five problems as detailed below.
- (i)
- We consider the linear homogeneous dispersive KdV equation [44]with , subject to initial conditions [44] and the boundary conditions: and . The exact solution is given by We used spatial step size for this experiment.
- (ii)
- We consider the linear non-homogeneous dispersive equation [44]with and the source term , subject to initial conditions , and the boundary conditions are given by and The exact solution is given by We used spatial step size for this experiment.
- (iii)
- We solve the 2D homogeneous equation [44]with subject to the initial conditionand the boundary conditions are given byThe exact solution is . We used for this experiment.
- (iv)
- We solve the following 2D non-homogeneous equation [43]with subject to the initial condition ; the boundary conditions are given by. The exact solution is . We used for this experiment.
- (v)
- We solve the dispersive non-linear KdV equationwhere subject to the initial conditionand the boundary conditions are given byThe exact solution is We used spatial step size for this experiment.
4. Numerical Experiment 1
4.1. Solution of Numerical Experiment 1 Using VHPM
Let us now rewrite Equation (7) as
where the differential operators are given by and .
We write Equation (7) as
where and . By comparing like terms of on both sides of Equation (17), we obtain the following components:
and so on. The rest of the components can be obtained in this manner. Thus, the semi-analytical solution with the first ten terms is given by
which converges to the exact solution as required.
In order to verify numerically whether the proposed method leads to higher accuracy, we compute the approximate solution using the n-term sum approximation up to a certain order, say n,
where
where are the approximate solutions obtained by VHPM. We observe that the numerical and exact profiles are close to each other, especially at low and medium propagation times.
Figure 1 shows the exact solution, as well as the VHPM solution vs. at times and , while Figure 2 depicts plots of the absolute errors versus at some different values of time t.

Figure 1.
Plots of exact and approximate solutions vs. x using terms from VHPM at times and . (The spatial step size used is .
Figure 2.
Plots of absolute errors vs. x at some values of time; t = (a) 0.1, (b) 1.0, (c) 2.0, (d) 4.0 using terms from VHPM .
4.2. Solution of Numerical Experiment 1 Using Finite Difference Scheme
We consider the homogeneous dispersive KdV equation
where The discretised form of the finite difference scheme for Equation (18) is given by
Equation (19) can be expressed as
for and . (We use N spatial nodes and the number of time nodes is Itmax). To facilitate the numerical computation, we need to use another scheme to obtain the solution at the second time level, using the FTCS scheme:
for and .
The stability region of the scheme can be determined using von Neumann stability analysis on substituting with in Equation (20) to get
where . Equation (21) can be rewritten as
Solving Equation (22) gives
where and are amplification factors of the physical and computational nodes, respectively.
We must have ; i.e., ; this then gives . We solve
For , we see that ; i.e., .
By letting , we have
By putting and solving for , gives We, thus, obtain or . Hence, the approximate region of stability, when , is given by
By choosing , we obtain
Consistency
Using Taylor’s series expansion about Equation (20) gives
After some simplifications, we get
As , Equation (27) gives and, therefore, we conclude that the scheme is consistent with Equation (18). The scheme is second-order accurate in time and space.
In Figure 3, we now obtain plots of the numerical and exact profiles vs. x.
Figure 3.
Plots of initial, numerical and exact solution vs. at times , using FDM with and .
The absolute and relative errors vs. x are shown in Figure 4 and Figure 5, respectively, using and .
Figure 4.
Plots of absolute errors vs. x at times using a classical finite difference scheme with and .
Figure 5.
Plots of relative errors vs. x at times , using a classical finite difference scheme with and .
The following plots give loglog graphs of the maximum error vs. time, .
We note that Figure 6 compares the effect of the loglog plot of the maximum error vs. time using two different time steps: , and with the spatial step using the classical FDM for Experiment 1.
Figure 6.
Plots of the maximum error vs. time and the loglog plot of max. error vs. time using the classical FDM for Experiment 1 with , and .
5. Numerical Experiment 2
5.1. Solution of Experiment 2 Using VHPM
Let us now consider
with the source term as given in Equation (8). If we now employ the procedures of VHPM using Equation (5), we can rewrite Equation (8) as
where we have , as noted above.
Using Equation (29), the first few VHPM approximation terms are given by
and so on; in this way the remaining equations of VHPM in the series can be obtained. Thus, the approximate solution to Equation (8), using the first seven terms, is:
We observe that Equation (31) converges to the exact solution .
From Figure 7 and Figure 8, we see that VHPM has some challenges for medium and long time propagation; however, it is quite effective for short times for the considered numerical experiment. We note that short time propagation experiments have applications in the analysis of physical phenomena, such as cosmic dynamics [11] and the modelling of earthquakes and tsunamis, as well as oceanographic applications [12].
Figure 7.
Plots of the exact and approximate solution vs. x at times 0.01, and 0.10 with , using terms from VHPM.
Figure 8.
Plots of absolute errors vs. x at times 0.01, and 0.10 with using terms from VHPM.
Remark 1.
One can observe from Equations (30a)–(30e) the occurrence of noise terms. By ‘noise’ terms, we mean the identical terms, with opposite signs, that may appear in various components [45,46]. These terms do not show up for homogeneous equations but are used solely for specific types of non-homogeneous equations. A necessary condition for the generation of the noise terms for non-homogeneous problems is that the zeroth component must contain the exact solution u among other terms. For a complete and thorough discussion of noise terms, we refer readers to [46].
5.2. Solution of Numerical Experiment 2 Using Finite Difference Scheme
We propose the following CTCS (CTCS denotes central in time central in space scheme) scheme to discretise Equation (8):
Equation (32) can be rewritten as
for and .
To obtain a solution at the second time level, we use the following FTCS scheme (FTCS denotes forward in the time central in space scheme):
which can be rewritten as
In order to find the region of stability for Equation (8), we consider Equation (33) with the source term being zero since the source term does not depend on u. We have
By substituting by in Equation (36) and simplifying, we get
Equation (37) can be expressed as
Solving Equation (38) yields
For stability, we need
which simplifies to
We now let . This gives . By putting , we obtain for . Thus, the region of stability associated with Equation (8) is given by
which simplifies as
We choose and, therefore, (The choice is used to run the experiment).
Consistency
We consider Equation (8). The Taylor series expansion about gives
Simplifying Equation (39) gives
Thus, the scheme is consistent and is second-order accurate in time and space.
We obtain plots of the numerical and exact profiles vs. x; the corresponding graphical representations of the absolute and relative errors vs. x are shown in Figure 9 and Figure 10, respectively.
Figure 9.
Plots of the exact and numerical solution vs. at times , using a classical finite difference scheme with , with corresponding absolute and relative errors vs. x (at times ), respectively. (a) , (); (b) , (); (c) , (); (d) , (); (e) , (); (f) , ().
Figure 10.
Plots of the exact and numerical solution vs. at times , using a classical finite difference scheme with , , with corresponding absolute and relative errors vs. x (at times ), respectively. (a) , (); (b) , (); (c) , (); (d) , (); (e) , (); (f) , ().
Table 1 displays a comparison between the approximate solution and the exact solution together with corresponding absolute and relative errors.
Table 1.
Absolute and relative errors at some values of x using a classical finite difference scheme with , at times .
Remark 2.
For the non-homogeneous case (1D space), VHPM faces challenges, even for short time propagation, whereas the classical finite-difference method performs quite well; its relative error ranges from to . The 3D surface plot in Figure 11 for the exact and numerical solution using classical FDM validates the numerical results in Table 1. Figure 12 also shows plots for the maximum error vs. time and the loglog plot of the maximum error vs. time using the standard FDM for Experiment 2 with and .
Figure 11.
3D surface plots of the (a) exact solution and (b) numerical solution vs. x at time with , using the standard finite difference method.
Figure 12.
Plots of the maximum error vs. time , and the loglog plot of max. error vs. time, using the classical FDM with and .
6. Numerical Experiment 3
6.1. Solution of Numerical Experiment 3 Using VHPM
By considering the homogeneous 2D KdV equation in Equation (9), and by applying the VHPM procedure, we have
We then compare the coefficients of on both sides of Equation (40) to obtain
and so on. Hence, the sum of the first seven approximate VHPM-terms, as in Equation (41), which are close to the exact solution, is
which converges to the closed form as required.
Table 2.
A comparison between the exact solution and VHPM solution at some values of x and y at time .
Figure 13.
3D graphical representation of the exact solution and approximate solutions vs. x vs. y using terms from VHPM for Equation (9) at times , respectively. (a) ; (b) ; (c) ; (d) .
The following graphics in Figure 13 show the results of the exact and approximate solutions using VHPM; the behaviour of the numerical results is shown in Table 2.
Remark 3.
Table 2 compares the exact solution with the VHPM solution with corresponding absolute and relative errors at some values of x and y, and at times , and , respectively. Figure 13 depicts the 3D graphs of the exact and approximate solution vs. x vs. y using terms from the VHPM. From the numerical results, one can see that the VHPM solution is effective for short time propagation and may struggle to achieve accuracy for long time propagation.
6.2. Solution of Numerical Experiment 3 Using Finite Difference Scheme
In order to construct a classical finite difference method to solve numerical Experiment 3, we use the following central difference approximations:
We point out that a rectangular domain is divided into square grids with each x and y interval of length and , respectively, whereas each t-interval is of length . A uniform grid is considered with
The scheme is given by
Hence, the numerical scheme takes the form
where
By substituting by we obtain
By dividing both sides of Equation (44) with , we have
Equation (45) can be expressed as
which simplifies to
where
and and are given as in Equation (43). By solving the quadratic equation in Equation (46), we obtain
A condition for the stability criterion is determined by finding a condition for , so that, for all
Hence, Equation (47) is equivalently expressed as
We fixed . For stability, we need to solve
We now give the 3D graphical representation of vs. vs. , as in Figure 14.
Figure 14.
Plots of vs. vs. for the -values of . (a) ; (b) ; (c) ; (d) .
We deduce that the stability region is
Remark 4.
Consistency
We consider the dispersive 2D KdV equation given in Equation (9) and, using the Taylor series expansion about we have
Thus, the scheme in Equation (42) is consistent with the PDE in (9) and is second-order accurate in time and space.
Let us consider the homogeneous 2D-dispersive equation as in Equation (9) with subject to the initial condition in Equation (10); the time-dependent boundary conditions are given by
We note that the finite difference scheme given in Equation (42) works in such a way that the unknown value of at iteration ; is computed at the preceding iteration values of the indices , ,, , , and .
The initial condition in Equation (10) tells us that for while the non-zero Dirichlet boundary conditions in Equation (48) give the equations
for . In other words, if is a boundary node, then , where g is considered from the non-zero Dirichlet boundary conditions given in (48).
The following graphics depict plots of the maximum error vs. time and the loglog plot of the maximum error vs. time for numerical Experiment 3, as displayed in Figure 15.
Figure 15.
Plots of the maximum error vs. time and the loglog plot of max. error vs. time using the standard FDM for Experiment 3 with and .
Remark 5.

When used to solve the homogeneous 2D KdV equation, VHPM performs excellently at and performs well at time , but is less effective at time . On the other hand, the classical finite difference scheme performs well for short, medium, and long time propagation, as shown in Table 3. We see that Figure 16 shows the 3D plots of the exact and numerical solution, using the standard finite difference scheme for Equation (42) on at times with spatial step sizes and time step .
Table 3.
A comparison between the exact solution and FDM solution at some values of x and y three different time propagations.

Figure 16.
Plots of exact and numerical solution vs. x vs. y, using the classical FDMscheme of Equation (42) on at t = 0.10, 1.0, 2.0 used spatial step sizes Δx = Δy = 0.1 and time-step Δt = 0.0001. (a) Time = 0.10; (b) Time = 0.10; (c) Time = 1.0; (d) Time = 1.0; (e) Time = 2.0; (f) Time = 2.0.
7. Numerical Experiment 4
7.1. Solution of Numerical Experiment 4 Using VHPM
Let us consider the non-homogeneous 2D KdV equation given in Equation (12). We now apply the VHPM procedure given in Equations (3) and (5) into Equation (12) to obtain
Equation (49) reduces to
where the source term is .
By now collecting terms of the same power of , the components of ’s are obtained as
Using Equation (51), the solution, using VHPM, reads as
By looking at the components and in Equation (52), one can easily observe that the first two terms are self-cancelling (noise) terms, confirming that the exact solution is concentrated in the initial few approximations. It is of note that the higher-order components vanish quickly to assure rapid convergence to the exact solution. Figure 17 shows the 3D plots of the exact and VHPM solution vs. x vs. y for Experiment 4.
Figure 17.
(Left) Graphical representation of the exact (as well as the VHPM) solution vs. vs. along , and (Right) plot of the VHPM solution (with ) (as well as the exact solution) vs. vs. at time .
Remark 6.
Following the approaches described in [27,46,47], if we modify VHPM by shifting the source term, we obtain a solution which converges to the exact solution after only two iterations. Such a modification for most PDEs usually gives a promising result, depending on the type of problem considered (cf. [48]). We note here that G. Adomian and Rach [49] and Wazwaz [45] investigated the phenomenon of self-cancelling ‘noise’ terms where some terms in the series vanish on the limit. These ‘noise’ terms do not show up for homogeneous equations but solely for specific types of non-homogeneous equations. It was formally shown that by cancelling the noise terms that appear in and from , even though contains additional terms, the remaining non-cancelled terms of may give the exact solution of the non-homogeneous problem [43].
7.2. Solution of Numerical Experiment 4 Using Finite Difference Scheme
To obtain the stability region of the classical FDM for Experiment 4, we consider the following scheme
where and are given in Equation (43).
Taylor’s series expansion about gives
Simplifying Equation (54) gives
Thus, the scheme is consistent with the PDE in (12) and is second-order accurate in time and space.
Figure 18 shows plots of the maximum error vs. time and the loglog plot of the maximum error vs. time using the classical FDM for Experiment 4.
Figure 18.
Plots for the maximum error vs. time and the loglog plot of the max. error vs. time using the standard FDM for Experiment 4 with and , respectively.
Figure 19 gives the 3D plots for the numerical solution vs. x vs. y, using the classical FDM with the exact solution at times for Experiment 4. We can also see from Table 4 that the classical finite difference scheme performs very well for numerical Experiment 4 and that the numerical results using VHPM rapidly converge to the exact solution, as shown in Section 7.1.

Figure 19.
3D plots of the exact and the FDM solution vs. x vs. y for (x;y) ∈ Ω, Ω = (Δt = ) at times t = 1.0, 2.0, 5.0, 8.0. (a) Δt = 1.0 , Time = 1.0; (b) Δt = 1.0 , Time = 1.0; (c) Δt = 1.0 , Time = 2.0; (d) Δt = 1.0 , Time = 2.0; (e) Δt = 1.0 , Time = 5.0; (f) Δt = 1.0 , Time = 5.0; (g) Δt = 1.0 , Time = 8.0; (h) Δt = 1.0 , Time = 8.0.
Table 4.
A comparison between the exact solution and FDM solution at some values of x and y at times (Experiment 4).
8. Numerical Experiment 5
8.1. Solution of Numerical Experiment 5 Using VHPM
Let us now rewrite Equation (42) as
where the differential operators are given by and and .
Using Equation (5), we write Equation (42) as
where and . By comparing like terms of on both sides of Equation (17), we obtain the following components:
Thus, the sum of the first five-term approximate solution obtained by VHPM in Equation (56) takes the form
In Table 5, the absolute and relative errors are tabulated for some values of x at four different time values: , and . Figure 20 displays graphically the exact and the VHPM solutions to Experiment 5.
Table 5.
Absolute and relative errors (VHPM with ) at some values of and .
Figure 20.
3D plot of the exact and approximate solutions, using terms from VHPM vs. vs. . (a) Solution using VHPM; (b) Exact solution.
8.2. Solution of Numerical Experiment 5 Using Finite Difference Scheme
Let us consider Equation (42). Equation (18) is discretised, using the Zabusky–Kruskal method [9], as
The scheme is given by
for and . To facilitate the numerical computation, we need to use another scheme to obtain a solution at the second time level by proposing the following scheme:
for and .
The stability region of the scheme for Equation (14) can be determined by relying on the idea of frozen coefficients [50] for writing as , together with the von Neumann ansatz
where is the phase angle, to obtain the following relation from Equation (58),
where
, with the least upper bound on .
A condition for the stability criterion is obtained by finding a condition on so that, for , is true. This gives
which gives
Since the second expression in the bracket for the above inequality dominates the first for small values of , we obtain from the second expression, which gives the maximum value for the inequality.
On substituting this into the inequality, we obtain the region of stability as [51]
By considering with (using the Maple max function) for , Equation (63) gives
Consistency of the Numerical Scheme in Equation (42)
We consider Equation (42). The Taylor series expansion about gives
The scheme is consistent with the PDE given in Equation (42) and is second-order accurate in time and space.
The following are plots of the numerical and exact profiles vs. x in Figure 21, Figure 22, Figure 23 and Figure 24 and the corresponding plots of the absolute errors vs. x, as follows:

Figure 21.
Plots of initial, numerical and exact solutions vs. x ∈ [0, 2π] at times t = 0.10, 2.0, 4.0, 8.0, using the classical finite difference scheme with Δt = and Δx =
.
Figure 22.
Plots of absolute errors vs. x at times , using a classical finite difference scheme with and .

Figure 23.
Plots of relative errors vs. x at times , using the classical finite difference scheme with and .
Figure 24.
Plot of the maximum error vs. time and the loglog plot of the maximum error vs. time t with and , using the standard finite difference scheme, respectively.
9. Conclusions
In this paper, the performance of the VHPM and classical finite difference methods were compared when solving the linear, as well as the non-linear, KdV equation in 1D- and 2D-space for five different cases:
- (i)
- case 1: 1D linear homogeneous,
- (ii)
- case 2: 1D linear non-homogeneous,
- (iii)
- case 3: 2D linear homogeneous,
- (iv)
- case 4: 2D linear non-homogeneous.
- (v)
- case 5: 1D non-linear homogeneous.
We obtained the stability region of the classical finite difference schemes for the five different equations considered. The schemes were tested for the five different cases for short, medium and long time propagation.
For case 1, VHPM produced excellent results for short propagation time and it performed well for medium propagation time; however, it performed poorly for long time propagation. The standard finite difference schemes performed well for short, medium and long time propagation.
VHPM faces some dificulties for case 2 for which the source terms consist of sine and cosine terms; the scheme is quite dissipative even for short propagation time. In contrast, the classical finite difference scheme resolved case 2 quite efficiently for short, medium and long time propagation.
For case 3, the classical finite difference scheme performed well for short, medium and long time propagation, with a relative error of order to VHPM performed excellently for short and medium time propagation, but its accuracy deteriorated for longer time propagation, for example, at time 2.0, with a relative error of order to
With respect to case 4, the classical finite difference scheme performed well for short, medium and long time propagation with a relative error of order to , as shown in Table 4. Due to the nature of the source term used for this problem, VHPM quickly converged to the exact solution in the first two iterations; there was rapid convergence to the exact solution.
For case 5, the VHPM provided a very good result for short time propagation but performed satisfactorily for medium time propagation. The classical schemes performed well for short, medium and long time propagation, with a relative error of order to .
In sum, we conclude that the VHPM was able to efficiently solve numerical Experiments 1, 3, 5 for short and medium time propagation. The VHPM was not effective in solving Experiment 2, but was effective in solving Experiment 4 for different times of propagation. We can also deduce that the classical finite difference scheme was quite efficient in solving all the five experiments for short, medium and long time propagation.
This study provides a basis for constructing numerical methods for more complicated PDEs, such as time and space fractional KdV, KdV-Burgers and stochastic KdV equations, which model real world phenomena, such as wave dynamics [43], geophysical flows, tsunami models, tectonic dynamics [12] and cosmic inflations [11].
Author Contributions
Conceptualization, A.R.A. and A.S.K.; methodology, A.R.A. and A.S.K.; software, A.S.K.; validation, A.R.A.; formal analysis, A.R.A. and A.S.K.; investigation, A.R.A. and A.S.K.; resources, A.R.A.; data curation, A.R.A. and A.S.K.; writing—original draft preparation, A.S.K. and A.R.A.; visualization, A.R.A. and A.S.K.; supervision, A.R.A.; project administration, A.R.A. and A.S.K.; funding acquisition, A.R.A. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by NRF (National Research Foundation) postdoc Scarce skills funding under grant number 138521.
Data Availability Statement
Not applicable.
Acknowledgments
The authors are grateful to the three anonymous reviewers who provided feedback which enables the authors to significantly improve the presentation and focus of the paper. A.R. Appadu is grateful to Nelson Mandela University for carrying out this research. A.S. Kelil is very grateful for postdoctoral research funding from NRF scarce skills. He is also grateful to the top-up funding support of the DST-NRF Centre of Excellence in Mathematical and Statistical Sciences (CoE-MaSS) towards the research. The opinions expressed and the conclusions arrived at are those of the authors and are not necessarily to be attributed to the CoE-MaSS.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Palencia, J.L.D. Travelling waves and instability in a Fisher-KPP problem with a nonlinear advection and a high-order diffusion. Eur. Phys. J. 2021, 136, 774. [Google Scholar] [CrossRef]
- Palencia, J.L.D. Travelling waves approach in a parabolic coupled system for modelling the behaviour of substances in a fuel tank. Appl. Sci. 2021, 11, 5846. [Google Scholar] [CrossRef]
- Palencia, J.L.D.; Ur Rahman, S.; Naranjo, A. Analysis of travelling wave solutions for Eyring-Powell fluid formulated with a degenerate diffusivity and a Darcy-Forchheimer law. AIMS Math. 2022, 7, 6898–6914. [Google Scholar] [CrossRef]
- Ablowitz, M.J.; Clarkson, P.A. Solitons, Nonlinear Evolution Equations and Inverse Scattering; Cambridge University Press: Cambridge, UK, 1999; Volume 149. [Google Scholar]
- Constantin, A.; Escher, J. Wave breaking for nonlinear nonlocal shallow water equations. Acta Math. 1998, 181, 229–243. [Google Scholar] [CrossRef]
- Korteweg, D.J.; de Vries, G. On the change of form of long waves advancing in a rectangular canal, and on a new type of long stationary waves. Philos. Mag. 1895, 39, 422–443. [Google Scholar] [CrossRef]
- Kenig, C.E.; Ponce, G.; Vega, L. A bilinear estimate with applications to the KdV equation. J. Am. Math. Soc. 1996, 9, 573–603. [Google Scholar] [CrossRef]
- Bhrawy, A.H.; Doha, E.H.; Ezz-Eldien, S.S. A numerical technique based on the shifted Legendre polynomials for solving the time-fractional coupled KdV equations. Calcolo 2016, 53, 1–17. [Google Scholar] [CrossRef]
- Zabusky, N.J.; Kruskal, M.D. Interaction of “solitons” in a collisionless plasma and the recurrence of initial states. Phys. Rev. Lett. 1965, 15, 240. [Google Scholar] [CrossRef]
- Guo, M.; Fu, C.; Zhang, Y. Study of ion-acoustic solitary waves in a magnetized plasma using the three-dimensional time-space fractional schamel-KdV equation. Complexity 2018, 2018, 6852548. [Google Scholar] [CrossRef]
- Lidsey, J.E. Cosmology and the Korteweg-de Vries equation. Phys. Rev. D 2012, 86, 123523. [Google Scholar] [CrossRef]
- Lakshmanan, M. Solitons, Tsunamis and Oceanographical Applications of. In Encylopedia of Complexity and Dynamical Systems; Meyers, R., Ed.; Springer: New York, NY, USA, 2009; pp. 8506–8521. [Google Scholar] [CrossRef]
- Pelloni, B.; Dougalis, V.A. Numerical solution of some nonlocal, nonlinear dispersive wave equations. J. Nonlinear Sci. 2000, 10, 1–22. [Google Scholar] [CrossRef]
- Sewell, G. Analysis of a Finite Element Method; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2012. [Google Scholar]
- Huntul, M.J.; Tamsir, M.; Ahmadini, A.A.H.; Thottoli, S.R. A novel collocation technique for parabolic partial differential equations. Ain Shams Eng. J. 2022, 13, 101497. [Google Scholar] [CrossRef]
- Gelu, F.W.; Duressa, G.F. A uniformly convergent collocation method for singularly perturbed delay parabolic reaction-diffusion problem. Abstr. Appl. Anal. 2021, 2021, 11. [Google Scholar] [CrossRef]
- Luo, W.H.; Huang, T.Z.; Gu, X.M.; Liu, Y. Barycentric rational collocation methods for a class of nonlinear parabolic partial differential equations. Appl. Math. Lett. 2017, 68, 13–19. [Google Scholar] [CrossRef]
- Samuel, F.M.; Motsa, S.S. A highly accurate trivariate spectral collocation method of solution for two-dimensional nonlinear initial-boundary value problems. Appl. Math. Comput. 2019, 360, 221–235. [Google Scholar] [CrossRef]
- Adomian, G. Solving Frontier Problems of Physics: The Decomposition Method; Kluwer Academic Publishers: Amsterdam, The Netherlands, 1994. [Google Scholar]
- Adomian, G. A review of decomposition method and some recent results for nonlinear equation. Math. Comput. Model. 1992, 13, 17–43. [Google Scholar] [CrossRef]
- Abassy, T.A.; El-Tawil, M.A.; Saleh, H.K. The solution of KdV and mKdV equations using Adomian Padé approximation. Int. J. Nonl. Sci. Num. Simul. 2004, 5, 327–339. [Google Scholar] [CrossRef]
- He, J.H. Variational iteration method—A kind of non-linear analytical technique: Some examples. Int. J. Non-Linear Mech. 1999, 34, 699–708. [Google Scholar] [CrossRef]
- Wazwaz, A.M. A study on linear and nonlinear Schrödinger equations by the variational iteration method. Chaos Solit. 2008, 37, 1136–1142. [Google Scholar] [CrossRef]
- He, J.H. Homotopy perturbation technique. Comput. Methods Appl. Mech. Eng. 1999, 178, 257–262. [Google Scholar] [CrossRef]
- He, J.H. Homotopy perturbation method: A new non-linear analytical technique. Appl. Math. Comput. 2003, 135, 73–79. [Google Scholar] [CrossRef]
- Inokuti, M.; Sekine, H.; Mura, T. General use of the Lagrange multiplier in nonlinear mathematical physics. In Variational Method in the Mechanics of Solids; Nemat-Naseer, S., Ed.; Pergamon Press: New York, NY, USA, 1978; pp. 156–162. [Google Scholar]
- Wazwaz, A.M. A comparison between the variational iteration method and Adomian decomposition method. J. Comput. Appl. Math. 2007, 207, 129–136. [Google Scholar] [CrossRef]
- Dehghan, Z.M.; Shakeri, F. Use of He’s Homotopy perturbation method for solving a partial differential equation arising in modeling of flow in porous media. J. Porous Media 2008, 11, 765–778. [Google Scholar] [CrossRef]
- Karunakar, P.; Chakraverty, S. Differential quadrature method for solving fifth-order KdV equations. In Recent Trends in Wave Mechanics and Vibrations; Springer: Singapore, 2020; pp. 361–369. [Google Scholar] [CrossRef]
- Ahmad, H.; Khan, T.A.; Stanimirovic, P.S.; Ahmad, I. Modified variational iteration technique for the numerical solution of fifth order KdV-type equations. J. Appl. Comput. Mech. 2020, 6, 1220–1227. [Google Scholar] [CrossRef]
- Zahra, W.K.; Ouf, W.A.; El-Azab, M.S. B-spline soliton solution of the fifth order KdV type equations. AIP Conf. Proc. 2013, 1558, 568–572. [Google Scholar] [CrossRef]
- Wazwaz, A.M. The variational iteration method for rational solutions for KdV, K(2,2), Burgers, and cubic Boussinesq equations. J. Comput. Appl. Math. 2007, 207, 18–23. [Google Scholar] [CrossRef]
- Park, C.; Nuruddeen, R.I.; Ali, K.K.; Muhammad, L.; Osman, M.S.; Baleanu, D. Novel hyperbolic and exponential ansatz methods to the fractional fifth-order Korteweg–de Vries equations. Adv. Differ. Equ. 2020, 1, 627. [Google Scholar] [CrossRef]
- Aderogba, A.A.; Appadu, A.R. Classical and Multisymplectic Schemes for Linearized KdV Equation: Numerical Results and Dispersion Analysis. Fluids 2021, 6, 214. [Google Scholar] [CrossRef]
- Appadu, A.R.; Kelil, A.S. On Semi-Analytical Solutions for Linearized Dispersive KdV equation. Mathematics 2020, 8, 1769. [Google Scholar] [CrossRef]
- Appadu, A.R.; Kelil, A.S. Comparison of modified ADM and classical finite difference method for some third-order and fifth-order KdV equations. Demonstr. Math. 2021, 54, 377–409. [Google Scholar] [CrossRef]
- Kelil, A.S.; Appadu, A.R. Shehu-Adomian decomposition method for dispersive KdV-type equations. In Mathematical Analysis and Applications; Springer: Singapore, 2021; pp. 103–129. [Google Scholar] [CrossRef]
- Appadu, A.R.; Kelil, A.S. Solution of 3D linearized KdV equation using reduced differential transform method. AIP Conf. Proc. 2022, 2425, 020016. [Google Scholar] [CrossRef]
- Matinfar, M.; Mahdavi, M.; Raeisi, Z. The variational homotopy perturbation method for analytic treatment for linear and nonlinear ordinary differential equations. J. Appl. Math. Inform. 2010, 28, 845–862. [Google Scholar]
- He, J.H.; Wu, X.H. Construction of solitary solution and compacton-like solution by variational iteration method. Chaos Solit. 2006, 29, 108–113. [Google Scholar] [CrossRef]
- Matinfar, M.; Mahdavi, M.; Raeisy, Z. The implementation of variational homotopy perturbation method for Fisher’s equation. Int. J. Nonlinear Sci. 2010, 9, 188–194. [Google Scholar]
- Fernández, F.M. On the variational homotopy perturbation method for nonlinear oscillators. J. Math. Phys. 2012, 53, 024101. [Google Scholar] [CrossRef]
- Wazwaz, A.M. Partial Differential Equations and Solitary Waves Theory; Higher Education: Beijing, China; Springer: Berlin/Heidelberg, Germany, 2009. [Google Scholar]
- Wazwaz, A.M. An analytic study on the third-order dispersive partial differential equations. Appl. Math. Comput. 2003, 142, 511–520. [Google Scholar] [CrossRef]
- Wazwaz, A.M. Necessary conditions for the appearance of noise terms in decomposition solution series. J. Math. Anal. Appl. 1997, 5, 265–274. [Google Scholar] [CrossRef]
- Wazwaz, A.M. Partial Differential Equations: Methods and Applications; Balkema Publishers: Lisse, The Netherlands, 2002. [Google Scholar]
- Goswami, V.; Singh, J.; Kumar, D. Numerical simulation of fifth order KdV equation occurring in magneto-acoustic waves. AIN Shams Eng. J. 2018, 9, 2265–2273. [Google Scholar] [CrossRef]
- Mohyud-Din, S.T.; Yildirim, A.; Sezer, S.A.; Usman, M. Modified variational iteration method for free-convective boundary-layer equation using Padé approximation. Math. Prob. Eng. 2010, 2010, 318298. [Google Scholar] [CrossRef]
- Adomian, G.; Rach, R. Noise terms in decomposition solution series. Comp. Math. Appl. 1992, 24, 61–64. [Google Scholar] [CrossRef]
- Taha, T.R.; Ablowitz, M.I. Analytical and numerical aspects of certain nonlinear evolution equations III, Numerical, Korteweg-de Vries equation. J. Comput. Phys. 1984, 55, 231–253. [Google Scholar] [CrossRef]
- Appadu, A.R.; Chapwanya, M.; Jejeniwa, O.A. Some optimised schemes for 1D Korteweg-de-Vries equation. Prog. Comput. Fluid Dyn. 2017, 17, 250–266. [Google Scholar] [CrossRef]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).