Theory and Modern Applications

# A new non-polynomial spline method for solution of linear and non-linear third order dispersive equations

## Abstract

In this paper, a new three-level implicit method is developed to solve linear and non-linear third order dispersive partial differential equations. The presented method is obtained by using exponential quartic spline to approximate the spatial derivative of third order and finite difference discretization to approximate the first order spatial and temporal derivative. The developed method is tested on four examples and the results are compared with other methods from the literature, which shows the applicability and feasibility of the presented method. Furthermore, the truncation error and stability analysis of the presented method are investigated, and graphical comparison between analytical and approximate solution is also shown for each example.

## 1 Introduction

In [4] Boussinesq and Korteweg-de Vries (KdV) equations described the problem of water waves and the long waves in which dispersive effects are present. We use an exponential quartic spline function to develop a numerical method to approximate the solution of third order homogeneous and non-homogeneous linear dispersive equation in one space dimension with $$f(x,t)$$ as a source term:

$$\frac{\partial y(x,t)}{\partial t}+\mu \frac{\partial^{3} y(x,t)}{ \partial x^{3}}=f(x,t), \quad a\leq x\leq b, t>0, \mu >0,$$
(1.1)

with

$$y(x,0)=g_{1}(x), \quad a\leq x\leq b,$$
(1.2)

and

$$\left . \textstyle\begin{array}{l@{\quad}l} y(a,t)=\gamma_{0}(t), & t > 0, \\ y_{x}(a,t)=\gamma_{1}(t), & t > 0, \\ y_{xx}(a,t)=\gamma_{2}(t), & t > 0, \end{array}\displaystyle \right \}$$
(1.3)

where $$\gamma_{0}(t)$$, $$\gamma_{1}(t)$$, $$\gamma_{2}(t)$$, and $$g_{1}(x)$$ are assumed to be continuous functions, t is time and x is space variable [1, 7].

In [1] theorems for the existence and uniqueness of solution of such dispersive equations are given. In [20, 21], the criteria for deriving stability conditions of difference method were considered for the numerical solution of a third order linear dispersive equation. In [25], the analytical solution was obtained of such equations by using Adomian decomposition method, and in [19], such equations were solved numerically. The authors in [17] solved fourth order parabolic partial differential equation numerically by using parametric septic spline. Djidjeli and Twizell [7] developed numerical method for solution of third order linear dispersive equation with time-dependent boundary conditions.

We have also solved the third order non-linear dispersive equation named as Korteweg-de Vries (KdV) equation:

$$\frac{\partial y(x,t)}{\partial t}+\varepsilon y(x,t) \frac{\partial y(x,t)}{\partial x}+\mu \frac{\partial^{3} y(x,t)}{\partial x^{3}}=0, \quad a \leq x\leq b, t>0, \mu >0$$
(1.4)

with

$$y(x,0)=g_{2}(x), \quad a\leq x\leq b,$$
(1.5)

and

$$\left . \textstyle\begin{array}{l@{\quad}l} y(x,t)=\gamma_{3}(t), &x \in \partial \Omega, t > 0, \\ y_{x}(b,t)=\gamma_{4}(t),&t > 0, \end{array}\displaystyle \right \}$$
(1.6)

where $$\Omega =[a,b]\subset R$$, Îµ and Î¼ are positive parameters, and $$g_{2}(x)$$, $$\gamma_{3}(t)$$, $$\gamma_{4}(t)$$ are known functions. This equation shows both dispersion and non-linearity [4, 23, 27].

The solution of Eq.Â (1.4) may exhibit solitons. Solitons are localized waves that propagate without change in their shape and velocity and are stable in mutual interaction just like the phenomenon of totally elastic collision in kinetics. The KdV type equations have been an important class of non-linear evolution equations with numerous applications in physical sciences and engineering fields see [5, 8, 12, 18, 23, 24, 26].

The existence and uniqueness of solutions of the KdV equation for appropriate conditions have shown in [11] . Many well-known numerical methods, such as finite difference scheme, finite element schemes, Fourier spectral methods and mesh-free radial basis functions (RBF), collocation method, multiquadric (MQ), multiquadric quasi-interpolation [3, 5, 10, 13â€“15, 22, 23, 27, 28], have been used to solve the KdV equation. Authors in [16] also used decomposition method for solution of KdV equation. The numerical solution was presented in [6] for the first and fifth order KdV equations. In [2], authors solved coupled Burgersâ€™ equations using non-polynomial spline method. In [9], authors presented non-polynomial spline method for solving the generalized regularized long wave (GRLW) equations.

The purpose of this paper is to present a new method to solve third order linear and non-linear dispersive partial differential equations based on spline function approximation. In our method, the third order spatial and first order temporal derivatives are approximated by exponential quartic spline and finite difference respectively. Besides, we have used the first order central difference discretization to approximate the first order spatial derivative in a non-linear term.

Here, we obtain a derivation of exponential quartic spline and its relations in Sect.Â 2. In Sect.Â 3, we present the formulation of our methods along with boundary equations for both the linear and non-linear dispersive equations. In Sect.Â 4, a class of methods and truncation error are given. Stability analysis is discussed in Sect.Â 5. Numerical evidences and comparison with other available methods are included in Sect.Â 6 to show the accuracy of our method. The presented method is tested on four examples. Finally, conclusion is presented in Sect.Â 7.

## 2 Exponential quartic spline

Let a set of grid points in the interval $$[a,b]$$ be such that

$$x_{j}=a+jh, \quad j=0(1)n, h=\frac{b-a}{n}.$$
(2.1)

We also denote the function value $$y(x_{j})$$ by $$y_{j}$$.

Let $$E_{j}(x,t)$$ be the exponential quartic spline at the grid point $$(x_{j},t)$$ given by

$$E_{j}(x,t)=a_{1j}(t)e^{\tau (x-x_{j})}+a _{2j}(t)e^{-\tau (x-x_{j})}+a_{3j}(t) (x-x _{j})^{2}+a_{4j}(t) (x-x_{j})+a_{5j}(t)$$
(2.2)

for each $$j=0,1,\ldots, n$$, where $$a_{1j}$$, $$a_{2j}$$, $$a_{3j}$$, $$a_{4j}$$, $$a_{5j}$$ are unknown coefficients and Ï„ is a free parameter. We determine the unknown coefficients in (2.2) from the interpolatory conditions $$E _{j}(x_{j},t)=y_{j}(t)$$, $$E_{j}(x_{j+1},t)=y_{j+1}(t)$$, $$E'_{j}(x_{j},t)=m _{j}(t)$$, $$E_{j}^{(3)}(x_{j},t)=T_{j}(t)$$, and $$E_{j}^{(3)}(x_{j+1},t)=T _{j+1}(t)$$ as given below:

\begin{aligned}& a_{1j}(t) = \frac{1}{\tau^{3}}\frac{(T_{j+1}-T_{j}e ^{-\theta })}{(e^{\theta }-e^{-\theta })}, \\& a_{2j}(t) = \frac{1}{\tau^{3}}\frac{(T_{j+1}-T_{j}e^{ \theta })}{(e^{\theta }-e^{-\theta })}, \\& a_{3j}(t) = \frac{1}{h^{2}}(y_{j+1}-y_{j})- \frac{1}{h}M _{j}-\frac{1}{h^{2}}a_{1j}(t) \bigl(e^{\theta }-\theta -1 \bigr)-\frac{a _{2j}(t)}{h^{2}} \bigl(e^{-\theta }+ \theta -1 \bigr), \\& a_{4j}(t) = m_{j}-a_{1j}(t)\tau +a_{2j} (t)\tau, \\& a_{5j}(t) = y_{j}-a_{1j}(t)-a_{2j}(t). \end{aligned}
(2.3)

Applying the continuity conditions of first and second derivatives of $$E_{j}(x,t)$$ at the knots, that is, $${E^{\prime} _{j}}(x_{j})={E^{\prime}_{j-1}}(x_{j})$$, $${E^{\prime\prime}_{j}}(x_{j})={E^{\prime\prime} _{j-1}}(x_{j})$$, and using (2.3) yields the following relations:

\begin{aligned}& m_{j}+m_{j-1} = h^{2}(\alpha_{1}T_{j}+ \alpha_{1}T_{j-1})+\frac{2}{h}(y _{j}-y_{j-1}), \end{aligned}
(2.4)
\begin{aligned}& m_{j}-m_{j-1} = h^{2}(\beta_{1}T_{j+1}+ \beta_{2}T_{j}+\beta_{3}T_{j-1})+ \frac{1}{h}(y_{j+1}-2y_{j}+y_{j-1}), \end{aligned}
(2.5)

where

\begin{aligned} \begin{gathered} \alpha_{1} = \frac{\theta (e^{\theta }-e^{-\theta })-2(e^{\theta }+e^{-\theta })+4}{\theta^{3}(e^{\theta }-e^{-\theta })}, \\ \beta_{1} = \frac{\theta^{2}-(e^{\theta }+e^{-\theta })+2}{\theta^{3}(e ^{\theta }-e^{-\theta })}, \\ \beta_{2} = \frac{\theta (e^{\theta }-e^{-\theta })-\theta^{2}(e^{ \theta }+e^{-\theta })}{\theta^{3}(e^{\theta }-e^{-\theta })}, \\ \beta_{3} = \frac{\theta^{2}-\theta (e^{\theta }-e^{-\theta })+(e^{ \theta }+e^{-\theta })-2}{\theta^{3}(e^{\theta }-e^{-\theta })}. \end{gathered} \end{aligned}
(2.6)

Using Eqs.Â (2.4) and (2.5), we obtain the following method:

$$h^{3}(pT_{j+1}+qT_{j}+qT_{j-1}+pT_{j-2})=-y_{j+1}+3y_{j}-3y_{j-1}+y _{j-2}, \quad j=2(1) (n-1),$$
(2.7)

where the coefficients $$p=\beta_{1}$$ and $$q=-\alpha_{1}+\beta_{1}+ \beta_{2}$$. As $$\tau \rightarrow 0$$ that is $$\theta \rightarrow 0$$, we have $$(p,q)\longrightarrow (-\frac{1}{24},-\frac{11}{24})$$. Now, the operator $$\Lambda_{x}$$ for any function W is supposed to have the following form according to Eq.Â (2.7):

$$\Lambda_{x}W_{j}=pW_{j+1}+qW_{j}+qW_{j-1}+pW_{j-2}.$$
(2.8)

## 3 Derivation of the method

Let the region $$R=[a \leq x \leq b]\times [t>0]$$ be discretized by a set of points $$R_{h,k}$$ which are the vertices of grid points $$(x_{j},t _{m})$$, where $$x_{j}=jh$$, $$j=0(1)n$$, $$nh=b-a$$, and $$t_{m}=mk$$, $$m=0,1,2,3,\ldots$$â€‰. The quantities h in space and k in time directions are mesh sizes.

### 3.1 Spline solution for linear dispersive equation

In this section we develop an approximation for (1.1) in which the time and space derivatives are replaced by a finite difference and exponential quartic spline respectively. Equation (1.1) is discretized as:

$$\frac{k^{-1}}{2}\delta_{t} \bigl(1+\sigma \delta^{2}_{t} \bigr)^{-1}y^{m}_{j}+ \mu T^{m}_{j}=f^{m}_{j},$$
(3.1)

where $$T^{m}_{j}=E^{(3)}_{\triangle }(x_{j},t_{m})$$ is the third order spline derivative at $$(x_{j},t_{m})$$ w.r.t. the space variable, $$f^{m}_{j}=f(x_{j},t_{m})$$, $$y^{m}_{j}$$ is the approximate solution of (1.1) at $$(x_{j},t_{m})$$, $$\delta_{t}$$ is the central difference operator w.r.t. t and Ïƒ is a parameter such that finite difference approximation to the time derivative is of $$O(k)$$ for arbitraryÂ Ïƒ.

Operating $$\Lambda_{x}$$ on both sides of (3.1) and after some simplifications, we obtain the following method:

\begin{aligned}& \delta_{t} \bigl(p y^{m}_{j+1}+q y^{m}_{j}+q y^{m}_{j-1}+p y^{m}_{j-2} \bigr)+\frac{2 k \mu }{h^{3}} \bigl(1+\sigma \delta^{2}_{t} \bigr) \bigl(-y^{m}_{j+1}+3 y^{m}_{j}-3 y ^{m}_{j-1}+ y^{m}_{j-2} \bigr) \\& \quad =2 k \bigl(1+\sigma \delta^{2}_{t} \bigr) \bigl(p f^{m}_{j+1}+q f^{m}_{j}+q f^{m}_{j-1}+p f ^{m}_{j-2} \bigr),\quad j=2(1)(n-1). \end{aligned}
(3.2)

The final method (3.2) may be written in the schematic form as follows:

$\begin{array}{cccc}P& Q& R& S\\ & \\ âˆ’N& 3N& âˆ’3N& N\\ & \\ âˆ’S& âˆ’R& âˆ’Q& âˆ’P\end{array}\right\}{y}_{j}^{m}=\begin{array}{cccc}{K}_{1}p& {K}_{1}q& {K}_{1}q& {K}_{1}p\\ & \\ {K}_{2}p& {K}_{2}q& {K}_{2}q& {K}_{2}p\\ & \\ {K}_{1}p& {K}_{1}q& {K}_{1}q& {K}_{1}p\end{array}\right\}{f}_{j}^{m},$

where

$$\left . \textstyle\begin{array}{l} r=\frac{k}{h^{3}}, \quad\quad P=p-2\sigma r \mu, \quad\quad Q=q+6 \sigma r \mu, \\ R=q-6 \sigma r \mu, \quad\quad S=p+2 \sigma r \mu, \\ N=2 r \mu (1-2\sigma), \quad\quad K_{1}=2 \sigma k, \quad\quad K_{2}=2 k(1-2\sigma). \end{array}\displaystyle \right \}$$
(3.3)

Relation (3.2) gives $$(n-2)$$ equations in $$(n-1)$$ unknowns $$y_{j}$$, $$j = 1(1)(n-1)$$. We require one more equation at $$j=1$$, i.e., at the end of the range of integration in order to have a closed form solution for $$y_{j}$$. We discretize the boundary conditions in (1.3) and develop the following boundary equation of accuracy $$O(k+h^{2})$$:

$$-21 y_{0}^{m}+24 y_{1}^{m}-3 y_{2}^{m}-18 h \bigl(y_{0}^{m} \bigr)'-6 h ^{2} \bigl(y_{0}^{m} \bigr)''=0, \quad j=1,$$
(3.4)

where

$$y_{0}^{m}=y(a,t_{m}), \quad\quad \bigl(y_{0}^{m} \bigr)'=\frac{\partial y}{\partial x}(a,t _{m}),\quad\quad \bigl(y_{0}^{m} \bigr)''= \frac{\partial^{2} y}{\partial x^{2}}(a,t _{m}).$$

### 3.2 Spline solution for non-linear dispersive equation

In the similar manner, Eq.(1.4) is discretized as follows:

$$\frac{k^{-1}}{2}\delta_{t} \bigl(1+\sigma \delta^{2}_{t} \bigr)^{-1}y^{m}_{j}+\frac{ \delta_{x}}{2 h} F^{m}_{j}+\mu T^{m}_{j}=0,$$
(3.5)

where $$F=\frac{\varepsilon }{2} y^{2}$$.

Operating $$\Lambda_{x}$$ on both sides of (3.5) and after some simplifications, we obtain the following method:

\begin{aligned}& \delta_{t} \bigl(p y^{m}_{j+1}+q y^{m}_{j}+q y^{m}_{j-1}+p y^{m}_{j-2} \bigr)+\frac{2 k \mu }{h^{3}} \bigl(1+\sigma \delta^{2}_{t} \bigr) \bigl(-y^{m}_{j+1}+3 y^{m}_{j}-3 y ^{m}_{j-1}+ y^{m}_{j-2} \bigr) \\& \qquad{} +\frac{k}{h} \bigl(1+\sigma \delta^{2}_{t} \bigr) \bigl(p F^{m}_{j+2}+q F^{m}_{j+1}-(p-q) F ^{m}_{j}+(p-q) F^{m}_{j-1}-q F^{m}_{j-2}-p F^{m}_{j-3} \bigr) \\& \quad =0,\quad j=3(1)(n-2). \end{aligned}
(3.6)

The schematic form of method (3.6) is given by

$\begin{array}{c}\begin{array}{cccc}P& Q& R& S\\ & \\ âˆ’N& 3N& âˆ’3N& N\\ & \\ âˆ’S& âˆ’R& âˆ’Q& âˆ’P\end{array}\right\}{y}_{j}^{m}\hfill \\ \phantom{\rule{1em}{0ex}}=\begin{array}{cccccc}âˆ’{K}_{1}^{â€²}p& âˆ’{K}_{1}^{â€²}q& {K}_{1}^{â€²}\left(pâˆ’q\right)& âˆ’{K}_{1}^{â€²}\left(pâˆ’q\right)& {K}_{1}^{â€²}q& {K}_{1}^{â€²}p\\ & \\ âˆ’{K}_{2}^{â€²}p& âˆ’{K}_{2}^{â€²}q& {K}_{2}^{â€²}\left(pâˆ’q\right)& âˆ’{K}_{2}^{â€²}\left(pâˆ’q\right)& {K}_{2}^{â€²}q& {K}_{2}^{â€²}p\\ & \\ âˆ’{K}_{1}^{â€²}p& âˆ’{K}_{1}^{â€²}q& {K}_{1}^{â€²}\left(pâˆ’q\right)& âˆ’{K}_{1}^{â€²}\left(pâˆ’q\right)& {K}_{1}^{â€²}q& {K}_{1}^{â€²}p\end{array}\right\}{F}_{j}^{m},\hfill \end{array}$

where

$$K'_{1}= \frac{ k}{h}\sigma ,\quad\quad K'_{2}= \frac{ k}{h}(1-2\sigma ).$$
(3.7)

Relation (3.6) gives $$(n-4)$$ equations in $$(n-1)$$ unknowns $$y_{j}$$, $$j = 1(1)(n-1)$$. We require three more equations each at $$j=1 ,2 ,(n-1)$$, i.e., at the ends of the range of integration in order to have a closed form solution for $$y_{j}$$. We discretize the boundary conditions in (1.6) and develop the following boundary equation of accuracy $$O(k+h^{2})$$:

$$\left . \textstyle\begin{array}{l@{\quad}l} -y_{0}^{m}+4 y_{1}^{m}-6 y_{2}^{m}+4 y_{3}^{m}-y_{4}^{m}=0, & j=1, \\ -y_{1}^{m}+4 y_{2}^{m}-6 y_{3}^{m}+4 y_{4}^{m}-y_{5}^{m}=0, & j=2, \\ -\frac{4}{3} y_{n-3}^{m}+6 y_{n-2}^{m}-12 y_{n-1}^{m}+\frac{22}{3} y_{n}^{m}-4 h (y_{n}^{m})'=0, & j=(n-1), \end{array}\displaystyle \right \}$$
(3.8)

where

$$y_{0}^{m}=y(a,t_{m}), \quad\quad y_{n}^{m}=y(b,t_{m}),\quad\quad \bigl(y_{n}^{m} \bigr)'=\frac{ \partial y}{\partial x}(b,t_{m}).$$

## 4 Truncation error and a class of methods

Expanding (3.2) or (3.6) in a Taylor series in terms of $$y(x_{j},t _{m})$$ and its derivatives and using (1.1) or (1.4) respectively, we obtain the truncation error as follows:

\begin{aligned} \mathit{TE} ^{m}_{j} =& \biggl[2(p+q)k D_{t}-(p+q)k h D_{t} D_{x}+ \frac{1}{2}(5p+q)k h^{2} D_{t} D^{2}_{x} \\ & {} -\frac{1}{6}(7p+q)k h^{3} D_{t} D^{3}_{x}+ \biggl(\frac{1}{3}- \sigma \biggr)2(p+q)k^{3} D^{3}_{t}- \biggl( \frac{1}{3}-\sigma \biggr) (p+q)k^{3} h D^{3}_{t} D_{x} \\ & {} +\frac{1}{2} \biggl(\frac{1}{3}-\sigma \biggr) (5p+q)k^{3} h^{2} D ^{3}_{t} D^{2}_{x}-\frac{1}{6} \biggl(\frac{1}{3}- \sigma \biggr) (7p+q)k ^{3} h^{3} D^{3}_{t} D^{3}_{x} \\ & {} -2(p+q)k D^{3}_{x}+(p+q)k h D^{4}_{x}+ \frac{1}{2}(5p+q)k h^{2} D^{5}_{x}+ \frac{1}{6}(7p+q)k h^{3} D^{6}_{x} \\ & {} -2(p+q)\sigma k^{3} D^{2}_{t} D^{3}_{x}+(p+q)\sigma k^{3} h D ^{2}_{t} D^{4}_{x}- \frac{1}{2}(5p+q)\sigma k^{3} h^{2} D^{2}_{t} D ^{5}_{x} \\ & {} +\frac{1}{6}(7p+q)\sigma k^{3} h^{3} D^{2}_{t} D^{6}_{x}-k h ^{2} D^{3}_{x}+\frac{1}{2}k h^{3} D^{4}_{x}-\sigma k^{3} h^{2} D ^{2}_{t} D^{3}_{x} \\ & {} +\frac{1}{2}\sigma k^{3} h^{3} D^{2}_{t} D^{4}_{x}+\cdots \cdots \biggr]y^{m}_{j}, \end{aligned}

where $$D_{t}\equiv \frac{\partial }{\partial t}$$, $$D_{x}\equiv \frac{ \partial }{\partial x}$$, $$D^{2}_{t}\equiv \frac{\partial^{2}}{\partial t^{2}}$$, $$D^{2}_{x}\equiv \frac{\partial^{2}}{\partial x^{2}}$$, and so on.

Here, the following class of methods are obtained:

Case 1: :

If $$p+q \neq 0$$, then various methods of $$O(k+h)$$ for arbitrary values ofÂ Ïƒ are obtained.

Case 2: :

If $$p+q = 0$$, then various methods of $$O(k+h^{2})$$ for arbitrary values ofÂ Ïƒ are obtained.

## 5 Stability analysis and convergence

### Theorem

Methods (3.3) and (3.7) are conditionally stable for $$\sigma \geq (\frac{1}{2}-\frac{1}{2r})$$, where $$r>0$$, $$p+q=0$$, and $$\phi =\frac{\theta }{2}$$.

### Proof

Here the stability analysis of any one of methods (3.3) or (3.7) will be investigated, and it can be investigated for other method in the same manner. For this, we use the Von Neumann method. Let the solution of (3.3) at the point $$(x_{j},t_{m})$$ is

$$y^{m}_{j}=\xi^{m}e^{ji\theta },$$
(5.1)

where $$i=\sqrt{-1}$$, Î¸ is real and Î¾ in general is complex.

We get the following equation after putting (5.1) in the homogeneous part of (3.3):

$$U\xi^{2}+V\xi +W=0,$$
(5.2)

where

\begin{aligned}& U=P e^{i \theta }+Q + R e^{-i \theta }+ S e^{-2 i \theta }, \\& V=N \bigl(e^{i \theta }+3 -3 e^{-i \theta }+ e^{-2 i \theta } \bigr), \\& W=- \bigl(S e^{i \theta }+R + Q e^{-i \theta }+ P e^{-2 i \theta } \bigr). \end{aligned}

The necessary and sufficient condition for method (3.3) to be stable is $$\vert \xi \vert \leq 1$$. For this, we obtain the following condition:

\begin{aligned}& {\bigl(4 N \sin^{3}\phi \bigr)} / \bigl((p+q)^{2}-4\bigl(10pq+9p^{2}+q^{2}+12 \sigma^{2}r^{2}\bigr)\sin^{2}\phi \\& \quad{} +16\bigl(4p^{2}+2(3p-q)\sigma r+8\sigma^{2} r ^{2}\bigr)\sin^{4}\phi \\& \quad{}-32\bigl(pq-p^{2}-(3p-q)\sigma r -2\sigma^{2} r^{2}\bigr)\sin ^{6}\phi \bigr)^{1/2}\leq 1. \end{aligned}

Simplifying and putting $$p+q=0$$, we deduce that method (3.3) is conditionally stable for $$\sigma \geq (\frac{1}{2}-\frac{1}{2r})$$, where $$r>0$$ and $$\phi =\frac{\theta }{2}$$.â€ƒâ–¡

The present method is convergent by Lax theorem as the stability criterion is satisfied.

## 6 Numerical simulation and comparison

In this section, the presented three-level implicit method based on exponential quartic spline is tested on four examples. The following norms are used in this paper:

\begin{aligned}& \begin{gathered} L_{\infty } = \max_{1\leq i \leq n} \bigl\vert y_{\mathrm {ana}}(i)-y_{\mathrm {app}}(i) \bigr\vert , \\ L_{2} = \sqrt{\sum_{i=1}^{n} \bigl(y_{\mathrm {ana}}(i)-y_{\mathrm {app}}(i) \bigr)^{2}}, \\ \mathit {RMS}= \sqrt{ \Biggl( \sum_{i=1}^{n} \bigl(y_{\mathrm {ana}}(i)-y_{\mathrm {app}}(i) \bigr)^{2} \Biggr) \Big/n}, \end{gathered} \end{aligned}
(6.1)

where $$y_{\mathrm {ana}}$$ is analytical and $$y_{\mathrm {app}}$$ is approximate solution of third order dispersive equation for our method.

### Example 1

(Linear homogeneous case)

Consider the following linear homogeneous dispersive equation [7]

$$\frac{\partial y}{\partial t}+\mu \frac{\partial^{3} y}{\partial x ^{3}}=0, \quad 0\leq x \leq 1, t\geq 0, \mu >0$$

with

$$y(x,0)=\cos x,\quad 0 \leq x \leq 1$$

and

$$y(0,t)=\cos \mu t, \quad\quad \frac{\partial y}{\partial x}(0,t)=-\sin \mu t, \quad\quad \frac{ \partial^{2} y}{\partial x^{2}}(0,t)=- \cos \mu t, \quad t\geq 0.$$

The analytical solution is

$$y(x,t)=\cos (x+\mu t).$$

The computational results of this example for $$\mu =1$$ are tabulated in TablesÂ 1 and 2. TableÂ 1 shows $$L_{\infty }$$, $$L_{2}$$ and RMS errors for $$h=\frac{1}{20}$$, $$\frac{1}{40}$$; $$r=\frac{1}{100}$$, $$\sqrt{\frac{7}{60}}$$; $$\sigma =\frac{1}{12}$$ and time stepsÂ = 50, 100 for different values of parameters p andÂ q. The comparison of $$L_{\infty }$$ error between our method and in [7] with $$p=30,75$$; $$r=1$$; $$h=0.1$$; $$\sigma =\frac{1}{12}$$; time stepsÂ = 100 for $$x=0.1,0.2,\ldots, 0.9$$ is tabulated in TableÂ 2. Also the comparison between analytical and approximate solution for $$h= \frac{1}{32}$$, $$r=\frac{1}{\sqrt{6}}$$, and time stepsÂ = 100 is shown graphically in Fig.Â 1.

### Example 2

(Linear non-homogeneous case)

Consider the following linear non-homogeneous dispersive equation [25]

$$\frac{\partial y}{\partial t}+\mu \frac{\partial^{3} y}{\partial x ^{3}}= -\pi^{3} \cos (\pi x) \cos t-\sin (\pi x)\sin t, \quad 0\leq x \leq 1, t\geq 0, \mu >0$$

with

$$y(x,0)=\sin (\pi x), \quad 0\leq x \leq 1$$

and

$$y(0,t)=0, \quad\quad \frac{\partial y}{\partial x}(0,t)=\pi \cos t, \quad\quad \frac{ \partial^{2} y}{\partial x^{2}}(0,t)=0, \quad t\geq 0.$$

The analytical solution is

$$y(x,t)=\sin (\pi x)\cos t.$$

The computational results of this example for $$\mu =1$$ are tabulated in TablesÂ 3 and 4. The $$L_{\infty }$$, $$L_{2}$$ and RMS errors are tabulated in TableÂ 3 for the same values of parameters as taken in TableÂ 1 of ExampleÂ 1. Also TableÂ 4 shows $$L_{\infty }$$ error with $$p=25,50$$; $$r=1$$; $$h=0.05,0.1$$; $$\sigma =\frac{1}{12}$$; time stepsÂ = 100 for $$x=0.1,0.3,0.5,0.7,0.9$$. FigureÂ 2 shows the graphical comparison between analytical and approximate solution for $$h=\frac{1}{64}$$, $$r=\frac{1}{100}$$ and time stepsÂ = 100.

### Example 3

(Non-linear single soliton case)

Consider a propagation of single solitary wave of non-linear KdV Eq.Â (1.4) with $$\varepsilon = 6$$, $$\mu =1$$ [5, 15, 23, 27] and

$$y(x,0)=\frac{\kappa }{2} \sec h^{2} \biggl( \frac{\sqrt{\kappa }}{2} x-L \biggr) , \quad a\leq x \leq b.$$

The analytical solution is

$$y(x,t)=\frac{\kappa }{2} \sec h^{2} \biggl( \frac{\sqrt{\kappa }}{2} (x- \kappa t)-L \biggr) .$$

The functions $$\gamma_{3}(t)$$ and $$\gamma_{4}(t)$$ are extracted from the analytical solution. The computational results are tabulated in TablesÂ 5â€“7. The $$L_{\infty }$$, $$L _{2}$$ and RMS errors with $$L=7$$; $$\kappa =0.5$$; $$[a,b]=[0,40]$$; $$p=25$$; $$k=0.001,0.0001$$; $$n=40,80,120,160,200$$; $$\sigma =\frac{1}{12}$$ and $$t=1$$, and the comparison of $$L_{\infty }$$ error with [15, 23, 27] with changes $$p=30$$; $$k=0.01,0.001$$; $$n=200$$; $$t=1,2,\ldots,5$$ are tabulated in TableÂ 5 and TableÂ 6, respectively. TableÂ 7 shows $$L_{\infty }$$, $$L_{2}$$ and RMS errors and comparison with [5] with $$L=10$$; $$\kappa =0.14$$; $$[a,b]=[30,80]$$; $$p=100$$; $$k=0.001$$; $$h=0.2$$; $$\sigma =\frac{1}{12}$$ and $$t=1,3,5,7,10$$. FigureÂ 3 shows the graphical comparison between analytical and approximate solution for $$n=200$$, $$k=0.001$$, $$p=25$$, and $${t=5}$$.

### Example 4

(Non-linear soliton interaction case)

Consider a propagation of two solitary waves of non-linear KdV Eq.Â (1.4) with $$\varepsilon = 6$$, $$\mu =1$$ [5, 15, 23, 27] and

$$y(x,0)=12 \biggl[ \frac{3+4 \cos h(2x)+\cos h(4x)}{\{3 \cos h(x)+\cos h(3x) \}^{2}} \biggr] , \quad -5\leq x \leq 15.$$

The analytical solution is

$$y(x,t)=12 \biggl[ \frac{3+4 \cos h(2x-8t)+\cos h(4x-64t)}{\{3 \cos h(x-28t)+ \cos h(3x-36t)\}^{2}} \biggr] .$$

Similarly, the functions $$\gamma_{3}(t)$$ and $$\gamma_{4}(t)$$ are extracted from the analytical solution. The computational results are tabulated in TablesÂ 8â€“10. TableÂ 8 and TableÂ 9 show the comparison of $$L_{\infty }$$, $$L_{2}$$ and RMS errors with [5, 15, 23, 27] with $$p=10$$; $$k=0.0001,0.00001$$; $$n=200$$; $$\sigma = \frac{1}{12}$$ and $$t=0.01,0.05,0.10,0.15,0.20,0.3$$. Also, the $$L_{\infty }$$, $$L_{2}$$ and RMS errors with $$p=100$$; $$k=0.0001$$; $$n=40,80,120,160,200$$; $$\sigma =\frac{1}{12}$$ and $$t=1$$ are tabulated in TableÂ 10. FigureÂ 4 shows the graphical comparison between analytical and approximate solution for $$n=200$$, $$k=0.0001$$, $$p=25$$, and $${t=3}$$.

## 7 Conclusion

The class of a new three-level implicit methods has been obtained using exponential quartic spline for numerical approximation of third order linear and non-linear dispersive partial differential equations and is tested on four examples using MATLAB. The performance of these methods have been examined for different values of parameters. Having compared the solutions with available results in the literature, we found them to be better. The comparison between analytical and approximate solutions is also shown graphically in Figs.Â 1â€“4. Tables and figures show the feasibility and applicability of our method.

## References

1. Agarwal, R.P.: Boundary Value Problems for Higher Ordinary Differential Equations. World Scientific, Singapore (1986)

2. Ali, K.K., Raslan, K.R., El-Danaf, T.S.: Non-polynomial spline method for solving coupled Burgersâ€™ equations. Comput. Methods Differ. Equ. 3(3), 218â€“230 (2015)

3. Carey, G.F., Shen, Y.: Approximation of the KdV equation by least squares finite element. Comput. Methods Appl. Mech. Eng. 93, 1â€“11 (1991)

4. Craig, W., Goodman, J.: Linear dispersive equations of airy types. J.Â Differ. Equ. 87, 38â€“61 (1990)

5. Dehgan, M., Shokri, A.: AÂ numerical method for KdV equation using collation and radial basis functions. Nonlinear Dyn. 50, 111â€“120 (2007)

6. Djidjeli, K., Price, W.G., Twizell, E.H., Wang, Y.: Numerical methods for the solution of the third and fifth order dispersive Korteweg-de Vries equation. J.Â Comput. Appl. Math. 58, 307â€“336 (1995)

7. Djidjeli, K., Twizell, E.H.: Global extrapolations of numerical methods for solving a third order dispersive partial differential equation. Int. J. Comput. Math. 41, 81â€“89 (1999)

8. Dodd, R.K., Eilbeck, J.C., Gibbon, J.D., Morris, H.C.: Solitons and Nonlinear Wave Equations. Academic Press, New York (1982)

9. El-Danaf, T.S., Raslan, K.R., Ali, K.K.: Non-polynomial spline method for solving the generalized regularized long wave equation. Commun. Math. Model. Appl. 2(2), 1â€“17 (2017)

10. Feng, B.F., Mitsui, T.: AÂ finite difference method for the Korteweg-de Vries and the Kadomtsevâ€“Petiashvili equation. J.Â Comput. Appl. Math. 90, 95â€“116 (1998)

11. Gardner, C.S., Grrne, M.J., Kruskal, M.D.: Method for solving Korteweg-de Vries equation. Phys. Rev. Lett. 19, 1095â€“1097 (1967)

12. Gardner, C.S., Marikawa, G.K.: The effect of temperature of the width of a small amplitude solitary wave in a collision free plasma. Commun. Pure Appl. Math. 18, 35â€“49 (1965)

13. Geyikli, T., Kaya, D.: An application for modified KdV equation by the decomposition method and finite element method. Appl. Math. Comput. 69(2), 971â€“981 (2005)

14. Helal, A.M., Mehanna, M.S.: AÂ comparison between two different methods for solving KdVâ€“Burgers equation. Chaos Solitons Fractals 28(2), 320â€“326 (2006)

15. Islam, S., Khattak, A.J., Tirmizi, I.A.: AÂ meshfree method for numerical solution of KdV equation. Eng. Anal. Bound. Elem. 32, 849â€“855 (2008)

16. Kaya, D.: On the solution of a Korteweg-de Vries like equation by the decomposition method. Int. J. Comput. Math. 72, 531â€“539 (1999)

17. Khan, A., Sultana, T.: Numerical solution of fourth order parabolic partial differential equation using parametric septic spline. Hacet. J. Math. Stat. 45(4), 1067â€“1082 (2016)

18. Korteweg-de Vries, D.J., de Vries, G.: On the change in form of long waves advancing in rectangular canal and on a new type of long stationary waves. Philos. Mag. 39, 422â€“443 (1895)

19. Mechee, M., Ismail, F., Hussain, Z.M., Siri, Z.: Direct numerical methods for solving a class of third order partial differential equations. Appl. Math. Comput. 247, 663â€“674 (2014)

20. Mengzhao, Q.: Difference scheme for the dispersive equation. Computing 31, 261â€“267 (1983)

21. Miller, J.H.: On the location of zeros of certain classes of polynomials with application to numerical analysis. J.Â Inst. Math. Appl. 8, 397â€“406 (1971)

22. Refik, B.A.: Exponential finite-difference method applied to Korteweg-de Vries for small times. Appl. Math. Comput. 160, 675â€“682 (2005)

23. Sarboland, M., Aminataei, A.: On the numerical solution of nonlinear Korteweg-de Vries equation. Syst. Sci. Control Eng. 3, 69â€“80 (2015)

24. Washimi, H., Taniuti, T.: Propagation of ion acoustic solitary waves of small amplitude. Phys. Rev. Lett. 17, 996â€“998 (1966)

25. Wazwaz, A.M.: An analytic study on the third order dispersive partial differential equations. Appl. Math. Comput. 142, 511â€“520 (2003)

26. Wijngaarden, L.V.: On the equation of motion for mixtures of liquid and gas bubbles. J.Â Fluid Mech. 33, 465â€“474 (1968)

27. Xiao, M.L., Wang, R.H., Zhu, C.H.: Applying multiquadric quasi-interpolation to solve KdV equation. J.Â Math. Res. Exposition 31, 191â€“201 (2011)

28. Yan, Z.: New compacton-like and solitary patterns-like solutions to nonlinear wave equations with linear dispersion terms. Nonlinear Anal. 64(5), 901â€“909 (2006)

## Funding

Jamia Millia Islamia, New Delhi, India.

## Author information

Authors

### Contributions

All authors drafted the manuscript, and they read and approved the final version.

## Ethics declarations

### Competing interests

The authors declare that they have no competing interests.

### Publisherâ€™s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and permissions

Sultana, T., Khan, A. & Khandelwal, P. A new non-polynomial spline method for solution of linear and non-linear third order dispersive equations. Adv Differ Equ 2018, 316 (2018). https://doi.org/10.1186/s13662-018-1763-z