Next Article in Journal
On the Optimal Control Problem for Vibrations of the Rod/String Consisting of Two Non-Homogeneous Sections with the Condition at an Intermediate Time
Next Article in Special Issue
Correction: Cakir, M.; Gunes, B. A Fitted Operator Finite Difference Approximation for Singularly Perturbed Volterra-Fredholm Integro-Differential Equations. Mathematics 2022, 10, 3560
Previous Article in Journal
An Inertial Modified S-Algorithm for Convex Minimization Problems with Directed Graphs and Its Applications in Classification Problems
Previous Article in Special Issue
Novel Soliton Solutions of the Fractional Riemann Wave Equation via a Mathematical Method
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

On the Numerical Solution of 1D and 2D KdV Equations Using Variational Homotopy Perturbation and Finite Difference Methods

by
Abey Sherif Kelil
* and
Appanah Rao Appadu
Department of Mathematics and Applied Mathematics, Nelson Mandela University, Port Elizabeth 6031, South Africa
*
Author to whom correspondence should be addressed.
Mathematics 2022, 10(23), 4443; https://doi.org/10.3390/math10234443
Submission received: 11 September 2022 / Revised: 15 November 2022 / Accepted: 18 November 2022 / Published: 24 November 2022
(This article belongs to the Special Issue Numerical Methods and Applications for Differential Problems)

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.

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
u ( t , x ) t + u ( t , x ) u ( t , x ) x + 3 u ( t , x ) x 3 = 0 ,
where u ( x , t ) : R × R + R . 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 K ( 2 , 2 ) 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
L [ u ( t , x ) ] + M [ u ( t , x ) ] + N [ u ( t , x ) ] = g ( t , x ) ,
where L = t , M is a linear operator that includes partial derivatives with respect to x, N 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
u n + 1 ( t , x ) = u n ( t , x ) + 0 t λ ( τ ) L u n ( τ , x ) ) + M u n ( τ , x ) ) + N u ˜ n ( τ , x ) g ( τ , x ) d τ ,
where λ is a Lagrange multiplier that can be identified optimally via VIM [22]. Here, u ˜ n is considered to be a restricted variation which shows that δ u ˜ n = 0 . Making the correct functional (3) stationary yields
δ v n + 1 ( t , x ) = δ v n ( t , x ) + δ 0 t λ ( τ ) L v n ( τ , x ) ) + M v n ( τ , x ) ) + N v ˜ n ( τ , x ) g ( τ ) d τ = δ v n ( t , x ) + 0 t δ λ ( τ ) L v n ( τ , x ) ) + M v n ( τ , x ) d τ .
Its stationary conditions can be obtained using the technique of integration in Equation (4). Hence, we obtain [22,23]
λ ( τ ) = ( 1 ) m ( τ x ) m 1 ( m 1 ) ! .
By applying HPM, we obtain the following relation:
i = 0 ρ i u i ( t , x ) = u 0 ( t , x ) + ρ 0 t λ ( τ ) L i = 0 ρ i u i + M i = 0 ρ i u i + N i = 0 ρ i u ˜ i d τ 0 t λ ( τ ) g ( τ , x ) d τ .
The values u 0 , u 1 , u 2 , , are obtained by comparing the like powers of ρ . Thus, the approximate solution of Equation (2) can be given as
u ( t , x ) = lim ρ 1 i = 0 ρ i u i ( t , x ) = u 0 ( t , x ) + u 1 ( t , x ) + u 2 ( t , x ) + ,
which converges for most cases; it is always assumed that Equation (6) has a unique solution.

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:
u t | i n U i n + 1 U i n 1 2 Δ t , u x | i n U i + 1 n U i 1 n 2 Δ x , 3 u x 3 | i n U i + 2 n 2 U i + 1 n + 2 U i 1 n U i 2 n 2 ( Δ x ) 3 ,
where a uniform grid ( x i , t n ) is introduced with
x i = ( i 1 ) · Δ x , i = 1 , , N , and t n = ( n 1 ) · Δ t , n N ,
where Δ x and Δ t 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]
u ( t , x ) t + 2 u ( t , x ) x + 3 u ( t , x ) x 3 = 0 ,
with ( t , x ) [ 0 , 10.0 ] × [ 0 , 2 π ] , subject to initial conditions [44] u ( 0 , x ) = sin ( x ) and the boundary conditions: u ( t , 0 ) = sin ( t ) and u ( t , 2 π ) = sin ( 2 π t ) . The exact solution is given by u ( t , x ) = sin ( t x ) . We used spatial step size Δ x = π 10 for this experiment.
(ii)
We consider the linear non-homogeneous dispersive equation [44]
u ( t , x ) t + 3 u ( t , x ) x 3 = h ( t , x ) ,
with ( t , x ) [ 0 , 1.0 ] × [ 0 , 1.0 ] , and the source term h ( t , x ) = sin ( t ) sin ( π x ) π 3 cos ( t ) cos ( π x ) , subject to initial conditions u ( 0 , x ) = sin ( π x ) , and the boundary conditions are given by u ( t , 0 ) = 0 and u ( t , 1.0 ) = 0 . The exact solution is given by u ( t , x ) = cos ( t ) sin ( π x ) . We used spatial step size Δ x = 0.05 for this experiment.
(iii)
We solve the 2D homogeneous equation [44]
u ( t , x , y ) t + 3 u ( t , x , y ) x 3 + 3 u ( t , x , y ) y 3 = 0 ,
with ( t , x , y ) [ 0 , 3.0 ] × Ω , Ω = [ 0 , 1.0 ] × [ 0 , 1.0 ] , subject to the initial condition
u ( 0 , x , y ) = cos ( x + y )
and the boundary conditions are given by
u ( t , x , 0 ) = cos ( 2 t + x ) , u ( t , x , 1 ) = cos ( 1 + 2 t + x ) , u ( t , 0 , y ) = cos ( 2 t + y ) , u ( t , 1 , y ) = cos ( 2 t + 1 + y ) .
The exact solution is u ( t , x , y ) = cos ( 2 t + x + y ) . We used Δ x = Δ y = 0.1 for this experiment.
(iv)
We solve the following 2D non-homogeneous equation [43]
u ( t , x , y ) t + 3 u ( t , x , y ) x 3 + 3 u ( t , x , y ) y 3 = exp ( t ) cos ( x y ) ,
with ( t , x , y ) [ 0 , 8.0 ] × Ω , Ω = [ 0 , 1.0 ] × [ 0 , 1.0 ] , subject to the initial condition u ( 0 , x , y ) = sin ( x y ) ; the boundary conditions are given by
u ( t , x , 0 ) = exp ( t ) cos ( x ) , u ( t , x , 1 ) = exp ( t ) cos ( 1 x ) , u ( t , 0 , y ) = exp ( t ) cos ( y ) , u ( t , 1 , y ) = exp ( t ) cos ( 1 y ) ,
. The exact solution is u ( t , x , y ) = exp ( t ) cos ( x y ) . We used Δ x = Δ y = 0.1 for this experiment.
(v)
We solve the dispersive non-linear KdV equation
u ( t , x ) t + 6 u ( x , t ) u ( t , x ) x + 3 u ( t , x ) x 3 = 0 ,
where ( t , x ) [ 0 , 1.0 ] × [ 0 , 2 π ] , subject to the initial condition
u ( x , 0 ) = 1 2 sech 2 1 2 x ,
and the boundary conditions are given by
u ( 0 , t ) = 1 2 sech 2 t 2 , and u ( 2 π , t ) = 1 2 sech 2 π t 2 ; u x ( 0 , t ) = 1 2 sech 2 t 2 tanh t 2 .
The exact solution is u ( x , t ) = 1 2 sech 2 1 2 x t . We used spatial step size Δ x = π 10 for this experiment.

4. Numerical Experiment 1

4.1. Solution of Numerical Experiment 1 Using VHPM

Let us now rewrite Equation (7) as
L u + M u = 0 ,
where the differential operators are given by L = t and M = 2 x 3 x 3 .
We write Equation (7) as
i = 0 ρ i u i ( t , x ) = u 0 ( t , x ) ρ 0 t 2 n = 0 ρ i u n , x + n = 0 ρ i u n , x x x d τ ,
where u i , x = u i ( t , x ) x and u i , x x x = 3 u i ( t , x ) x 3 . By comparing like terms of ρ on both sides of Equation (17), we obtain the following components:
ρ ( 0 ) : u 0 ( x ) = u ( 0 , x ) = sin ( x ) , ρ ( 1 ) : u 1 ( t , x ) = 0 t 2 u 0 , x ( τ , x ) + u 0 , x x x ( τ , x ) d τ = 0 t cos ( x ) d τ = t cos ( x ) , ρ ( 2 ) : u 2 ( t , x ) = 0 t 2 u 1 , x ( τ , x ) + u 1 , x x x ( τ , x ) d τ = 0 t τ sin ( x ) d τ = t 2 2 ! sin ( x ) . ρ ( 3 ) : u 3 ( t , x ) = 0 t 2 u 2 , x ( τ , x ) + u 2 , x x x ( τ , x ) d τ = 0 t τ 2 2 ! cos ( x ) d τ = t 3 3 ! cos ( x ) . ρ ( 4 ) : u 4 ( t , x ) = 0 t 2 u 3 , x ( τ , x ) + u 3 , x x x ( τ , x ) d τ = 0 t τ 3 3 ! sin ( x ) d τ = t 4 4 ! sin ( x ) . ρ ( 5 ) : u 5 ( t , x ) = 0 t 2 u 4 , x ( τ , x ) + u 4 , x x x ( τ , x ) d τ = 0 t τ 4 4 ! cos ( x ) d τ = t 5 5 ! cos ( x ) ,
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
u ( t , x ) u 0 ( t ; x ) + u 1 ( t ; x ) + u 2 ( t ; x ) + u 3 ( t ; x ) + u 4 ( t ; x ) + + u 10 ( t ; x ) , = sin ( x ) t cos ( x ) t 2 2 ! sin ( x ) + t 3 3 ! cos ( x ) + t 4 4 ! sin ( x ) t 5 5 ! cos ( x ) t 6 6 ! sin ( x ) + t 7 7 ! cos ( x ) + t 8 8 ! sin ( x ) t 9 9 ! cos ( x ) t 10 10 ! sin ( x ) ,
which converges to the exact solution u ( t , x ) = sin ( x t ) 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,
lim n Ψ n ( x , t ) = u ( x , t ) ,
where
Ψ n ( x , t ) = k = 0 n u k ( x , t ) , n 0 ,
where u k 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. x [ 0 , 2 π ] at times t = 0.1 , 2.0 , and 4.0 , while Figure 2 depicts plots of the absolute errors versus x [ 0 , 2 π ] at some different values of time t.

4.2. Solution of Numerical Experiment 1 Using Finite Difference Scheme

We consider the homogeneous dispersive KdV equation
u ( t , x ) t + 2 u ( t , x ) x + 3 u ( t , x ) x 3 = 0 ,
where u ( x , 0 ) = sin ( x ) . The discretised form of the finite difference scheme for Equation (18) is given by
U i n + 1 U i n 1 2 ( Δ t ) + 2 U i + 1 n U i 1 n 2 ( Δ x ) + U i + 2 n 2 U i + 1 n + 2 U i 1 n U i 2 n 2 ( Δ x ) 3 = 0 .
Equation (19) can be expressed as
U i n + 1 = U i n 1 2 · Δ t Δ x · U i + 1 n U i 1 n Δ t ( Δ x ) 3 · U i + 2 n 2 U i + 1 n + 2 U i 1 n U i 2 n ,
for i = 2 , 3 , , N 2 and n = 2 , 3 , , Itmax 1 . (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:
U i 2 = U i 1 ( Δ t ) Δ x U i + 1 1 U i 1 1 ( Δ t ) 2 ( Δ x ) 3 U i + 2 1 2 U i + 1 1 + 2 U i 1 1 U i 2 1 ,
for i = 3 , 4 , , N 2 and n = 2 , 3 , , Itmax 1 .
The stability region of the scheme can be determined using von Neumann stability analysis on substituting U i n with ξ n e I θ i h in Equation (20) to get
ξ = ξ 1 2 · Δ t Δ x · e ( I ω ) e ( I ω ) Δ t ( Δ x ) 3 · e ( 2 I ω ) 2 e ( I ω ) + 2 e ( I ω ) e ( 2 I ω ) ,
where ω = θ h . Equation (21) can be rewritten as
ξ 2 = 1 2 · Δ t Δ x · ξ · ( 2 I sin ( ω ) Δ t ( Δ x ) 3 · 2 I sin ( 2 ω ) 4 I sin ( ω ) .
The quadratic equation in (22) can be expressed as
ξ 2 + I · K · ξ 1 = 0 ,
where
K = 4 · Δ t Δ x · sin ( ω ) + 2 · Δ t ( Δ x ) 3 · sin ( 2 ω ) 2 sin ( ω ) .
Solving Equation (22) gives
ξ 1 = I K + 4 K 2 2 and ξ 2 = I K 4 K 2 2 ,
where ξ 1 and ξ 2 are amplification factors of the physical and computational nodes, respectively.
We must have 4 K 2 > 0 ; i.e., | K | < 2 , ; this then gives | ξ 1 | = 1 . We solve
| 4 Δ t Δ x sin ( w ) + 2 Δ t ( Δ x ) 3 sin ( 2 w ) 2 sin ( w ) | < 2 .
For Δ x 0 , we see that ( Δ x ) 3 < < Δ x ; i.e., 1 ( Δ x ) 3 > > 1 Δ x .
By letting y = sin ( 2 ω ) 2 sin ( ω ) , we have
d y d ω = 2 cos ( 2 ω ) 2 cos ( ω ) .
By putting d y d ω = 0 and solving for ω , gives 2 2 cos 2 ( ω ) 1 2 cos ( ω ) = 0 . We, thus, obtain ω = 0 or w = 2 π 3 . Hence, the approximate region of stability, when Δ x 0 , is given by
| 2 3 Δ t Δ x 3 3 Δ t ( Δ x ) 3 | < 2 .
By choosing h = Δ x = π 10 0.314 , we obtain
0 < Δ t 0.012774 .

Consistency

Using Taylor’s series expansion about ( t n , x i ) , Equation (20) gives
U + ( Δ t ) U t + ( Δ t ) 2 2 ! U t t + ( Δ t ) 3 3 ! U t t t + ( Δ t ) 4 4 ! U t t t t + ( Δ t ) 5 5 ! U t t t t t + O ( ( Δ t ) 6 ) = U ( Δ t ) U t + ( Δ t ) 2 2 ! U t t ( Δ t ) 3 3 ! U t t t + ( Δ t ) 4 4 ! U t t t t ( Δ t ) 5 5 ! U t t t t t + O ( ( Δ t ) 6 ) 2 ( Δ t ) Δ x [ U + ( Δ x ) U x + ( Δ x ) 2 2 ! U x x + ( Δ x ) 3 3 ! U x x x + ( Δ x ) 4 4 ! U x x x x + O ( ( Δ x ) 5 ) U ( Δ x ) U x + ( Δ x ) 2 2 ! U x x ( Δ x ) 3 3 ! U x x x + ( Δ x ) 4 4 ! U x x x x + O ( ( Δ x ) 5 ) ] ( Δ t ) ( Δ x ) 3 [ U + 2 ( Δ x ) U x + 2 ( Δ x ) 2 2 U x x + 2 ( Δ x ) 3 3 ! U x x x + 2 ( Δ x ) 4 4 ! U x x x x + ( 2 Δ x ) 5 5 ! U x x x x x + O ( ( Δ x ) 6 ) 2 U + ( Δ x ) U x + ( Δ x ) 2 2 ! U x x + ( Δ x ) 3 3 ! U x x x + ( Δ x ) 4 4 ! U x x x x + ( Δ x ) 5 5 ! U x x x x x + O ( ( Δ x ) 6 ) + 2 ( U ( Δ x ) U x + ( Δ x ) 2 2 ! U x x x ( Δ x ) 3 3 ! U x x x + ( Δ x ) 4 4 ! U x x x x ( Δ x ) 5 5 ! U x x x x x + O ( ( Δ x ) 6 ) ) U 2 ( Δ x ) U x + 2 ( Δ x ) 2 2 ! U x x 2 ( Δ x ) 3 3 ! U x x x + 2 ( Δ x ) 4 4 ! U x x x x 2 ( Δ x ) 5 5 ! U x x x x x + O ( Δ x ) 6 .
After some simplifications, we get
U t + 2 U x + U x x x = ( Δ t ) 2 3 ! U t t t ( Δ t ) 4 5 ! U t t t t t 2 ( Δ x ) 2 3 ! U x x x 2 ( Δ x ) 4 5 ! U x x x x x 30 ( Δ x ) 2 5 ! U x x x x x + O ( ( Δ x ) 5 ) + O ( ( Δ t ) 5 ) .
As Δ t , Δ x 0 , Equation (27) gives U t + 2 U x + U x x x = 0 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.
The absolute and relative errors vs. x are shown in Figure 4 and Figure 5, respectively, using Δ x = π 10 0.314 and Δ t = 10 3 .
The following plots give loglog graphs of the maximum error vs. time, t [ 0 , 10 ] .
We note that Figure 6 compares the effect of the loglog plot of the maximum error vs. time using two different time steps: Δ t = 0.001 , 0.01 and with the spatial step Δ x = π 10 using the classical FDM for Experiment 1.

5. Numerical Experiment 2

5.1. Solution of Experiment 2 Using VHPM

Let us now consider
u ( t , x ) t + 3 u ( t , x ) x 3 = h ( t , x ) ,
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
i = 0 ρ i u i ( t , x ) = u 0 ( t , x ) ρ 0 t λ ( τ ) n = 0 ρ i u n , x x x d τ 0 t λ ( τ ) π 3 cos ( π x ) cos ( τ ) sin ( π x ) sin ( τ ) d τ ,
where we have λ ( τ ) = 1 , as noted above.
Using Equation (29), the first few VHPM approximation terms are given by
ρ ( 0 ) : u 0 ( t , x ) = π 3 sin t cos π x + cos t sin π x ,
ρ ( 1 ) : u 1 ( t , x ) = π 6 sin π x + π 3 sin t cos π x π 6 cos t sin π x ,
ρ ( 2 ) : u 2 ( t , x ) = π 6 sin π x + π 9 t sin ( t ) cos π x + π 6 cos ( t ) sin π x ,
ρ ( 3 ) : u 3 ( t , x ) = π 12 sin π x π 9 t cos π x + π 9 sin ( t ) cos π x π 12 t 2 2 ! + cos ( t ) sin π x ,
ρ ( 4 ) : u 4 ( t , x ) = π 12 sin π x π 15 t 3 3 ! + sin ( t ) cos π x + π 15 t cos π x + π 12 sin π x t 2 2 ! + cos ( t ) ,
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:
Ψ 7 ( t , x ) = π 24 cos t sin π x + π 24 1 t 2 2 ! + t 4 4 ! t 6 6 ! + sin π x + cos t sin π x .
We observe that Equation (31) converges to the exact solution u ( t , x ) = cos t sin π x .
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].
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 u j , j 1 [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 u 0 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):
U i n + 1 U i n 1 2 Δ t + U i + 2 n 2 U i + 1 n + 2 U i 1 n U i 2 n 2 ( Δ x ) 3 = sin ( t n ) sin ( π x i ) π 3 cos ( t n ) cos ( π x i ) .
Equation (32) can be rewritten as
U i n + 1 = U i n 1 Δ t ( Δ x ) 3 ( U i + 2 n 2 U i + 1 n + 2 U i 1 n U i 2 n ) + 2 Δ t sin ( t n ) sin ( π x i ) π 3 cos ( t n ) cos ( π x i ) ,
for i = 2 , 3 , , N 2 and n = 2 , 3 , , Itmax 1 .
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):
U i n + 1 U i n Δ t + U i + 2 n 2 U i + 1 n + 2 U i 1 n U i 2 n 2 ( Δ x ) 3 = sin ( π x i ) sin ( t n ) π 3 cos ( π x i ) cos ( t n ) ,
which can be rewritten as
U i n + 1 = U i n Δ t 2 ( Δ x ) 3 ( U i + 2 n 2 U i + 1 n + 2 U i 1 n U i 2 n ) + Δ t [ sin ( π x i ) sin ( t n ) π 3 cos ( π x i ) cos ( t n ) ] .
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 g ( t , x ) does not depend on u. We have
U i n + 1 = U i n 1 Δ t ( Δ x ) 3 · U i + 2 n 2 U i + 1 n + 2 U i 1 n U i 2 n .
By substituting U i n by ξ n e I θ i h in Equation (36) and simplifying, we get
ξ = ξ 1 Δ t ( Δ x ) 3 e ( 2 I ω ) 2 e ( I ω ) + 2 e ( I ω ) e ( 2 I ω ) ,
Equation (37) can be expressed as
ξ 2 + Δ t ( Δ x ) 3 · ξ · I · ( 2 sin ( 2 ω ) 4 sin ( ω ) ) 1 = 0 .
Solving Equation (38) yields
ξ = Δ t ( Δ x ) 3 · I · ( 2 sin ( 2 ω 4 sin ( ω ) ) ± 4 ( Δ t ) 2 ( Δ x ) 6 ( 2 sin ( 2 ω ) 4 sin ( ω ) ) 2 2 .
For stability, we need
Δ t ( Δ x ) 3 ( 2 sin ( 2 ω ) 4 sin ( ω ) ) 2 < 4 ,
which simplifies to
Δ t ( Δ x ) 3 ( 2 sin ( 2 ω ) 4 sin ( ω ) ) < 2 .
We now let y = 2 sin ( 2 ω ) 4 sin ( ω ) . This gives d y d ω = 8 cos 2 ( ω ) 4 cos ( ω ) 4 . By putting d y d ω = 0 , we obtain ω = 0 , 2 π 3 , 2 π 3 for ω [ π , π ] . Thus, the region of stability associated with Equation (8) is given by
| Δ t | | ( Δ x ) 3 | · 2 sin 4 π 3 4 sin 2 π 3 < 2 ,
which simplifies as | Δ t | | ( Δ x ) 3 | < 2 3 3 .
We choose Δ x = 0.05 and, therefore, Δ t 4.811252 × 10 5 . (The choice Δ x = 0.05 , Δ t = 10 5 is used to run the experiment).

Consistency

We consider Equation (8). The Taylor series expansion about ( t n , x i ) , gives
U + ( Δ t ) U t + ( Δ t ) 2 2 ! U t t + ( Δ t ) 3 3 ! U t t t + ( Δ t ) 4 4 ! U t t t t + ( Δ t ) 5 5 ! U t t t t t + O ( ( Δ t ) 6 ) = U ( Δ t ) U t + ( Δ t ) 2 2 ! U t t ( Δ t ) 3 3 ! U t t t + ( Δ t ) 4 4 ! U t t t t ( Δ t ) 5 5 ! U t t t t t + O ( ( Δ t ) 6 ) + 2 ( Δ t ) sin ( π x i ) sin ( t n ) π 3 cos ( π x i ) cos ( t n ) ( Δ t ) ( Δ x ) 3 · [ U + 2 ( Δ x ) U x + 2 ( Δ x ) 2 2 ! U x x + 2 ( Δ x ) 3 3 ! U x x x + 2 ( Δ x ) 4 4 ! U x x x x + 2 ( Δ x ) 5 5 ! U x x x x x + 2 U + ( Δ x ) U x + ( Δ x ) 2 2 ! U x x + ( Δ x ) 3 3 ! U x x x + ( Δ x ) 4 4 ! U x x x x + ( Δ x ) 5 5 ! U x x x x x + + 2 ( U ( Δ x ) U x + ( Δ x ) 2 2 ! U x x ( Δ x ) 3 3 ! U x x x + ( Δ x ) 4 4 ! U x x x x ( Δ x ) 5 5 ! U x x x x x + ) U 2 ( Δ x ) U x + 2 ( Δ x ) 2 2 ! U x x 2 ( Δ x ) 3 3 ! U x x x + 2 ( Δ x ) 4 4 ! U x x x x 2 ( Δ x ) 5 5 ! U x x x x x + ] .
Simplifying Equation (39) gives
U t + U x x x + sin ( π x i ) sin ( t n ) + cos ( π x i ) cos ( t n ) = ( Δ t ) 2 3 ! U t t t ( Δ t ) 4 5 ! U t t t t t + O ( ( Δ t ) 5 ) 30 ( Δ x ) 2 5 ! U x x x x x + O ( ( Δ x ) 3 ) .
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.
Table 1 displays a comparison between the approximate solution and the exact solution together with corresponding absolute and relative errors.
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 10 5 to 10 3 . 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 t [ 0 , 2.0 ] and the loglog plot of the maximum error vs. time using the standard FDM for Experiment 2 with Δ t = 10 5 and Δ x = 0.05 .

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
i = 0 ρ i u i ( t , x ) = u 0 ( t , x ) + ρ 0 t ( 1 ) i = 0 ρ i u i , x x x ( τ , x ) + i = 0 ρ i u i , y y y ( τ , x ) d τ .
We then compare the coefficients of ρ on both sides of Equation (40) to obtain
ρ ( 0 ) : u 0 ( t , x , y ) = cos ( x + y ) ,
ρ ( 1 ) : u 1 ( t , x , y ) = 0 t u 0 , x x x ( τ , x , y ) + u 0 , y y y ( τ , x , y ) d τ = 0 t 2 sin ( x + y ) d τ = 2 t cos ( x + y ) ,
ρ ( 2 ) : u 2 ( t , x , y ) = 0 t u 1 , x x x ( τ , x , y ) + u 1 , y y y ( τ , x , y ) d τ = 0 t 4 τ cos ( x + y ) d τ = ( 2 t ) 2 2 ! cos ( x + y ) ,
ρ ( 3 ) : u 3 ( t , x , y ) = 0 t u 2 , x x x ( τ , x , y ) + u 2 , y y y ( τ , x , y ) d τ = 0 t 4 τ 2 sin ( x + y ) d τ = ( 2 t ) 3 3 ! sin ( x + y ) ,
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
Ψ 7 ( t , x , y ) = cos ( x + y ) 1 ( 2 t ) 2 2 ! + ( 2 t ) 4 4 ! ( 2 t ) 6 6 ! sin ( x + y ) 2 t ( 2 t ) 3 3 ! + ( 2 t ) 5 5 ! ( 2 t ) 7 7 ! cos ( 2 t ) cos ( x + y ) sin ( 2 t ) sin ( x + y ) = cos ( 2 t + x + y ) ,
which converges to the closed form as required.
For Experiment 3, we present some numerical results in Table 2 and Figure 13.
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 t = 0.10 , t = 1.0 and t = 2.0 , respectively. Figure 13 depicts the 3D graphs of the exact and approximate solution vs. x vs. y using n = 7 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:
u t | i , j n U i , j n + 1 U i , j n 1 2 · Δ t , u x | i , j n U i + 1 , j n U i 1 , j n 2 · Δ x , 3 u x 3 | i , j n U i + 2 , j n 2 U i + 1 , j n + 2 U i 1 , j n U i 2 , j n 2 · ( Δ x ) 3 , 3 u y 3 | i , j n U i , j + 2 n 2 U i , j + 1 n + 2 U i , j 1 n U i , j 2 n 2 · ( Δ y ) 3 .
We point out that a rectangular domain is divided into square grids with each x and y interval of length Δ x and Δ y , respectively, whereas each t-interval is of length Δ t . A uniform grid Δ x = Δ y = h is considered with
x i = ( i 1 ) · Δ x = ( i 1 ) · h , i = 1 , , N , y j = ( j 1 ) · Δ y = ( j 1 ) · h , j = 1 , , N , t n = ( n 1 ) · Δ t = ( n 1 ) · k , n N .
The scheme is given by
U i , j n + 1 U i , j n 1 2 Δ t = U i + 2 , j n 2 U i + 1 , j n + 2 U i 1 , j n U i 2 , j n 2 · ( Δ x ) 3 U i , j + 2 n 2 U i , j + 1 n + 2 U i , j 1 n U i , j 2 n 2 · ( Δ y ) 3 .
Hence, the numerical scheme takes the form
U i , j n + 1 = U i , j n 1 r x U i + 2 , j n 2 U i + 1 , j n + 2 U i 1 , j n U i 2 , j n r y U i , j + 2 n 2 U i , j + 1 n + 2 U i , j 1 n U i , j 2 n ,
where
r x = Δ t ( Δ x ) 3 and r y = Δ t ( Δ y ) 3 .
By substituting U i , j n by ξ n · e I ω x i · e I ω y j , we obtain
ξ n + 1 exp I ( ω x i + ω y j ) = ξ n 1 exp I ( ω x i + ω y j ) Δ t ( Δ x ) 3 ( ξ n exp I ( ω x ( i + 2 ) + ω y j ) 2 ξ n exp I ( ω x ( i + 1 ) + ω y j ) + 2 ξ n exp I ( ω x ( i 1 ) + ω y j ) ξ n exp I ( ω x ( i 2 ) + ω y j ) ) Δ t ( Δ y ) 3 ( ξ n exp I ( ω x i + ω y ( j + 2 ) ) 2 ξ n exp I ( ω x i + ω y ( j + 1 ) ) + 2 ξ n exp I ( ω x i + ω y ( j 1 ) ) ξ n exp I ( ω x i + ω y ( j 2 ) ) ) .
By dividing both sides of Equation (44) with ξ n e I ( ω x i + ω y j ) , we have
ξ 2 = 1 Δ t ( Δ x ) 3 ξ exp 2 I ω x 2 ξ exp I ω x + 2 ξ exp I ω x ξ exp 2 I ω x Δ t ( Δ y ) 3 ξ exp 2 I ω y 2 ξ exp I ω y + 2 ξ exp I ω y ξ exp 2 I ω y ,
Equation (45) can be expressed as
ξ 2 = 1 Δ t ( Δ x ) 3 · ξ . I . 2 sin ( 2 ω x ) 4 sin ( ω x ) Δ t ( Δ y ) 3 · ξ . I . 2 sin ( 2 ω y ) 4 sin ( ω y ) ,
which simplifies to
ξ 2 + 2 · B ( x , y ) · I · ξ 1 = 0 ,
where
B ( x , y ) = r x · sin ( ω x ) 2 sin ( ω x ) + r y · sin ( 2 ω y ) 2 sin ( ω y ) ,
and r x and r y are given as in Equation (43). By solving the quadratic equation in Equation (46), we obtain
ξ = 1 2 2 B ( x , y ) · I ± 4 4 B 2 ( x , y )
A condition for the stability criterion is determined by finding a condition for Δ t , Δ x , so that, for all θ , ξ
| ξ ( ω x , ω y ) | 1 holds ; i . e . , 1 B 2 ( x , y ) 0 | B ( x , y ) | 1 .
Hence, Equation (47) is equivalently expressed as
| r x · sin ( 2 ω x ) 2 sin ( ω x ) + r y · sin ( 2 ω y ) 2 sin ( ω y ) | 1 .
We fixed Δ x = Δ y = 0.1 . For stability, we need to solve
| Ψ ( ω x , ω y , Δ t ) | 1 ,
with Ψ ( ω x , ω y , Δ t ) = Δ t ( 0.1 ) 3 · sin ( 2 ω x ) 2 sin ( ω x ) + Δ t ( 0.1 ) 3 · sin ( 2 ω y ) 2 sin ( ω y ) .
We now give the 3D graphical representation of Ψ ( ω x , ω y ) vs. Δ t vs. ω x , ω y [ π , π ] , as in Figure 14.
We deduce that the stability region is | Δ t | 0.00012 .
Remark 4. 
The above plot clearly shows that our numerical scheme in Equation (42) for the 2D KdV equation preserves stability for Δ t 0.00012 , as depicted in Figure 14, whereas, in Figure 14d, the instability behaviour emanates.

Consistency

We consider the dispersive 2D KdV equation given in Equation (9) and, using the Taylor series expansion about ( t n , x i , y j ) , we have
U t + U x x x + U y y y = ( Δ t ) 2 3 ! U t t t ( Δ t ) 4 5 ! U t t t t t 30 5 ! ( Δ x ) 2 U x x x x x 30 5 ! ( Δ y ) 2 U y y y y y + O ( Δ t ) 5 + O ( Δ x ) 3 + ( Δ y ) 3 .
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 ( t , x , y ) [ 0 , T ] × Ω , T > 0 , Ω = [ 0 , 1 ] × [ 0 , 1 ] , subject to the initial condition in Equation (10); the time-dependent boundary conditions are given by
u ( t , x , 0 ) = cos ( 2 t + x ) , u ( t , x , 1 ) = cos ( 1 + 2 t + x ) , u ( t , 0 , y ) = cos ( 2 t + y ) , u ( t , 1 , y ) = cos ( 2 t + 1 + y ) ,
We note that the finite difference scheme given in Equation (42) works in such a way that the unknown value of ( i ; j ) at iteration n + 1 ; U i , j n + 1 is computed at the preceding n t h iteration values of the indices ( i + 1 ; j ) , ( i 1 ; j ) , ( i 2 ; j ) ( i ; j ) , ( i ; j + 1 ) , ( i ; j 1 ) , and ( i ; j 2 ) .
The initial condition in Equation (10) tells us that u ( 0 , x , y ) = u i , j 1 = f ( x i , y j ) for i = 1 , 2 , , N , while the non-zero Dirichlet boundary conditions in Equation (48) give the equations
u ( t k , 0 , y j ) = u 0 , j k = cos ( y j + 2 t k ) , u ( t k , 1 , y j ) = u 0 , j k = cos ( 1 + y j + 2 t k ) , u ( t k , x i , 0 ) = u i , 0 k = cos ( x i + 2 t k ) , u ( t k , x i , 1 ) = u i , 0 k = cos ( x i + 1 + 2 t k ) ,
for i , j 1 , 2 , , N . In other words, if ( x i , y j ) is a boundary node, then u i , j n = g ( x i , y j , t k ) , 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.
Remark 5. 
When used to solve the homogeneous 2D KdV equation, VHPM performs excellently at t = 0.10 and performs well at time t = 1.0 , but is less effective at time t = 2.0 . 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 Ω = ( 0 , 1 ) 2 at times t = 0.1 , 1.0 , 2.0 with spatial step sizes Δ x = Δ y = 0.1 and time step Δ t = 0.0001 .

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
i = 0 ρ i u i ( t , x ) = u 0 ( t , x ) + ρ 0 t λ ( τ ) L i = 0 ρ i u i + N i = 0 ρ i u ˜ i d τ 0 t λ ( τ ) g ( τ , x ) d τ .
Equation (49) reduces to
i = 0 ρ i u i ( t , x ) = u 0 ( t , x ) ρ 0 t n = 0 ρ n u n , x x x + n = 0 ρ n u n , y y y g ( x , τ ) d τ ,
where the source term is g ( t , x ) = e t cos ( x y ) .
By now collecting terms of the same power of ρ , the components of u i ’s are obtained as
ρ ( 0 ) : u 0 ( x , y ) = cos ( x y ) , ρ ( 1 ) : u 1 ( t , x , y ) = 0 t u 0 , x x x ( τ , x , y ) + u 0 , y y y ( τ , x , y ) g ( x , τ ) d τ ρ ( 2 ) : u 2 ( t , x , y ) = 0 t u 1 , x x x ( τ , x , y ) + u 1 , y y y ( τ , x , y ) d τ ρ ( n ) : u n ( t , x , y ) = 0 t u n 1 , x x x ( τ , x , y ) + u n 1 , y y y ( τ , x , y ) d τ , n 3 .
Using Equation (51), the solution, using VHPM, reads as
u 0 ( x , y ) = cos ( x y ) , u 1 ( t , x , y ) = e t cos ( x y ) cos ( x y ) , u n ( t , x , y ) = 0 , n 2 .
By looking at the components u 0 and u 1 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.
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 u 0 and u 1 from u 0 , even though u 1 contains additional terms, the remaining non-cancelled terms of u 0 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
U i , j n + 1 = U i , j n 1 r x U i + 2 , j n 2 U i + 1 , j n + 2 U i 1 , j n U i 2 , j n r y U i , j + 2 n 2 U i , j + 1 n + 2 U i , j 1 n U i , j 2 n 2 Δ t exp ( t n ) cos ( x i y j ) ,
where r x and r y are given in Equation (43).
Taylor’s series expansion about ( t n , x i , y j ) gives
U + ( Δ t ) U t + ( Δ t ) 2 2 ! U t t + ( Δ t ) 3 3 ! U t t t + ( Δ t ) 4 4 ! U t t t t + ( Δ t ) 5 5 ! U t t t t t + O ( Δ t ) 6 = U ( Δ t ) U t + ( Δ t ) 2 2 ! U t t ( Δ t ) 3 3 ! U t t t + ( Δ t ) 4 4 ! U t t t t ( Δ t ) 5 5 ! U t t t t t + O ( ( Δ t ) 6 ) 2 ( Δ t ) exp ( t n ) cos ( x i y j ) ( Δ t ) ( Δ x ) 3 2 ( Δ x ) 3 U x x x + 60 5 ! ( Δ x ) 5 U x x x x x + O ( ( Δ x ) 6 ) ( Δ t ) ( Δ y ) 3 2 ( Δ y ) 3 U y y y + 60 5 ! ( Δ y ) 5 U y y y y y + O ( ( Δ y ) 6 ) .
Simplifying Equation (54) gives
U t + U x x x + U y y y exp ( t ) cos ( x y ) = ( Δ t ) 2 3 ! U t t t ( Δ t ) 4 5 ! U t t t t t 30 5 ! ( Δ x ) 2 U x x x x x 30 5 ! ( Δ y ) 2 U y y y y y + O ( Δ t ) 5 + O ( Δ x ) 3 + ( Δ y ) 3 .
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 19 gives the 3D plots for the numerical solution vs. x vs. y, using the classical FDM with the exact solution at times t = 1.0 , 2.0 , 5.0 , 8.0 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.

8. Numerical Experiment 5

8.1. Solution of Numerical Experiment 5 Using VHPM

Let us now rewrite Equation (42) as
L u + M u + N u = 0 ,
where the differential operators are given by L = t and M = 3 x 3 and N = 3 x 2 .
Using Equation (5), we write Equation (42) as
i = 0 ρ i u i ( t , x ) = u 0 ( t , x ) ρ 0 t 3 n = 0 ρ i u n , x 2 + n = 0 ρ i u n , x x x d τ ,
where u i , x = u i ( t , x ) x and u i , x x x = 3 u i ( t , x ) x 3 . By comparing like terms of ρ on both sides of Equation (17), we obtain the following components:
ρ ( 0 ) : u 0 ( x ) = 1 2 sech 2 1 2 x , ρ ( 1 ) : u 1 ( t , x ) = 0 t 6 u 0 u 0 , x ( τ , x ) + u 0 , x x x ( τ , x ) d τ = 1 2 sinh x 2 t cosh x 2 3 , ρ ( 2 ) : u 2 ( t , x ) = 0 t 3 2 u 0 u 1 x + u 1 , x x x ( τ , x ) d τ = 1 8 2 cosh x 2 2 3 t 2 cosh x 2 4 ρ ( 3 ) : u 3 ( t , x ) = 0 t 3 u 1 2 + 2 u 0 u 2 x + u 2 , x x x ( τ , x ) d τ = 1 12 sinh x 2 cosh x 2 2 3 t 3 cosh x 2 5 , ρ ( 4 ) : u 4 ( t , x ) = 0 t 3 ( 2 u 1 u 2 ) x + ( 2 u 0 u 3 ) x + ( 2 u 1 u 2 ) x + u 2 , x x x ( τ , x ) d τ = 4 cosh x 2 6 + 42 cosh x 2 4 222 cosh x 2 2 + 189 t 4 192 cosh x 2 8 .
Thus, the sum of the first five-term approximate solution obtained by VHPM in Equation (56) takes the form
S 4 ( x , t ) = 4 cosh x 2 6 + 42 cosh x 2 4 222 cosh x 2 2 + 189 t 4 192 cosh x 2 8 + 1 2 sinh x 2 t cosh x 2 3 + 1 2 cosh x 2 2 + 16 cosh x 2 5 sinh x 2 48 cosh x 2 3 sinh x 2 t 3 192 cosh x 2 8 + 48 cosh x 2 6 72 cosh x 2 4 t 2 192 cosh x 2 8 .
In Table 5, the absolute and relative errors are tabulated for some values of x at four different time values: 0.01 , 0.5 , 1.0 , and 2.0 . Figure 20 displays graphically the exact and the VHPM solutions to Experiment 5.

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
U i n + 1 U i n 1 2 Δ t = 6 U i 1 n + U i n + U i + 1 n 3 U i + 1 n U i 1 n 2 Δ x U i + 2 n 2 U i + 1 n + 2 U i 1 n U i 2 n 2 ( Δ x ) 3 .
The scheme is given by
U i n + 1 = U i n 1 2 · Δ t Δ x · U i 1 n + U i n + U i + 1 n U i + 1 n U i 1 n Δ t ( Δ x ) 3 · U i + 2 n 2 U i + 1 n + 2 U i 1 n U i 2 n ,
for i = 3 , 4 , , N 1 and n = 2 , 3 , , Itmax 1 . 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:
U j 2 = U j 1 ( Δ t ) Δ x U j 1 1 + U j 1 + U j + 1 1 U j + 1 1 U j 1 1 ( Δ t ) 2 ( Δ x ) 3 U j + 2 1 2 U j + 1 1 + 2 U j 1 1 U j 2 1 ,
for i = 3 , 4 , , N 1 and n = 2 , 3 , , Itmax 1 .
The stability region of the scheme for Equation (14) can be determined by relying on the idea of frozen coefficients [50] for writing u u x as u max u x , together with the von Neumann ansatz
U j n = ξ n e I j ω ,
where ω = θ h is the phase angle, to obtain the following relation from Equation (58),
ξ 2 + K ξ 1 = 0 ,
where
K = 12 u max λ I sin ( ω ) + λ ( Δ x ) 2 2 I sin ( 2 ω ) 4 I sin ( ω ) , λ = Δ t Δ x , and I = 1
, with u max the least upper bound on | u ( x , t ) | .
Solving Equation (59) gives
ξ = K ± K 2 + 4 2
where K is given in Equation (60).
A condition for the stability criterion is obtained by finding a condition on Δ t , Δ x so that, for ω [ π , π ] , | ξ | 1 is true. This gives
4 12 λ · | u max | ( I sin ( ω ) ) + λ ( Δ x ) 2 · 2 I sin ( 2 ω ) 4 I sin ( ω ) 2 0 ,
which gives
| 6 λ · | u max | ( I sin ( ω ) ) + λ ( Δ x ) 2 · I sin ( 2 ω ) 2 I sin ( ω ) | 1 .
Since the second expression in the bracket for the above inequality dominates the first for small values of Δ x , we obtain ω = 2 π 3 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]
| λ | 1 | { 6 u max sin ( 2 ω ) + 1 ( Δ x ) 2 sin ( 2 ω ) 2 sin ( ω ) } | | 1 3 3 u max 3 3 2 ( Δ x ) 2 | = 1 3 3 ( u max 1 2 ( Δ x ) 2 ) .
By considering Δ x = π 10 with u m a x 0.50 (using the Maple max function) for x [ 0 , 2 π ] , Equation (63) gives
0 < Δ t | π 10 3 3 2 3 3 2 ( 100 π 2 ) | = 0.04214796 .
Equation (64) is the stability region of the scheme in Equation (58) for Δ x = π 10 .

Consistency of the Numerical Scheme in Equation (42)

We consider Equation (42). The Taylor series expansion about ( t n , x i ) gives
U t + 6 U U x + U x x x = ( Δ t ) 2 3 U t t t + 3 ( Δ x ) 2 2 U x x x x x + 2 ( Δ x ) 2 U x U x x x + ( Δ x ) 4 3 U x x U x x x x +
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:

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 10 4 to 10 2 . 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 10 1 to 10 0 .
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 10 10 to 10 9 , 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 10 3 to 10 1 .
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

  1. 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]
  2. 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]
  3. 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]
  4. Ablowitz, M.J.; Clarkson, P.A. Solitons, Nonlinear Evolution Equations and Inverse Scattering; Cambridge University Press: Cambridge, UK, 1999; Volume 149. [Google Scholar]
  5. Constantin, A.; Escher, J. Wave breaking for nonlinear nonlocal shallow water equations. Acta Math. 1998, 181, 229–243. [Google Scholar] [CrossRef]
  6. 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]
  7. 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]
  8. 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]
  9. 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] [Green Version]
  10. 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]
  11. Lidsey, J.E. Cosmology and the Korteweg-de Vries equation. Phys. Rev. D 2012, 86, 123523. [Google Scholar] [CrossRef]
  12. 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]
  13. Pelloni, B.; Dougalis, V.A. Numerical solution of some nonlocal, nonlinear dispersive wave equations. J. Nonlinear Sci. 2000, 10, 1–22. [Google Scholar] [CrossRef]
  14. Sewell, G. Analysis of a Finite Element Method; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2012. [Google Scholar]
  15. 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]
  16. 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]
  17. 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]
  18. 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]
  19. Adomian, G. Solving Frontier Problems of Physics: The Decomposition Method; Kluwer Academic Publishers: Amsterdam, The Netherlands, 1994. [Google Scholar]
  20. Adomian, G. A review of decomposition method and some recent results for nonlinear equation. Math. Comput. Model. 1992, 13, 17–43. [Google Scholar] [CrossRef]
  21. 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]
  22. 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]
  23. 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]
  24. He, J.H. Homotopy perturbation technique. Comput. Methods Appl. Mech. Eng. 1999, 178, 257–262. [Google Scholar] [CrossRef]
  25. He, J.H. Homotopy perturbation method: A new non-linear analytical technique. Appl. Math. Comput. 2003, 135, 73–79. [Google Scholar] [CrossRef]
  26. 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]
  27. 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] [Green Version]
  28. 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]
  29. 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]
  30. 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]
  31. 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]
  32. 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] [Green Version]
  33. 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]
  34. 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]
  35. Appadu, A.R.; Kelil, A.S. On Semi-Analytical Solutions for Linearized Dispersive KdV equation. Mathematics 2020, 8, 1769. [Google Scholar] [CrossRef]
  36. 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]
  37. 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]
  38. 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]
  39. 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]
  40. 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]
  41. 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]
  42. Fernández, F.M. On the variational homotopy perturbation method for nonlinear oscillators. J. Math. Phys. 2012, 53, 024101. [Google Scholar] [CrossRef] [Green Version]
  43. Wazwaz, A.M. Partial Differential Equations and Solitary Waves Theory; Higher Education: Beijing, China; Springer: Berlin/Heidelberg, Germany, 2009. [Google Scholar]
  44. Wazwaz, A.M. An analytic study on the third-order dispersive partial differential equations. Appl. Math. Comput. 2003, 142, 511–520. [Google Scholar] [CrossRef]
  45. 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]
  46. Wazwaz, A.M. Partial Differential Equations: Methods and Applications; Balkema Publishers: Lisse, The Netherlands, 2002. [Google Scholar]
  47. 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]
  48. 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]
  49. Adomian, G.; Rach, R. Noise terms in decomposition solution series. Comp. Math. Appl. 1992, 24, 61–64. [Google Scholar] [CrossRef] [Green Version]
  50. 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]
  51. 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]
Figure 1. Plots of exact and approximate solutions vs. x using n = 10 terms from VHPM at times 0.1 , 1.0 , 2.0 and 4.0 . (The spatial step size used is π 10 ) .
Figure 1. Plots of exact and approximate solutions vs. x using n = 10 terms from VHPM at times 0.1 , 1.0 , 2.0 and 4.0 . (The spatial step size used is π 10 ) .
Mathematics 10 04443 g001aMathematics 10 04443 g001b
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 n = 10 terms from VHPM Δ x = π 10 .
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 n = 10 terms from VHPM Δ x = π 10 .
Mathematics 10 04443 g002
Figure 3. Plots of initial, numerical and exact solution vs. x [ 0 , 2 π ] at times t = 0.10 , 2.0 , 6.0 , 10.0 , using FDM with Δ t = 10 3 and Δ x = π 10 .
Figure 3. Plots of initial, numerical and exact solution vs. x [ 0 , 2 π ] at times t = 0.10 , 2.0 , 6.0 , 10.0 , using FDM with Δ t = 10 3 and Δ x = π 10 .
Mathematics 10 04443 g003
Figure 4. Plots of absolute errors vs. x at times t = 0.10 , 2.0 , 6.0 , 10.0 using a classical finite difference scheme with Δ t = 10 3 and Δ x = π 10 .
Figure 4. Plots of absolute errors vs. x at times t = 0.10 , 2.0 , 6.0 , 10.0 using a classical finite difference scheme with Δ t = 10 3 and Δ x = π 10 .
Mathematics 10 04443 g004
Figure 5. Plots of relative errors vs. x at times t = 0.10 , 2.0 , 6.0 , 10.0 , using a classical finite difference scheme with Δ t = 10 3 and Δ x = π 10 .
Figure 5. Plots of relative errors vs. x at times t = 0.10 , 2.0 , 6.0 , 10.0 , using a classical finite difference scheme with Δ t = 10 3 and Δ x = π 10 .
Mathematics 10 04443 g005
Figure 6. Plots of the maximum error vs. time t [ 0 , 10.0 ] and the loglog plot of max. error vs. time using the classical FDM for Experiment 1 with Δ t = 0.001 , 0.01 and Δ x = π 10 .
Figure 6. Plots of the maximum error vs. time t [ 0 , 10.0 ] and the loglog plot of max. error vs. time using the classical FDM for Experiment 1 with Δ t = 0.001 , 0.01 and Δ x = π 10 .
Mathematics 10 04443 g006
Figure 7. Plots of the exact and approximate solution vs. x at times 0.01, and 0.10 with Δ x = 0.05 , using n = 7 terms from VHPM.
Figure 7. Plots of the exact and approximate solution vs. x at times 0.01, and 0.10 with Δ x = 0.05 , using n = 7 terms from VHPM.
Mathematics 10 04443 g007
Figure 8. Plots of absolute errors vs. x at times 0.01, and 0.10 with Δ x = 0.05 using n = 7 terms from VHPM.
Figure 8. Plots of absolute errors vs. x at times 0.01, and 0.10 with Δ x = 0.05 using n = 7 terms from VHPM.
Mathematics 10 04443 g008
Figure 9. Plots of the exact and numerical solution vs. x [ 0 , 1 ] at times t = 0.01 , 0.10 , using a classical finite difference scheme with Δ t = 10 5 , Δ x = 0.05 with corresponding absolute and relative errors vs. x (at times t = 0.01 , 0.10 ), respectively. (a) Δ t = 1.0 × 10 5 , ( Time = 0.01 ); (b) Δ t = 1.0 × 10 5 , ( Time = 0.10 ); (c) Δ t = 1.0 × 10 5 , ( Time = 0.01 ); (d) Δ t = 1.0 × 10 5 , ( Time = 0.10 ); (e) Δ t = 1.0 × 10 5 , ( Time = 0.01 ); (f) Δ t = 1.0 × 10 5 , ( Time = 0.10 ).
Figure 9. Plots of the exact and numerical solution vs. x [ 0 , 1 ] at times t = 0.01 , 0.10 , using a classical finite difference scheme with Δ t = 10 5 , Δ x = 0.05 with corresponding absolute and relative errors vs. x (at times t = 0.01 , 0.10 ), respectively. (a) Δ t = 1.0 × 10 5 , ( Time = 0.01 ); (b) Δ t = 1.0 × 10 5 , ( Time = 0.10 ); (c) Δ t = 1.0 × 10 5 , ( Time = 0.01 ); (d) Δ t = 1.0 × 10 5 , ( Time = 0.10 ); (e) Δ t = 1.0 × 10 5 , ( Time = 0.01 ); (f) Δ t = 1.0 × 10 5 , ( Time = 0.10 ).
Mathematics 10 04443 g009
Figure 10. Plots of the exact and numerical solution vs. x [ 0 , 1 ] at times t = 1.0 , 2.0 , using a classical finite difference scheme with Δ t = 10 5 , Δ x = 0.05 , with corresponding absolute and relative errors vs. x (at times 1.0 , 2.0 ), respectively. (a) Δ t = 1.0 × 10 5 , ( Time = 1.0 ); (b) Δ t = 1.0 × 10 5 , ( Time = 2.0 ); (c) Δ t = 1.0 × 10 5 , ( Time = 1.0 ); (d) Δ t = 1.0 × 10 5 , ( Time = 2.0 ); (e) Δ t = 1.0 × 10 5 , ( Time = 1.0 ); (f) Δ t = 1.0 × 10 5 , ( Time = 2.0 ).
Figure 10. Plots of the exact and numerical solution vs. x [ 0 , 1 ] at times t = 1.0 , 2.0 , using a classical finite difference scheme with Δ t = 10 5 , Δ x = 0.05 , with corresponding absolute and relative errors vs. x (at times 1.0 , 2.0 ), respectively. (a) Δ t = 1.0 × 10 5 , ( Time = 1.0 ); (b) Δ t = 1.0 × 10 5 , ( Time = 2.0 ); (c) Δ t = 1.0 × 10 5 , ( Time = 1.0 ); (d) Δ t = 1.0 × 10 5 , ( Time = 2.0 ); (e) Δ t = 1.0 × 10 5 , ( Time = 1.0 ); (f) Δ t = 1.0 × 10 5 , ( Time = 2.0 ).
Mathematics 10 04443 g010
Figure 11. 3D surface plots of the (a) exact solution and (b) numerical solution vs. x at time 2.0 with Δ x = 0.05 , using the standard finite difference method.
Figure 11. 3D surface plots of the (a) exact solution and (b) numerical solution vs. x at time 2.0 with Δ x = 0.05 , using the standard finite difference method.
Mathematics 10 04443 g011
Figure 12. Plots of the maximum error vs. time t [ 0 , 2.0 ] , and the loglog plot of max. error vs. time, using the classical FDM with Δ t = 10 5 and Δ x = 0.05 .
Figure 12. Plots of the maximum error vs. time t [ 0 , 2.0 ] , and the loglog plot of max. error vs. time, using the classical FDM with Δ t = 10 5 and Δ x = 0.05 .
Mathematics 10 04443 g012
Figure 13. 3D graphical representation of the exact solution and approximate solutions vs. x vs. y using n = 7 terms from VHPM for Equation (9) at times t = 0.10 , 1.0 , respectively. (a) t = 0.10 ; (b) t = 0.10 ; (c) t = 1.0 ; (d) t = 1.0 .
Figure 13. 3D graphical representation of the exact solution and approximate solutions vs. x vs. y using n = 7 terms from VHPM for Equation (9) at times t = 0.10 , 1.0 , respectively. (a) t = 0.10 ; (b) t = 0.10 ; (c) t = 1.0 ; (d) t = 1.0 .
Mathematics 10 04443 g013
Figure 14. Plots of Ψ ( x , y ) vs. ω x vs. ω y for the Δ t -values of Δ t = 0.00008 , 0.0001 , 0.00012 , 0.00014 . (a) Δ t = 0.00006 ; (b) Δ t = 0.00010 ; (c) Δ t = 0.00012 ; (d) Δ t = 0.00014 .
Figure 14. Plots of Ψ ( x , y ) vs. ω x vs. ω y for the Δ t -values of Δ t = 0.00008 , 0.0001 , 0.00012 , 0.00014 . (a) Δ t = 0.00006 ; (b) Δ t = 0.00010 ; (c) Δ t = 0.00012 ; (d) Δ t = 0.00014 .
Mathematics 10 04443 g014
Figure 15. Plots of the maximum error vs. time t [ 0 , 3.0 ] and the loglog plot of max. error vs. time using the standard FDM for Experiment 3 with Δ x = Δ y = 0.1 and Δ t = 10 4 .
Figure 15. Plots of the maximum error vs. time t [ 0 , 3.0 ] and the loglog plot of max. error vs. time using the standard FDM for Experiment 3 with Δ x = Δ y = 0.1 and Δ t = 10 4 .
Mathematics 10 04443 g015
Figure 16. Plots of exact and numerical solution vs. x vs. y, using the classical FDMscheme of Equation (42) on Ω = ( 0 , 1 ) 2 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.
Figure 16. Plots of exact and numerical solution vs. x vs. y, using the classical FDMscheme of Equation (42) on Ω = ( 0 , 1 ) 2 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.
Mathematics 10 04443 g016aMathematics 10 04443 g016b
Figure 17. (Left) Graphical representation of the exact (as well as the VHPM) solution vs. x [ 0 , 1.0 ] vs. t [ 0 , 1.0 ] along y = 0.95 , and (Right) plot of the VHPM solution (with n = 2 ) (as well as the exact solution) vs. x [ 0 , 1.0 ] vs. y [ 0 , 1.0 ] at time t = 0.50 .
Figure 17. (Left) Graphical representation of the exact (as well as the VHPM) solution vs. x [ 0 , 1.0 ] vs. t [ 0 , 1.0 ] along y = 0.95 , and (Right) plot of the VHPM solution (with n = 2 ) (as well as the exact solution) vs. x [ 0 , 1.0 ] vs. y [ 0 , 1.0 ] at time t = 0.50 .
Mathematics 10 04443 g017
Figure 18. Plots for the maximum error vs. time t [ 0 , 8.0 ] and the loglog plot of the max. error vs. time using the standard FDM for Experiment 4 with Δ x = Δ y = 0.1 and Δ t = 10 4 , respectively.
Figure 18. Plots for the maximum error vs. time t [ 0 , 8.0 ] and the loglog plot of the max. error vs. time using the standard FDM for Experiment 4 with Δ x = Δ y = 0.1 and Δ t = 10 4 , respectively.
Mathematics 10 04443 g018
Figure 19. 3D plots of the exact and the FDM solution vs. x vs. y for (x;y) ∈ Ω, Ω = ( 0 , 1 ) 2 t = 10 4 ) at times t = 1.0, 2.0, 5.0, 8.0. (a) Δt = 1.0 × 10 4 , Time = 1.0; (b) Δt = 1.0 × 10 4 , Time = 1.0; (c) Δt = 1.0 × 10 4 , Time = 2.0; (d) Δt = 1.0 × 10 4 , Time = 2.0; (e) Δt = 1.0 × 10 4 , Time = 5.0; (f) Δt = 1.0 × 10 4 , Time = 5.0; (g) Δt = 1.0 × 10 4 , Time = 8.0; (h) Δt = 1.0 × 10 4 , Time = 8.0.
Figure 19. 3D plots of the exact and the FDM solution vs. x vs. y for (x;y) ∈ Ω, Ω = ( 0 , 1 ) 2 t = 10 4 ) at times t = 1.0, 2.0, 5.0, 8.0. (a) Δt = 1.0 × 10 4 , Time = 1.0; (b) Δt = 1.0 × 10 4 , Time = 1.0; (c) Δt = 1.0 × 10 4 , Time = 2.0; (d) Δt = 1.0 × 10 4 , Time = 2.0; (e) Δt = 1.0 × 10 4 , Time = 5.0; (f) Δt = 1.0 × 10 4 , Time = 5.0; (g) Δt = 1.0 × 10 4 , Time = 8.0; (h) Δt = 1.0 × 10 4 , Time = 8.0.
Mathematics 10 04443 g019aMathematics 10 04443 g019b
Figure 20. 3D plot of the exact and approximate solutions, using n = 4 terms from VHPM vs. x [ 0 , 2 π ] vs. t [ 0 , 1.5 ] . (a) Solution using VHPM; (b) Exact solution.
Figure 20. 3D plot of the exact and approximate solutions, using n = 4 terms from VHPM vs. x [ 0 , 2 π ] vs. t [ 0 , 1.5 ] . (a) Solution using VHPM; (b) Exact solution.
Mathematics 10 04443 g020
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 = 10 2 and Δx = π 10 .
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 = 10 2 and Δx = π 10 .
Mathematics 10 04443 g021aMathematics 10 04443 g021b
Figure 22. Plots of absolute errors vs. x at times t = 0.10 , 2.0 , 4.0 , 8.0 , using a classical finite difference scheme with Δ t = 10 2 and Δ x = π 10 .
Figure 22. Plots of absolute errors vs. x at times t = 0.10 , 2.0 , 4.0 , 8.0 , using a classical finite difference scheme with Δ t = 10 2 and Δ x = π 10 .
Mathematics 10 04443 g022
Figure 23. Plots of relative errors vs. x at times t = 0.10 , 2.0 , 4.0 , 8.0 , using the classical finite difference scheme with Δ t = 10 2 and Δ x = π 10 .
Figure 23. Plots of relative errors vs. x at times t = 0.10 , 2.0 , 4.0 , 8.0 , using the classical finite difference scheme with Δ t = 10 2 and Δ x = π 10 .
Mathematics 10 04443 g023aMathematics 10 04443 g023b
Figure 24. Plot of the maximum error vs. time t [ 0 , 8.0 ] and the loglog plot of the maximum error vs. time t with Δ x = π 10 and Δ t = 1.0 × 10 2 , using the standard finite difference scheme, respectively.
Figure 24. Plot of the maximum error vs. time t [ 0 , 8.0 ] and the loglog plot of the maximum error vs. time t with Δ x = π 10 and Δ t = 1.0 × 10 2 , using the standard finite difference scheme, respectively.
Mathematics 10 04443 g024
Table 1. Absolute and relative errors at some values of x using a classical finite difference scheme with Δ t = 10 5 , Δ x = 0.05 at times t = 0.10 , 1.0 , 2.0 .
Table 1. Absolute and relative errors at some values of x using a classical finite difference scheme with Δ t = 10 5 , Δ x = 0.05 at times t = 0.10 , 1.0 , 2.0 .
txExact SolutionNumerical (FDM) SolutionAbsolute ErrorRelative Error
0.000.0000000.0000000.000000—-
0.050.1556530.1556530.00000000.000000
0.100.3074730.3071093.644020 × 10 4 1.434768 × 10 3
0.150.4517220.4515022.209258 × 10 4 3.513621 × 10 4
0.200.5848490.5843984.510973 × 10 4 6.214351 × 10 4
0.250.7035740.7033622.119868 × 10 4 1.180486 × 10 4
0.300.8049750.8046313.446030 × 10 4 4.394541 × 10 5
0.350.8865550.8865015.388093 × 10 5 4.614600 × 10 4
0.400.9463050.9461631.424468 × 10 4 2.362730 × 10 4
0.450.9827540.982901.486446 × 10 4 5.587316 × 10 4
0.100.500.9950040.9950635.837165 × 10 5 2.152711 × 10 4
0.550.9827540.983063.067277 × 10 4 4.054379 × 10 4
0.600.9463050.9464781.731246 × 10 4 5.305065 × 10 5
0.650.8865550.8869013.466181 × 10 4 8.155528 × 10 5
0.700.8049750.8051271.512676 × 10 4 4.798332 × 10 4
0.750.7035740.7038232.488465 × 10 4 3.046279 × 10 4
0.800.5848490.5848545.435241 × 10 6 9.697751 × 10 4
0.850.4517220.4517876.425356 × 10 5 5.839323 × 10 4
0.900.3074730.3073221.516304 × 10 4 1.517804 × 10 3
0.950.1556530.1556530.00000000.00000000
1.01.218529  × 10 16 1.218529  × 10 16 0.0000000.0000000
0.000.0000000.0000000.000000
0.058.452190  × 10 2 8.452190  × 10 2 0.0000000.000000
0.101.669626  × 10 1 1.666859  × 10 1 2.766808   × 10 4 1.657142  × 10 3
0.152.452921  × 10 1 2.450695  × 10 1 2.226391   × 10 4 9.076487  × 10 4
0.203.175817  × 10 1 3.171776  × 10 1 4.041147  × 10 4 1.272475  × 10 3
0.253.820514  × 10 1 3.817850  × 10 1 2.664477   × 10 4 6.974131  × 10 4
0.304.371137  × 10 1 4.367783  × 10 1 3.354752  × 10 4 7.674781  × 10 4
0.354.814129  × 10 1 4.812927  × 10 1 1.202064   × 10 4 2.496951  × 10 4
0.405.138580  × 10 1 5.137448  × 10 1 1.132063  × 10 4 2.203066  × 10 4
0.455.336503  × 10 1 5.337604  × 10 1 1.101442   × 10 4 2.063978  × 10 4
1.00.505.403023  × 10 1 5.403990  × 10 2 9.664654   × 10 5 1.788749  × 10 4
0.555.336503  × 10 1 5.339099  × 10 1 2.597111   × 10 4 4.866691  × 10 4
0.605.138580  × 10 1 5.140498  × 10 1 1.917252   × 10 4 3.731092  × 10 4
0.654.814129  × 10 1 4.817033  × 10 1 2.903852   × 10 4 6.031938  × 10 4
0.704.371137  × 10 1 4.372791  × 10 1 1.653917   × 10 4 3.783723  × 10 4
0.753.820514  × 10 1 3.822549  × 10 1 2.035211  × 10 4 5.327060  × 10 4
0.803.175817  × 10 1 3.176247  × 10 1 4.299915  × 10 5 1.353955  × 10 4
0.852.452921  × 10 1 2.453477  × 10 1 5.561969   × 10 5 2.267488  × 10 4
0.901.669626   × 10 1 1.668844  × 10 1 7.823184   × 10 5 4.685591  × 10 4
0.958.452190  × 10 2 8.452190  × 10 2 0.0000000.000000
1.06.616795  × 10 17 6.616795  × 10 17 0.0000000.000000
0.000.0000000.0000000.000000
0.05−6.509971  × 10 2 −6.509971  × 10 2 0.0000000.000000
0.10−1.285964  × 10 1 −1.287342  × 10 1 1.377844  × 10 4 1.071448  × 10 3
0.15−1.889267  × 10 1 −1.889825  × 10 1 5.578956  × 10 5 2.952974  × 10 4
0.20−2.446050  × 10 1 −2.447289  × 10 1 1.2393035  × 10 4 5.066551  × 10 4
0.25−2.942603  × 10 1 −2.942303   × 10 1 2.990097  × 10 5 1.01614  × 10 4
0.30−3.366699  × 10 1 −3.366621  × 10 1 7.762543   × 10 6 2.305684  × 10 5
0.35−3.707895  × 10 1 −3.706230  × 10 1 1.665078  × 10 4 4.490629  × 10 4
0.40−3.957792  × 10 1 −3.956736  × 10 1 1.055953  × 10 4 2.668036  × 10 4
0.45−4.110234  × 10 1 −4.108272  × 10 1 1.961779  × 10 4 4.772914  × 10 4
2.00.50−4.161468  × 10 1 −4.160785  × 10 1 6.834419   × 10 5 1.642310  × 10 4
0.55−4.110234  × 10 1 −4.109187  × 10 1 1.046469  × 10 4 2.546009  × 10 4
0.60−3.957792  × 10 1 −3.958259  × 10 1 4.670829   × 10 5 1.180160  × 10 4
0.65−3.707895  × 10 1 −3.708076  × 10 1 1.804617  × 10 5 4.866957  × 10 5
0.70−3.366699  × 10 1 −3.368163  × 10 1 1.464149  × 10 4 4.348916  × 10 4
0.75−2.942603  × 10 1 −2.943478  × 10 1 8.754363  × 10 5 2.975041  × 10 4
0.80−2.446050  × 10 1 −2.447732  × 10 1 1.681892   × 10 4 6.875951  × 10 4
0.85−1.889267  × 10 1 −1.890046  × 10 1 7.784946  × 10 5 4.120617  × 10 4
0.90−1.285964  × 10 1 −1.287197  × 10 1 1.232140  × 10 4 9.581445  × 10 4
0.95−6.509971  × 10 2 −6.509971  × 10 2 0.0000000.000000
1.0−5.096329  × 10 17 −5.096329  × 10 17 0.0000000.000000
Table 2. A comparison between the exact solution and VHPM solution at some values of x and y at time t = 0.10 , 1.0 , 2.0 .
Table 2. A comparison between the exact solution and VHPM solution at some values of x and y at time t = 0.10 , 1.0 , 2.0 .
txyExact Solution VHPM SolutionAbsolute ErrorRelative Error
0.0 0.0 9.800666 × 10 1 9.800666 × 10 1 6.346390 × 10 11 6.475468 × 10 11
0.2 0.2 8.253356 × 10 1 8.253356 × 10 1 5.790479 × 10 11 7.015909 × 10 11
0.4 6.967067 × 10 1 6.967067 × 10 1 5.158263 × 10 11 7.403779 × 10 11
0.6 5.403023 × 10 1 5.403023 × 10 1 4.320399 × 10 11 7.996263 × 10 11
0.8 3.623578 × 10 1 3.623578 × 10 1 3.310296 × 10 11 9.135437 × 10 11
0.10 0.4 0.2 6.967067 × 10 1 6.967067 × 10 1 5.158263 × 10 11 7.403779 × 10 11
0.4 5.403023 × 10 1 5.403023 × 10 1 4.320399 × 10 11 7.996263 × 10 11
0.6 3.623578 × 10 1 3.623578 × 10 1 3.310296 × 10 11 9.135437 × 10 11
0.8 1.699671 × 10 1 1.699671 × 10 1 2.168213 × 10 11 1.275666 × 10 10
0.8 0.2 3.623578 × 10 1 3.623578 × 10 1 3.310296 × 10 11 9.135437 × 10 11
0.4 1.699671 × 10 1 1.699671 × 10 1 2.168213 × 10 11 1.275666 × 10 10
0.6 2.919952 × 10 2 2.919952 × 10 2 9.39695 × 10 12 3.218185 × 10 10
0.8 2.272021 × 10 1 2.272021 × 10 1 3.262889 × 10 12 1.436118 × 10 11
1.0 1.0 5.885011 × 10 1 5.885011 × 10 1 2.769285 × 10 11 4.705658 × 10 11
0.0 0.0 4.161468 × 10 1 4.222222 × 10 1 6.075386 × 10 3 1.459914 × 10 2
0.2 0.2 7.373937 × 10 1 7.424596 × 10 1 5.065830 × 10 3 6.869920 × 10 3
0.4 8.568888 × 10 1 8.611346 × 10 1 4.245800 × 10 3 4.954900 × 10 3
0.6 9.422223 × 10 1 9.454788 × 10 1 3.256500 × 10 3 3.456190 × 10 3
0.8 9.899925 × 10 1 9.921299 × 10 1 2.137370 × 10 3 2.158980 × 10 3
1.0 0.4 0.2 8.5688875 × 10 1 8.611346 × 10 1 4.245800 × 10 3 4.954900 × 10 3
0.4 9.422223 × 10 1 9.454788 × 10 1 3.256500 × 10 3 3.456190 × 10 3
0.6 9.899925 × 10 1 9.921299 × 10 1 2.137370 × 10 3 2.158980 × 10 3
0.8 9.982948 × 10 1 9.992278 × 10 1 9.330300 × 10 4 9.346300 × 10 4
0.8 0.2 9.899925 × 10 1 9.9212987 × 10 1 2.137370 × 10 3 2.158980 × 10 3
0.4 9.982948 × 10 1 9.992278 × 10 1 9.330300 × 10 4 9.346300 × 10 4
0.6 9.667982 × 10 1 9.664897 × 10 1 3.085000 × 10 4 3.191000 × 10 4
0.8 8.967584 × 10 1 8.952207 × 10 1 1.537740 × 10 3 1.714770 × 10 3
1.0 1.0 6.536436 × 10 1 6.498779 × 10 1 3.765733 × 10 3 5.761140 × 10 3
0.0 0.0 6.536436 × 10 1 2.022222 1.368579 × 10 0 2.093768 × 10 0
0.2 0.2 3.073329 × 10 1 1.323586 × 10 0 1.016253 × 10 0 3.306684 × 10 0
0.4 1.121525 × 10 1 8.874751 × 10 1 7.753226 × 10 1 6.913109 × 10 0
0.6 8.749898 × 10 2 4.159839 × 10 1 5.034829 × 10 1 5.754156 × 10 0
0.8 2.836622 × 10 1 7.209137 × 10 2 2.115708 × 10 1 7.458549 × 10 1
0.4 0.2 1.121525 × 10 1 8.874751 × 10 1 7.753226 × 10 1 6.91311 × 10 0
2.0 0.4 8.749898 × 10 2 4.159839 × 10 1 5.034829 × 10 1 5.754157 × 10 0
0.6 2.836622 × 10 1 7.209137 × 10 2 2.115708 × 10 1 7.458548 × 10 1
0.8 4.685167 × 10 1 5.572926 × 10 1 8.877587 × 10 2 1.894828 × 10 1
0.8 0.2 2.836622 × 10 1 7.209137 × 10 2 2.115708 × 10 1 7.458548 × 10 1
0.4 4.685167 × 10 1 5.572926 × 10 1 8.877587 × 10 2 1.894828 × 10 1
0.6 6.346929 × 10 1 1.020276 × 10 0 3.855834 × 10 1 6.075117 × 10 1
0.8 7.755659 × 10 1 1.442585 × 10 0 6.670188 × 10 1 8.600415 × 10 1
1.0 1.0 9.601703 × 10 1 2.100124 × 10 0 1.139954 × 10 0 1.187242 × 10 0
Table 3. A comparison between the exact solution and FDM solution at some values of x and y three different time propagations.
Table 3. A comparison between the exact solution and FDM solution at some values of x and y three different time propagations.
txyExact Solution FDM SolutionAbsolute ErrorRelative Error
0.0 0.0 9.800666 × 10 1 9.800666 × 10 1 0.00000 0.00000
0.2 0.2 8.253356 × 10 1 8.256634 × 10 1 3.278350 × 10 4 3.972141 × 10 4
0.4 6.967067 × 10 1 6.971658 × 10 1 4.591225 × 10 4 6.589897 × 10 4
0.6 5.403023 × 10 1 5.408007 × 10 1 4.983545 × 10 4 9.223624 × 10 4
0.8 3.623578 × 10 1 3.626549 × 10 1 2.971107 × 10 4 8.199376 × 10 4
0.10 0.4 0.2 6.967067 × 10 1 6.971658 × 10 1 4.591225 × 10 4 6.589897 × 10 4
0.4 5.403023 × 10 1 5.410416 × 10 1 7.393096 × 10 4 1.368326 × 10 3
0.6 3.623578 × 10 1 3.630982 × 10 1 7.404366 × 10 4 2.043385 × 10 3
0.8 1.699671 × 10 1 1.704611 × 10 1 4.939410 × 10 4 2.906097 × 10 3
0.6 0.2 5.403023 × 10 1 5.408007 × 10 1 4.983545 × 10 4 9.223624 × 10 4
0.4 3.623578 × 10 1 3.630982 × 10 1 7.404366 × 10 4 2.043385 × 10 3
0.6 1.699671 × 10 1 1.707071 × 10 1 7.399203 × 10 4 4.353314 × 10 3
0.8 2.919952 × 10 2 2.874490 × 10 2 4.546532 × 10 4 1.557057 × 10 2
0.8 0.2 3.623578 × 10 1 3.626549 × 10 1 2.971107 × 10 4 8.199376 × 10 4
0.4 1.699671 × 10 1 1.704611 × 10 1 4.939410 × 10 4 2.906097 × 10 3
0.6 2.919952 × 10 2 2.874487 × 10 2 4.546532 × 10 4 1.557057 × 10 2
0.8 2.272021 × 10 1 2.268801 × 10 1 3.219550 × 10 4 1.417042 × 10 3
1.0 1.0 5.885011 × 10 1 5.885011 × 10 1 0.000000 0.000000
0.0 0.0 4.161468 × 10 1 4.161468 × 10 1 0.000000 0.000000
0.2 0.2 7.373937 × 10 1 7.345692 × 10 1 2.824511 × 10 3 3.830398 × 10 3
0.4 8.568888 × 10 1 8.529301 × 10 1 3.958671 × 10 3 4.619819 × 10 3
0.6 9.422223 × 10 1 9.37927 × 10 1 4.295795 × 10 3 4.559216 × 10 3
0.8 9.899925 × 10 1 9.874045 × 10 1 2.588046 × 10 3 2.614208 × 10 3
1.0 0.4 0.2 8.568888 × 10 1 8.529301 × 10 1 3.958671 × 10 3 4.6198195 × 10 3
0.4 9.422223 × 10 1 9.358445 × 10 1 6.377865 × 10 3 6.768959 × 10 3
0.6 9.8999249 × 10 1 9.836041 × 10 1 6.388385 × 10 3 6.452963 × 10 3
0.8 9.982948 × 10 1 9.939962 × 10 1 4.298589 × 10 3 4.305931 × 10 3
0.6 0.2 9.422223 × 10 1 9.379265 × 10 1 4.295795 × 10 3 4.559216 × 10 3
0.4 9.899925 × 10 1 9.836041 × 10 1 6.388385 × 10 3 6.452963 × 10 3
0.6 9.982948 × 10 1 9.919138 × 10 1 6.381004 × 10 3 6.391904 × 10 3
0.8 9.667982 × 10 1 9.628336 × 10 1 3.964556 × 10 3 4.100707 × 10 3
0.8 0.2 9.899925 × 10 1 9.874045 × 10 1 2.588046 × 10 3 2.614208 × 10 3
0.4 9.982948 × 10 1 9.939962 × 10 1 4.298589 × 10 3 4.305931 × 10 3
0.6 9.667982 × 10 1 9.628336 × 10 1 3.964556 × 10 3 4.100707 × 10 3
0.8 8.967584 × 10 1 8.939276 × 10 1 2.830849 × 10 3 3.156758 × 10 3
1.0 1.0 6.536436 × 10 1 6.536436 × 10 1 0.000000 0.000000
0.0 0.0 6.536436 × 10 1 6.536436 × 10 1 0.000000 0.000000
0.2 0.2 3.073329 × 10 1 3.068653 × 10 1 4.675817 × 10 4 1.521418 × 10 3
0.4 1.121525 × 10 1 1.114919 × 10 1 6.606069 × 10 4 5.890254 × 10 3
0.6 8.749898 × 10 2 8.821557 × 10 2 7.165873 × 10 4 8.189664 × 10 3
0.8 2.836622 × 10 1 2.840925 × 10 1 4.302832 × 10 4 1.516886 × 10 3
2.0 0.4 0.2 1.121525 × 10 1 1.114919 × 10 1 6.606069 × 10 4 5.890254 × 10 3
0.4 8.749898 × 10 2 8.857237 × 10 2 1.073386 × 10 3 1.226741 × 10 2
0.6 2.836622 × 10 1 2.847349 × 10 1 1.072748 × 10 3 3.781779 × 10 3
0.8 4.685167 × 10 1 4.692368 × 10 1 7.201221 × 10 4 1.537025 × 10 3
0.6 0.2 8.749898 × 10 2 8.821557 × 10 2 7.165873 × 10 4 8.189664 × 10 3
0.4 2.836622 × 10 1 2.847349 × 10 1 1.072748 × 10 3 3.781779 × 10 3
0.6 4.685167 × 10 1 4.695865 × 10 1 1.069798 × 10 3 2.283372 × 10 3
0.8 6.346929 × 10 1 6.353552 × 10 1 6.6228012 × 10 4 1.043466 × 10 3
0.8 0.2 2.836622 × 10 1 2.840925 × 10 1 4.302832 × 10 4 1.516886 × 10 3
0.4 4.685167 × 10 1 4.692368 × 10 1 7.201221 × 10 4 1.537025 × 10 3
0.6 6.346929 × 10 1 6.353552 × 10 1 6.622802 × 10 4 1.043466 × 10 3
0.8 7.755659 × 10 2 7.760373 × 10 2 4.713753 × 10 4 6.077824 × 10 4
1.0 1.0 9.601703 × 10 1 9.601703 × 10 1 0.000000 0.000000
Table 4. A comparison between the exact solution and FDM solution at some values of x and y at times t = 0.10 , 1.0 , 2.0 (Experiment 4).
Table 4. A comparison between the exact solution and FDM solution at some values of x and y at times t = 0.10 , 1.0 , 2.0 (Experiment 4).
txyExact Solution FDM SolutionAbsolute ErrorRelative Error
0.0 0.0 1.105171 1.105171 0.000000 0.000000
0.2 0.2 1.105171 1.105171 3.272759 × 10 9 2.961315 × 10 9
0.4 1.083141 1.083141 1.980772 × 10 9 1.828729 × 10 9
0.6 1.017929 1.017929 2.657259 × 10 9 2.610454 × 10 9
0.8 9.121369 × 10 1 9.121369 × 10 1 1.202890 × 10 10 1.318760 × 10 10
0.10 0.4 0.2 1.083141 1.083141 1.980772 × 10 9 1.828729 × 10 9
0.4 1.105171 1.105171 1.898155 × 10 10 1.717522 × 10 10
0.6 1.083141 1.083141 2.864586 × 10 10 2.644703 × 10 10
0.8 1.017929 1.017929 2.278236 × 10 9 2.238107 × 10 9
0.8 0.2 9.121377 × 10 1 9.121369 × 10 1 1.202870 × 10 10 1.318738 × 10 10
0.4 1.017930 1.017929 2.278236 × 10 9 2.238107 × 10 9
0.6 1.083141 1.083141 1.605688 × 10 9 1.482437 × 10 9
0.8 1.105171 1.105171 2.971336 × 10 9 2.688576 × 10 9
1.0 1.0 1.105171 1.105171 0.000000 0.000000
0.0 0.0 2.718282 2.718282 0.000000 0.000000
0.2 0.2 2.718282 2.718282 1.049272 × 10 9 3.860057 × 10 10
0.4 2.664097 2.664097 2.499563 × 10 9 9.382401 × 10 10
0.6 2.503703 2.503703 1.876913 × 10 9 7.496546 × 10 10
0.8 2.243495 2.243495 1.960433 × 10 9 8.738300 × 10 10
1.0 0.4 0.2 2.664097 2.664097 2.499576 × 10 9 9.382449 × 10 10
0.4 2.718282 2.718282 6.650187 × 10 9 2.446467 × 10 9
0.6 2.664097 2.664097 4.694272 × 10 9 1.762050 × 10 9
0.8 2.503703 2.503703 4.319871 × 10 9 1.725393 × 10 9
0.8 0.2 2.243495 2.243495 1.960426 × 10 9 8.738269 × 10 10
0.4 2.503703 2.503703 4.319886 × 10 9 1.725398 × 10 9
0.6 2.664097 2.664097 3.635933 × 10 9 1.364789 × 10 9
0.8 2.718282 2.718282 3.871336 × 10 9 1.424185 × 10 9
1.0 1.0 2.718282 2.718282 0.000000 0.000000
0.2 0.2 7.389056 7.389056 6.118424 × 10 9 8.280386 × 10 10
0.4 7.241767 7.241767 9.911319 × 10 9 1.368633 × 10 9
0.6 6.805771 6.805771 9.219519 × 10 9 1.354662 × 10 9
0.8 6.098451 6.098451 7.290955 × 10 9 1.195542 × 10 9
2.0 0.4 0.2 7.241767 7.241767 9.911327 × 10 9 1.368634 × 10 9
0.4 7.389056 7.389056 1.911231 × 10 8 2.586570 × 10 9
0.6 7.241767 7.241767 1.745360 × 10 8 2.410131 × 10 9
0.8 6.805771 6.805771 1.382399 × 10 8 2.031217 × 10 9
0.8 0.2 6.098451 6.098451 7.290940 × 10 9 1.1955397 × 10 9
0.4 6.805771 6.805771 1.382399 × 10 8 2.031217 × 10 9
0.6 7.241767 7.241767 1.290455 × 10 8 1.781962 × 10 9
0.8 7.389056 7.389056 1.218180 × 10 8 1.648628 × 10 9
1.0 1.0 7.389056 7.389056 0.000000 0.000000
0.0 0.0 2.980958 × 10 3 2.980958 × 10 3 0.000000 0.000000
0.2 0.2 2.980958 × 10 3 2.980958 × 10 3 4.273845 × 10 6 1.433715 × 10 9
0.4 2.921537 × 10 3 2.9215370 × 10 3 5.325453 × 10 6 1.822825 × 10 9
0.6 2.745644 × 10 3 2.745644 × 10 3 5.379429 × 10 6 1.959259 × 10 9
0.8 2.460291 × 10 3 2.460291 × 10 3 3.400780 × 10 6 1.382268 × 10 9
8.0 0.4 0.2 2.921537 × 10 3 2.921537 × 10 3 5.325440 × 10 6 1.822821 × 10 9
0.4 2.980958 × 10 3 2.980958 × 10 3 8.472980 × 10 6 2.842368 × 10 9
0.6 2.921537 × 10 3 2.921537 × 10 3 8.140318 × 10 6 2.786313 × 10 9
0.8 2.745644 × 10 3 2.745644 × 10 3 5.368224 × 10 6 1.955178 × 10 9
0.8 0.2 2.460291 × 10 3 2.460291 × 10 3 3.400739 × 10 6 1.382251 × 10 9
0.4 2.745644 × 10 3 2.745644 × 10 3 5.368230 × 10 6 1.955181 × 10 9
0.6 2.921537 × 10 3 2.921537 × 10 3 5.316034 × 10 6 1.819602 × 10 9
0.8 2.980958 × 10 3 2.980958 × 10 3 4.261710 × 10 6 1.429644 × 10 9
1.0 1.0 2.980958 × 10 3 2.980958 × 10 3 0.000000 0.000000
Table 5. Absolute and relative errors (VHPM with n = 4 ) at some values of x [ 0 , 2 π ] and t [ 0 , 2.0 ] .
Table 5. Absolute and relative errors (VHPM with n = 4 ) at some values of x [ 0 , 2 π ] and t [ 0 , 2.0 ] .
xtExact SolutionVHPM SolutionAbsolute ErrorRelative Error
0.010.43178110.43178111.899052  × 10 10 4.398183  × 10 10
π 4 0.50.48995510.48856551.389585  × 10 3 2.836147  × 10 3
1.00.49428720.46892592.536130  × 10 2 5.130883  × 10 2
2.00.3529964−0.11162014.646165  × 10 1 1.316208  × 10 0
0.010.28683780.28683781.730594  × 10 10 6.033353  × 10 10
π 2 0.50.38019650.37910791.088588 × 10 3 2.863224  × 10 3
1.00.46138750.44314951.823802  × 10 2 3.952863  × 10 2
2.00.47766200.12834433.493177  × 10 1 7.313072  × 10 1
0.010.08014720.08014724.832666  × 10 11 6.029739  × 10 10
π 0.50.12417130.12449163.203225  × 10 4 2.579683  × 10 3
1.00.18813870.19367585.537052  × 10 3 2.943068  × 10 2
2.00.36690100.47405491.071540  × 10 1 2.920515  × 10 1
0.010.01782230.01782234.102757  × 10 12 2.302041  × 10 10
3 π 2 0.50.02876350.02878702.345761  × 10 5 8.155326  × 10 4
1.00.04653770.04688043.427113  × 10 4 7.364171  × 10 3
2.00.11674330.12174445.001064  × 10 3 4.283812 × 10 2
0.010.00820590.00820599.294671  × 10 13 1.132676  × 10 10
7 π 4 0.50.01332520.01332934.150761  × 10 6 3.114977 × 10 4
1.00.02177950.02181613.658641  × 10 5 1.679852  × 10 3
2.00.05702470.05657984.449361  × 10 4 7.802514  × 10 3
0.010.00375820.00375821.995532  × 10 13 5.309766 × 10 11
2 π 0.50.00612000.00612043.401180  × 10 7 5.557447  × 10 5
1.00.01005020.01003851.164189  × 10 5 1.158376  × 10 3
2.00.02685110.02599348.577236  × 10 4 3.194365  × 10 2
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Kelil, A.S.; Appadu, A.R. On the Numerical Solution of 1D and 2D KdV Equations Using Variational Homotopy Perturbation and Finite Difference Methods. Mathematics 2022, 10, 4443. https://doi.org/10.3390/math10234443

AMA Style

Kelil AS, Appadu AR. On the Numerical Solution of 1D and 2D KdV Equations Using Variational Homotopy Perturbation and Finite Difference Methods. Mathematics. 2022; 10(23):4443. https://doi.org/10.3390/math10234443

Chicago/Turabian Style

Kelil, Abey Sherif, and Appanah Rao Appadu. 2022. "On the Numerical Solution of 1D and 2D KdV Equations Using Variational Homotopy Perturbation and Finite Difference Methods" Mathematics 10, no. 23: 4443. https://doi.org/10.3390/math10234443

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop