In this work, we consider the well known Kortweg-de Vries (KdV) equation 
with initial condition
and homogenous boundary conditions
where x and t denote the spatial and temporal variables, respectively, and is the unknown function. The KdV equation is one of the mostly analyzed nonlinear partial differential equation. It is used to model the propagation of water waves and also arises in other areas such as hydrodynamics waves in cold plasma, and acoustic waves in harmonic crystals. The importance of this equation lies not only in their applications but also in some special properties which are not expected from a nonlinear partial differential equation. In fact, the KdV equation has certain special solution known as solitary wave solution   which retains their shape in time and moves to the right. It can also have multi-soliton solutions, where the individual solutions interact nonlinearly at close distance and then move away from each other without changing in their shapes.
Once these interesting aspects had been discovered, several authors investigated the solution of the KdV equation from both the theoretical and numerical point view. Among the methods available in the literature, Hirota and Adomian methods, these methods are able to provide explicit solution which is useful to check the accuracy of the numerical methods aiming at approximating the solution of the KdV equation. Many researchers have derived efficient numerical methods for investigating the numerical solution of the KdV equation. For instance, in  a class of three level finite difference scheme for solving KdV equation is proposed firstly by Zabusky and Kruskal who discovered the concept of soliton, which can be defined as a localized waves with special interaction properties, while studying the results of a numerical computation on the KdV equation. The proposed three-level scheme which requires a starting procedure satisfies momentum and energy conservation laws. In , a two-level hopscotch algorithm is derived and the stability and dispersion is analyzed. The Crank-Nicolson extrapolation scheme for the KdV equation is proposed in . A hybrid numerical method for KdV equation is proposed by a combination of finite difference and sinc collocation method is proposed in . In , a quadratic B-spline Galerkin finite element method is proposed. The Galerkin method for KdV equation using a new basis of smooth piecewise cubic polynomials is developed for simulating the motions and interaction of solitary waves presented in . Petrov Galerkin method      is used to solve KdV and KdV like equations to obtain highly accurate results. Numerical solution of KdV equation by Galerkin B-spline finite element method is presented in . In , The conservation and convergence of two finite difference schemes for KdV equations with initial and boundary conditions derived, the first scheme is a two-level nonlinear implicit finite difference scheme which is proved to be unconditional convergent, and the second one is a three-level linearized finite difference scheme and proved to be conditionally convergent.
In this paper, we will derive numerical schemes for the KdV equation; based on the Padé approximation, fourth approximation of the space derivatives is used. The second order implicit schemes using, trapezoidal rule, implicit midpoint rule (both are implicit and unconditionally stable), and the explicit Runge-Kutta method of order four are used to approximate the time derivative. A nonlinear penta-diagonal system is obtained. Newton’s method is used to solve this system in case of the implicit schemes. The implicit schemes are unconditionally stable according to the von-Nueumann stability analysis. Several numerical examples are carefully designed to validate the efficiency and robustness of the proposed schemes, single soliton, interaction of two and three solitons.
The rest of the paper is organized as follow. In Section 2, we present three different schemes using fourth order Pade approximation in space direction and second order in time direction using trapezoidal and implicit mid- point rule. Also we implement the explicit fourth Runge-Kutta method to solve the first order differential system in time. In Section 3, the accuracy of the proposed schemes is given. In Section 4, the stability analysis of scheme 1 and scheme 2 are derived using von-Neumann stability analysis. In Section 5, we present various numerical tests which validate the accuracy and the efficiency of the proposed schemes. Finally, we conclude with a brief discussion in Section 6.
2. Numerical Methods
In this section, we derive a high order compact finite difference method for the initial boundary value problem (1)-(3). We first describe our solution domain and its grids. The solution domain is defined to be . Let and be uniform step sizes in the spatial and temporal directions respectively, Denote for . Let and denote respectively. The exact and the numerical solution at the grid point . Using Pade approximation, the following approximations for space derivatives are used   
and the shift operator E defined by
Now by using these approximations in KdV Equations (1)-(3), we obtain the first order differential system in time
By using (4), the system in (5) can be written as
where denotes the time derivative of U at ; and the boundary conditions
The system in (6) can be written in a matrix vector form as
where M is the penta diagonal matrix
and the elements of are
The previous differential system can be solved by
1) Trapezoidal rule
Trapezoidal method is of second order, implicit scheme, and A-stable method
2) Implicit mid-point rule
Implicit middle point rule is of second order, implicit scheme, and A-stable method.
The previous methods (Crank-Nicolson like schemes), are usually produce unconditionally stable method, nonlinear penta diagonal system to be solved at each time step. Explicit Runge-Kutta method of fourth order will be used as well, solution of four linear penta diagonal systems are needed for each time step using Crouts method, and the method is conditionally stable. The details of the proposed schemes will be discussed in the following subsections.
2.1. Scheme 1 (Trapezoidal Rule)
Trapezoidal rule method (9) which is of second order accuracy and A-stable is used to solve the ordinary differential system in (7), we assume to be the fully discrete approximation of the exact solution this will lead to the nonlinear implicit scheme
The system in (11) is a nonlinear penta-diagonal system in the unknown vector . The solution of this system can be obtained by many methods, like: Newton’s method; the Predictor-Corrector method and linearization techniques. Newton’s method will be adopted in this work.
2.2. Scheme 2 (Implicit Mid-Point Rule)
A second finite difference scheme obtained by using (10) the mid-point rule which is of second order and A-stable, using this will lead us to the nonlinear scheme of the form
The system in (10) can be given by the finite difference equation.
The system in (13) is a nonlinear penta-diagonal system which can be solved by many iterative methods, Newton’s method is used to do this job in this work.
2.3. Scheme 3 (Runge-Kutta of Order 4)
We can also solve the first order differential system (7) by using the explicit Runge -Kutta method of fourth order
The resulting system is of fourth order accuracy in both directions time and space, it is conditionally stable. In each time step, we need to solve four linear penta diagonal systems to find and . The solution of the linear penta-diagonal system can be obtained by using Crout’s method, only one LU factorization is needed at the beginning of the calculations which can be done easily.
3. Accuracy of the Proposed Schemes
To study the accuracy of Scheme 1, we replace the numerical solution by the the exact solution in (8) to get
Taylor’s expansion for all terms in (17) about grid point , the following expressions are obtained
By substituting these expressions into (17), and by collecting similar terms, we will get the local truncation error (LTE) as
The first four brackets are zero by the KdV equation, LTE will be reduced to
So, the scheme 1 is of second order in time and fourth order in space .
Similar analysis can be done for Scheme 2. Scheme 2 is also of second order in time and fourth order in space . Regarding Scheme 3, the scheme is fourth order in both directions, space and time .
4. Stability Analysis
In this section, we want study the stability of the proposed schemes . Our stability analysis is based on the von -Neumann theory in which the growth factor of atypical Fourier mode defined as
where , is real number and in general complex. To implement the Fourier stability analysis, the KdV equation needs to be linearized by assuming that in the nonlinear term u ux is locally constant. The linear version of (11) can be given as
Substituting (23) into (24), we get after some manipulation the following equation
By solving Equation (26) for , we can get
It is easy to see from (28) that, , thus we can say that scheme 1 and scheme 2 are unconditionally stable according von- Neumann stability analysis. For scheme 3 the numerical results showed that the scheme is conditionally stable (since it is explicit).
5. Numerical Results
In this part, several numerical examples are carefully designed to validate the efficiency of the proposed methods. In the physical opinion, the motion and interactions of solitons will be considered. In addition, some conservation laws that KdV equation satisfies will be examined by numerically calculating (using trapezoidal rule) the following three invariants corresponding to conservation of mass, momentum and energy as defined 
To demonstrate the efficiency and accuracy of the presented method for the KdV equation, we use the maximum error norm given by
5.1. Single Soliton
To test our numerical methods, we choose the initial condition
subject to the homogenous boundary conditions. The exact solution for this test is
In order to generate the numerical solutions, the following parameters are used
The exact values of the conserved quantities (29)-(31) using (34) are
In Table 1 and Table 2, we display the conserved quantities and the error for Scheme 1 and Scheme 2, respectively. The results show that the methods conserve the conserved quantities, with high accuracy. The simulation of the single soliton is given in Figure 1.
In Table 3, we present the results for a single solution using Scheme 3. These results are obtained by using the same previous parameters except . From the numerical results, we have noticed that the method is conserves the conserved quantities exactly with high accuracy. The motion of single soliton displayed in Figure 2.
Table 1. Scheme 1 (Single soliton).
Table 2. Scheme 2 (Single soliton).
Table 3. Scheme 3 (Single soliton).
Figure 1. The evolution of the numerical solution of scheme 1 with .
Figure 2. The evolution of the numerical solution of scheme 3 with .
5.2. Rate of Convergence
To calculate the order of the proposed numerical schemes. We define the rate of convergence (RTC) as
To calculate the rate convergence in space using (37), we choose , with different values of h. we calculate the error norm and the (RTC) for different values of h, and we displayed these results in Table 4, and fourth order convergence in space is observed.
To calculate the rate convergence in time, we choose , with different values of k. we calculate the error norm and the (RTC for different values of k, and we displayed these results in Table 5, and second order convergence in time is observed.
Table 4. Rate of convergence in space with k = 0.001, λ = 0.5.
Table 5. Rate of convergence in time with h = 0.05, λ = 0.5.
5.3. Two Solitons Interaction
As a second problem, we have discussed the behavior of the interaction of two solitary waves for Scheme (1) and (2) for different analytical solutions.
5.3.1. Sum of Two Single Solitons (a)
We choose initial condition a sum of two well separated single solitons:
and are arbitrary constants. To ensure an interaction of two solitary waves, we select the set of parameters , , , , , , . From the numerical result we have found that the two solitons recover their shapes after the interaction and the computed conserved quantities are in a very good agreement with the exact ones. See Table 6 and Table 7. For the interaction scenario, see Figure 3.
5.3.2. Exact Two Solitons Solution (b)
In this test we pick our initial condition from the exact two soliton solution   
together with the set of parameters , , , , . The error and conserved quantities presented in Table 8 and Table 9. The results are highly accurate and the values of conserved quantities are in good agreement with their analytical values. The simulation of this interaction is given in Figure 4 for . We have noticed that, the two waves collide each other and leave the interaction region without any disturbance in their identities.
Table 6. Scheme 1 (Interaction of two solitons (a)).
Table 7. Scheme 2 (Interaction of two solitons (a)).
Table 8. Scheme 1 (Interaction of two solitons (b)).
Table 9. Scheme 2 (Interaction of two solitons (b)).
Figure 3. Two solitons interaction with .
Figure 4. Numerical solution of two solitary waves for scheme 2 with .
5.3.3. Two Solitons Solution (c)
We consider also the interaction of two solitary waves using the initial condition 
where the exact solution
By using (40) and the set of parameters , , , . The errors and conserved quantities are displayed in Table 10 and Table 11. The results are highly accurate and the conserved quantities are almost constants. The interaction scenarios are displayed in Figure 5. We have noticed that the two waves interact and emerge after the interaction without any disturbance in their identities.
Using Scheme 3 with the initial condition (38) and the set of parameters
Table 10. Scheme 1 (Interaction of two solitons (c)).
Table 11. Scheme 2 (Interaction of two solitons (c)).
Table 12. Scheme 3 (Runge-Kutta of order 4).
Figure 5. Numerical solution of two solitary waves for scheme 1 with .
Figure 6. Numerical solution of two solitary waves for scheme 3 with .
5.4. Three Solitons Interaction
In this test, we want to study the interaction of three solitons having different amplitudes and traveling in the same direction. We choose the initial condition as sum of three well separated solitons of the form
subject to the homogenous boundary conditions. We have considered the Scheme 1 and Scheme 2, with parameters , , , , , , and over the interval , while we have considered Scheme 3 with the same previous parameters except . In Tables 13-15, we presented the conserved quantities for the proposed schemes. All methods showed the conservation of the conserved quantities. In Figure 7 and Figure 8, we display the interaction scenario of the three solitons. We have noticed that the three solitons recover their shapes after the interaction
5.5. Single Soliton Using Periodic Boundary Conditions
The final test in this work is to study the behavior of single soliton with periodic boundary conditions (for long time simulation) using Scheme 1. We select the set of parameters
In Table 16, we presented the error and conserved quantities. We have noticed a high accuracy and exact conservation of the conserved quantities. In Figure 9, we display the motion of the single soliton for .
The numerical schemes for the KdV equation presented using Pade approximation of fourth order accuracy in space direction and second order accuracy in time using trapezoidal and implicit middle point rule. The resulting system is a nonlinear penta diagonal system, where Newton’s method is used to find the numerical solutions. Scheme 1 and Scheme 2 are unconditionally stable, while the scheme 3 is conditionally stable with fourth order accuracy in both directions.
Table 13. Scheme 1 (Three solitons).
Table 14. Scheme 2 (Three solitons).
Table 15. Scheme 3 (Three solitons).
Table 16. Scheme 1 (Periodic boundary conditions).
Figure 7. Three solitons interaction for scheme (1) and (2) with .
Figure 8. Three solitons interaction for scheme 3 with .
Figure 9. The evolution of the numerical solution of scheme 1 with .
Different tests are used to check the accuracy and efficiency of the proposed schemes. The exact solutions and the conserved quantities are used to check the accuracy and the efficiency of the proposed schemes. The interaction of three solitons is presented. For long time simulation, periodic boundary conditions equipped with scheme 1 are presented. The numerical results keep the agreement with the physical phenomena with the proposed methods. Based on our numerical tests, we can say that the present methods give accurate numerical solutions and are useful for simulation of the conservation properties, motion of solitons, and the interactions of solitons for the KdV equation.
 Korteweg, D.J. and de Vried, G. (1895) On the Change of Form of Long Waves Advancing in a Rectangular Canal and on a New Type of Long Stationary Wave. Philosophical Magazine, 39, 422-443.
 Zabusky, N.J. and Kruskal, M.D. (1965) Interaction of Solitons in a Collisionless Plasma and the Recurrence of Initial States. Physical Review Letters, 15, 240-243.
 Wang, P.F. and Huang, P.Z. (2019) Convergence of the Crank-Nicolson Extrapolation Scheme for the Korteweg-de Vries Equation. Applied Numerical Mathematics, 141, 88-96.
 Kong, D.S., Xu, Y.F. and Zheng, Z.S. (2019) A Hybrid Numerical Method for KdV Equation by Finite Difference and Sinc Collocation Method. Applied Mathematics and Computation, 355, 61-72.
 Askan, E.N. and Ozdes, A. (2006) Numerical Solution of Korteweg-de Vries Equation by Galerkin B-Spline Finite Element Method. Applied Mathematics and Computation, 175, 1256-1265.
 Hao, S.Y. and Xie, S.S. (2012) The Galerkin Method for the KdV Equation Using a New Basis of Smooth Piecewise Cubic Polynomials. Applied Mathematics and Computation, 218, 8659-8671.
 Ma, H.P. and Sun, W.W. (2001) Optimal Error Estimates of the Legender-Petrov-Galerkin Method for the Korteweg-de Vries. SIAM Journal on Numerical Analysis, 39, 1380-1394.
 Shen, J. (2003) A New Dual-Petrov-Galerkin Method for Third and Higher Order Odd Order Differential Equation: Application to the KdV Equation. SIAM Journal on Numerical Analysis, 41, 1595-1619.
 Ismail, M.S. (2009) Numerical Solution of Complex Modified Korteweg-de Vries Equation by Collocation Method. Communications in Nonlinear Science and Numerical Simulation, 14, 749-759.
 Ismail, M.S. (2008) Numerical Solution of Complex Modified Korteweg-de Vries Equation by Petrov-Galerkin Method. Applied Mathematics and Computation, 202, 520-531.
 Irk, D., Idris, D. and Bulent, S. (2006) A Small Time Solution for the Korteweg-de Vries Equation Using Spline Approximation. Applied Mathematics and Computation, 173, 834-846.
 Shen, J., Wang, X.P. and Sun, Z.-Z. (2020) The Conservation and Convergence of Two Finite Difference Schemes for KdV Equations with Initial and Boundary Conditions. Numerical Mathematics: Theory, Methods and Applications, 13, 253-280.
 Garralon, J., Rus, F.F. and Villatoro, F.R. (2013) Numerical Interactions between Compactons and Kovatons of the Rosenau-Pikovsky K(cos) Equation. Communications in Nonlinear Science and Numerical Simulation, 18, 1576-1588.
 Mihaila, B., Cardenas, A., Cooper, F. and Saxena, A. (2010) Stability and Dynamical Properties of Rosenau-Hyman Compactons Using Padé Approximants. Physical Review E, 81, Article ID: 056708.
 Cooper, F., Hyman, J.M. and Khare, A. (2001) Compacton Solutions in a Class of Generalized Fifth-Order Korteweg-de Vries Equations. Physical Review E, 64, Article ID: 026608.
 Taha, T.R. and Ablowttz, M.J. (1984) Analytical and Numerical Aspects of Certain Nonlinear Evolution Equations III. Numerical Korteweg-de Vries Equation. Journal of Computational Physics, 15, 231-253.