The field of nonlinear dispersive waves has undergone enormous development since the work of Stokes, Boussinesq, and Korteweg and de Vries (KdV)—all of whom studied water wave problems in the nineteenth century. In the 1960s, researchers developed effective asymptotic methods for deriving nonlinear wave equations, such as the KdV equation, which governed a broad class of physical phenomena . Some approaches for solving nonlinear partial differential equations have been addressed in recent literature; the most prominent of these were the non-polynomial spline methods. The non-polynomial spline used for solving nonlinear partial differential equations was employed by many researchers. The most known and well-focused results are those presented by Ramadan et al. (2005), who used a numerical method for approximation of Burger’s equation . Shock waves and blowup arising in third-order nonlinear dispersive equations were studied in 2008 by Galaktionov, V.A. and Pohozaev, S.I. . In  , the criteria for deriving stability conditions of the different methods were considered for the numerical solution of a third-order linear dispersive equation. Research by Tirmizi et al. (2008) used Quartic non-polynomial spline functions to develop a class of numerical methods for solving self-adjoint singularly perturbed problems . In 2011, Taiwo and Ogunlaran developed a numerical technique for solving linear fourth-order boundary-value problems, which were initially reduced to a system of second-order boundary-value problems . In research by Lin (2014), a numerical method based on splines in tension was developed for solving the RLW equation. The method was tested by using single solitary waves, the interaction of two solitary waves, and solitary waves with Maxwellian initial condition . In the same year, Mustafa and Ilhame discussed the method of lines is applied to the boundary-value problem for the third-order partial differential equation . In 2017, El-Danaf et al. considered the Generalised Regularised Long Wave (GRLW) equation. They studied the interaction of solitons, where no analytic solution is known during the interaction. The Maxwellian initial condition for the GRLW equation was used . A year later, Li et al. solved the time-fractional nonlinear Schrödinger equation . In 2018, Sultana et al. presented a new three-level implicit method, which was developed to solve linear and nonlinear third-order dispersive partial differential equations . In 2019, Shahna demonstrated how to solve fourth-order boundary value problems whose highest-order derivative was multiplied by a small perturbation parameter . In this paper, a novel approach, based on using non-polynomial splines to solve a third-order dispersive partial differential equation is proposed. The third-order dispersive partial differential equation we will use is .
where is a source term. The boundary conditions associated with Equation (1) are assumed to be of the form:
and the initial condition is:
The spline functions proposed, as defined in , have the form where is the frequency of the trigonometric part of the spline functions, which will be used to increase the accuracy of our method.
2. Analysis of the Method
The first step in the non-polynomial spline method is to create a grid with two mesh constants h and k. The grid points for this situation are where , and , .
Let be an approximation to , obtained by the segment of the mixed spline function passing through the points and .
Each segment has the form:
for each . To obtain expressions for the coefficients of Equation (4) in terms of , , , , and , we first define:
Using Equations (4) and (5), we get:
where , and .
By solving the last five equations in (6), we obtain the following:
Using the continuity condition of the first and second derivatives at , that is where n = 1 and 2, we get the following relations:
Using expressions in Equation (7), then Equation (8) becomes:
Adding Equations (8) and (10), we get:
Using and in Equations (10) and (11) gives the following relation:
This equation can be rewritten in the following simple form:
Remark 1. As , that is , then , and system (13) reduces to ordinary quartic spline:
Using Equation (1), we can write , , and , in the form:
These equations can be discretised in the form:
The use of Equation (13) in Equation (14) gives us the following system:
, , ,
System (15) consists of N-1 equations in unknowns . To get a solution to this system, we need three additional equations. Two equations are obtained from the first two parts in Equation (2).
The third equation can be obtained from the third part of Equation (2), that is , which can be discretised:
Writing Equations (15) - (17) in matrix form gives:
and . The initial condition , for each , implies that , for each . These values can be used in Equation (2.15) to find the value of , for each . If the procedure is reapplied once all the approximations are known, the values of can be obtained in a similar manner.
3. Error Analysis
Using Equation (14), we obtain the truncation error:
, , ,
Expanding Equation (19) in Taylor series, in terms of and its derivatives, we obtain the following expression:
where . After simple calculations, we get:
For , the local truncation error is of order but for and it is of .
Remark 2. The previous relations, which enable us to choose and , can be obtained using simple calculations by expanding Equation (19) in terms of and its derivatives, which is the local truncation error of Equation (19), as follows:
Using the Von Neumann method, the stability of the method can be investigated. According to this method, the solution of the difference Equation (14) can be written in the form:
where is the wave number, , h is the element size, and is the amplification factor at time level j. Inserting the latter expression for in scheme (14), we obtain the characteristic equation in the form:
, , ,
After simple calculations, we obtain:
Using Euler’s formula, that is:
Equation (22) becomes:
Using , and , we can write the equations in (24) as:
where , ,
Using (24), we obtain:
The equations in (26) enable us to rewrite the last equation in the form:
where . Using Equation (27), becomes:
This result enables us to write Equation (27) as:
For stability, we must have (otherwise in Equation (21) would grow in an unbounded manner). Using Equation (28), we can say that the stability condition, that is , is satisfied.
5. Numerical Example
In this section, we obtain numerical solutions of Equation (1) for a numerical example.
Consider the non-homogeneous third-order dispersive partial differential equation :
with boundary conditions:
and the initial condition:
The exact solution of this problem is:
The obtained numerical results are listed in the Tables 1-7, where all calculations are carried out using Mathematica. The accuracy of method is measured by computing L∞-error norm, Max. Absolute error, as shown in Tables 1-3 and Table 5 illustrates numerical and exact solutions for: .
The reason that the accuracy in Table 1 is the best is because: .
Table 1. The -error between the numerical and exact solutions when , , , .
Table 2. The -error between the numerical and exact solutions when , , , .
Table 3. The -error between the numerical and exact solutions when , , , .
Table 4. The comperasion between the numerical and exact solutions when , , , , .
Table 5. The -error between the numerical and exact solutions when , , , .
Table 6. The comperasion between the numerical and exact solutions when , , , , .
For, the local truncation error is of order but for: it is of order .
The following figures from Figures 1-11 show the relation between the numerical and exact solutions of the dispersive equation for virus time and discretization’s (h).
The following figures from Figures 12-15 show the 3D of the numerical solutions of the dispersive equation for virus time and the same discretization’s (h).
Table 7. The -error between the numerical and exact solutions when , , , .
Figure 1. The relation between the numerical and exact solutions of the dispersive equation at .
Figure 2. The relation between the numerical and exact solutions of the dispersive equation at .
Figure 3. The relation between the numerical and exact solutions of the dispersive equation at .
Figure 4. The relation between the numerical and exact solutions of the dispersive equation at .
Figure 5. The relation between the numerical and exact solutions of the dispersive equation at .
Figure 6. The relation between the numerical and exact solutions of the dispersive equation at .
Figure 7. The relation between the numerical and exact solutions of the dispersive eation at .
Figure 8. The relation between the numerical and exact solutions of the dispersive equation at .
Figure 9. The relation between the numerical and exact solutions of the dispersive equation at .
Figure 10. The relation between the numerical and exact solutions of the dispersive equation at .
Figure 11. The relation between the numerical and exact solutions of the dispersive equation at .
Figure 12. 3D for the numerical solutions of the dispersive equation fromt = 0 to t= 10.
Figure 13. 3D for the numerical solutions of the dispersive equation from t = 10 to t = 20.
Figure 14. The 3D for the numerical solutions of the dispersive equation from t = 20 tot = 30.
Figure 15. The 3D for the numerical solutions of the dispersive equation from t = 30 to t= 40.
6. Concluding Remarks
This paper is devoted to the quartic non-polynomial spline functions for solving the third-order dispersive partial differential equation. Recent trends in computational mathematics, mathematical physics and mechanics have widely used numerical methods to solve such problems. The results obtained using the quartic non-polynomial spline functions are very encouraging. It has been shown that the L-∞ errors norm confirm the theoretical convergence. The convergence analysis of the method proved that our scheme is third-order convergent . Also, the method is shown to be unconditionally stable. The numerical example illustrates that the non-polynomial spline functions are more adaptable in approximating functions. The graphs between exact and approximate solutions for the numerical examples show the superiority of our method compared with .
 Ramadan, M.A., El-Danaf, T.S. and. Alaal, F.E.I.A. (2007) Application of the Non-Polynomial Spline Approach to the Solution of the Burgers Equation. The Open Applied Mathematics Journal, 1, 15-20.
 Galaktionov, V.A. and Pohozaev, S.I. (2008) Third-Order Nonlinear Dispersive Equations: Shocks, Rarefaction, and Blowup Waves. Computational Mathematics and Mathematical Physics, 48, 1784-1810.
 Miller, J.H. (1971) On the Location of Zeros of Certain Classes of Polynomials with Application to Numerical Analysis. IMA Journal of Applied Mathematics, 8, 397-406.
 Tirmizi, I.A., Fazal-i-Haq, and Siraj-ul-Islam (2008) Non-Polynomial Spline Solution of Singularly Perturbed Boundary-Value Problems. Applied Mathematics and Computation, 196, 6-16.
 Lin, B. (2015) Non-Polynomial Splines Method for Numerical Solutions of the Regularized Long Wave Equation. International Journal of Computer Mathematics, 92, 1591-1607.
 El-Danaf, T.S., Raslan, K.R. and Ali, K.K. (2017) Non-Polynomial Spline Method for Solving the Generalized Regularized Long Wave Equation. Communication in Mathematical Modeling and Applications, 2, 1-17.
 Li, M., Ding, X. and Xu, Q. (2018) Non-Polynomial Spline Method for the Time-Fractional Nonlinear Schrödinger Equation. Advances in Difference Equations, 2018, Article No. 318.
 Sultana, T., Khan, A. and Khandelwal, P. (2018) A New Non-Polynomial Spline Method for Solution of Linear and Non-Linear Third Order Dispersive Equations. Advances in Difference Equations, 2018, Article No. 316.
 Khan, A. and Shahna (2019) Non-Polynomial Quadratic Spline Method for Solving Fourth Order Singularly Perturbed Boundary Value Problems. Journal of King Saud University—Science, 31, 479-484.
 Wazwaz, A.M. (2003) An Analytic Study on the Third-Order Dispersive Partial Differential Equations. Applied Mathematics and Computation, 142, 511-520.
 Siraj-Ul-Islam, Khan, M.A., Tirmizi, I.A. and Twizell, E.H. (2005) Non-Polynomial Spline Approach to the Solution of a System of Third-Order Boundary-Value Problems. Applied Mathematics and Computation, 168, 152-163.