1 Introduction

Many complex physical phenomena can be depicted by nonlinear partial differential equations, one of the famous types being of the form

$$\begin{aligned} (1-\partial _{z}^{2})w_{t}=\phi (w,w_z,w_{zz},w_{zzz}),~a<z<b,~t>0, \end{aligned}$$
(1)

where \(\phi \) is a multivariate polynomial function. Some prominent high-order nonlinear dispersive partial differential equations (PDEs) of the form (1) are the Camassa-Holm (CH) equation and the Degasperis-Procesi (DP) equation, which have many real-life applications. The CH equation describes the propagation of shallow water waves, where w(zt) represents the propagation of waves at the free surface of water (Camassa and Holm 1993) and the propagation of nonlinear waves in cylindrical hyper-elastic rods (Dai 1998). The Camassa-Holm equation and its modified form are given respectively by

$$\begin{aligned}{} & {} w_{t}-w_{zzt}+3ww_{z}-2w_{z}w_{zz}-ww_{zzz}=0, ~a<z<b,~t>0, \end{aligned}$$
(2)
$$\begin{aligned}{} & {} w_{t}-w_{zzt}+3w^2w_{z}-2w_{z}w_{zz}-ww_{zzz}=0, ~a<z<b,~t>0, \end{aligned}$$
(3)

with initial and boundary conditions

$$\begin{aligned} w(z,0)=&w_0,\nonumber \\ w(a,t)=f_1(t),~&w(b,t)=f_2(t). \end{aligned}$$
(4)

Another celebrated equation of type (1) is the Degasperis-Procesi (DP) equation, which models nonlinear dynamic propagation of shallow waters (Coclite and Karlsen 2006). The DP equation and its modified form are given as follows

$$\begin{aligned}{} & {} w_{t}-w_{zzt}+4ww_{z}-3w_{z}w_{zz}-ww_{zzz}=0, ~a<z<b,~t>0, \end{aligned}$$
(5)
$$\begin{aligned}{} & {} w_{t}-w_{zzt}+4w^2w_{z}-3w_{z}w_{zz}-ww_{zzz}=0, ~a<z<b,~t>0. \end{aligned}$$
(6)

There is a need for an accurate numerical scheme to solve the CH equation and the DP equation since there is a lack of smoothness in the solutions and also the presence of the non-linear term containing the third order derivative, \(ww_{zzz}\), requires a good approximation. Several numerical methods have been applied to the CH and DP equations, such as the Galerkin method, finite difference, quartic B-spline collocation, quasi-interpolation, meshfree methods, Jacobi wavelet method, and many others (Çelik 2022; Cheng and Wei 2013; Ganji et al. 2008; Hejazi and Mohammadi 2022; Jan et al. 2022; Shaheen et al. 2022; Wasim et al. 2018; Yıldırım 2010; Zhang et al. 2008).

Of particular importance, Bellman et al. (1972) introduced the differential quadrature method (DQM) in 1972. Later, Quan and Chang (1989a, 1989b) contributed to facilitate the calculation of the weighting coefficients, and Shu and Richards (1992) gave the recurrence formula to find those weighting coefficients for the approximation of higher order derivatives. To enhance the DQM, many test functions like Lagrange polynomials, Legendre polynomials, B-splines, and others have been used. B-splines are one of the celebrated basis as it has shape preserving properties and a uniform mathematical representation. Nevertheless, it has certain limitations (Mainar et al. 2001). Polynomial B-splines might not perfectly preserve the shape of the original data, especially when fitting curves to noisy or irregular data. While higher-degree polynomials can provide smoother curves, they also come with computational challenges, such as increased numerical instability and higher computational complexity for both evaluation and manipulation. So, many alternatives to B-splines exist by adding trigonometric functions, exponential functions, and polynomials. A unified form of splines that includes all such splines over a common space has been introduced, named as unified extended splines (UE-splines) (Wang 2008) that inherited desirable properties of polynomial B-splines. Further, choosing certain value of a tension parameter in UE-splines, uniform algebraic trigonometric (UAT) tension B-splines have been used (Alinia and Zarebnia 2019, 2018). DQM based on UAT-tension B-splines has been implemented recently for solving a system of coupled Burger’s equations (Kapoor and Joshi 2021). In this work, we will implement a DQM based on UAT-tension B-splines of order four to transform the considered partial differential equation (PDE) into a system of ordinary differential equations (ODEs).

Several methods, including finite difference schemes and multi-stage ones like Strong Stability Preserving Runge–Kutta methods, may be used for solving initial-value problems. A key drawback in these approaches is the requirement for small grid sizes to obtain acceptable accuracy and stability. These limitations can be overcome by using hybrid block approaches. Data evaluation in hybrid techniques occurs at off-step nodes, which usually leads to zero-stability. Hybrid block methods can also change the step size during simulation and overcome the Dahlquist barrier (Dahlquist 1956). As a result, these methods are more affordable (Ramos and Popescu 2018; Singla et al. 2022) and capable of handling complex systems of equations (Singh et al. 2019). Hybrid block approaches have been used recently (Ramos et al. 2022; Kaur and Kanwar 2022) to solve parabolic PDEs. In this study, we use an efficient one-step hybrid block technique to solve the resulting system of ordinary differential equations (ODEs).

2 Description of the numerical method

The differential quadrature method (DQM) is seen as a potential alternative to other numerical schemes like finite differences, collocation, or the finite element method. The efficiency of the DQM largely depends on the choice of trial functions. In this paper, a uniform algebraic trigonometric (UAT) tension B-spline base has been used. The choice is made because of the desirable inherited properties of polynomial splines as well as those of trigonometric splines.

2.1 UAT-Tension B-spline

Consider a uniform grid on the spatial variable, with \(N+1\) nodes given by \(a=z_0<z_1<z_2<\dots <z_N=b\). Let \(h=z_{i+1}-z_i,~i=0,1,\dots ,N-1\), be the step size. According to Wang (2008), the UE-splines of order 2 are defined as follows

$$\begin{aligned} {\mathbb {B}}_{l,2}(z)= {\left\{ \begin{array}{ll} \frac{\sin [\tau (z-z_{l-2})]}{\sin [\tau (z_{l-1}-z_{l-2})]}&{}z\in [z_{l-2},z_{l-1}),\\ \frac{\sin [\tau (z_{l}-z)]}{\sin [\tau (z_{l}-z_{l-1})]}&{}z\in [z_{l-1},z_{l}),\\ 0,~~\text {otherwise},\\ \end{array}\right. } \end{aligned}$$
(7)

where \(\tau =\sqrt{\eta }\), is a tension parameter such that \(\eta \in {\mathbb {R}}\) and \(\eta \le (\pi /h)^2\). Higher order UE-splines \({\mathbb {B}}_{l,j}\) for \(j\ge 3\) are obtained recursively by

$$\begin{aligned} {\mathbb {B}}_{l,j}(z)=\int _{-\infty }^{z}\Big (\sigma _{l,j-1}{\mathbb {B}}_{l,j-1}(z) -\sigma _{l+1,j-1}{\mathbb {B}}_{l+1,j-1}(z)\Big )dz,~\sigma _{l,j}=\Big (\int _{-\infty }^{\infty }{\mathbb {B}}_{l,j}(z)dz\Big )^{-1}. \nonumber \\ \end{aligned}$$
(8)

Using equations (78) and taking \(\eta >0\), we get a subclass of UE-splines, uniform algebraic trigonometric (UAT) tension B-splines of order 4, \({\mathbb {B}}_{l,4}(z)\) at knots are given by

$$\begin{aligned} {\mathbb {B}}_{l,4}(z)= {\left\{ \begin{array}{ll} \frac{\sigma _{l,2}\sigma _{l,3}}{\tau \sin (\tau h)}\Big [(z-z_{l-2})-\frac{\sin (\tau (z-z_{l-2}))}{\tau }\Big ],~~z\in [z_{l-2},z_{l-1}),\\ \\ \sigma _{l,3}\Big [\frac{\sigma _{l,2}}{\tau \sin (\tau h)}\Big ((z_{l-1}-z_{l-2})-\frac{\sin (\tau h)}{\tau }\Big )+(z-z_{l-1})\\ -\frac{\sigma _{l,2}}{\tau \sin (\tau h)}\Big ((z-z_{l-1})-\frac{1}{\tau }(\sin (\tau (z-z_l))+\sin (\tau (z_l-z)))\Big )\\ -\frac{\sigma _{l+1,2}}{\tau \sin (\tau h)}\Big ((z-z_{l-1})-\frac{\sin (\tau (z-z_{l-1}))}{\tau }\Big )\Big ]\\ -\frac{\sigma _{l+1,2}\sigma _{l+1,3}}{\tau \sin (\tau h)}\Big [(z-z_{l-1})-\frac{\sin (\tau (z-z_{l-1}))}{\tau }\Big ],~~ z\in [z_{l-1},z_{l}),\\ \\ 1-\frac{\sigma _{l+1,2}\sigma _{l,3}}{\tau \sin (\tau h)}\Big [(z_{l+1}-z)+\frac{\sin (\tau (z-z_{l+1}))}{\tau }\Big ]\\ -\sigma _{l+1,3}\Big [\frac{\sigma _{l+1,2}}{\tau \sin (\tau h)}\Big ((z_{l}-z_{l-1})-\frac{\sin (\tau h)}{\tau }\Big )+(z-z_{l})\\ -\frac{\sigma _{l+1,2}}{\tau \sin (\tau h)}\Big ((z-z_{l})-\frac{1}{\tau }(\sin (\tau (z-z_{l+1}))-\sin (\tau (z_l-z_{l+1})))\Big )\\ -\frac{\sigma _{l+2,2}}{\tau \sin (\tau h)}\Big ((z-z_{l})-\frac{\sin (\tau (z-z_{l}))}{\tau }\Big )\Big ],~~z\in [z_{l},z_{l+1}),\\ \\ \frac{\sigma _{l+2,2}\sigma _{l+1,3}}{\tau \sin (\tau h)}\Big [(z_{l+2}-z)+\frac{\sin (\tau (z-z_{l+2}))}{\tau }\Big ],~~z\in [z_{l+1},z_{l+2}),\\ \\ 0,~~\text {otherwise},\\ \end{array}\right. } \end{aligned}$$
Table 1 Values of \({\mathbb {B}}_{l,4}(z)\) and its derivatives at the grid points

where

$$\begin{aligned} \sigma _{l,2}=&\frac{\tau \sin (\tau h)}{2\big [\sin ^2\big (\frac{\tau (z_{l-1}-z_{l-2})}{2}\big )+\sin ^2\big (\frac{\tau (z_l-z_{l-1})}{2}\big )\big ]} \end{aligned}$$

and

$$\begin{aligned} \sigma _{l,3}=&1/\Big [\frac{2\sigma _{l,2}}{\tau \sin (\tau h)}\big [\frac{z_{l-1}-z_{l-2}}{2}-\frac{\sin (\tau (z_{l-1}-z_{l-2}))}{2\tau }\big ]+(z_l-z_{l-1})\\&-\frac{2\sigma _{l,2}}{\tau \sin (\tau h)}\big [\frac{z_{l}-z_{l-1}}{2}-\frac{\sin (\tau (z_l-z_{l-1}))}{2\tau }\big ]\\&-\frac{2\sigma _{l+1,2}}{\tau \sin (\tau h)}\big [\frac{z_{l}-z_{l-1}}{2}-\frac{\sin (\tau (z_l-z_{l+1}))}{2\tau }\big ]\\&+\frac{2\sigma _{l+1,2}}{\tau \sin (\tau h)}\big [\frac{z_{l+1}-z_{l}}{2}-\frac{\sin (\tau (z_l-z_{l+1}))}{2\tau }\big ]\Big ]. \end{aligned}$$
Table 2 Comparison of absolute errors for Example 1 by taking \(N=60\) and \(k=0.05\)
Table 3 Absolute errors using the proposed method for Example 1 by taking different values of N and \(\tau \) at \(t=0.1\)
Fig. 1
figure 1

Analytical and numerical solutions of Example 1 at \(t=0.1\)

Fig. 2
figure 2

Analytical and numerical solutions of Example 1 at \(t=0.2\)

Fig. 3
figure 3

Absolute errors for Example 1 at \(t=0.05\)

Fig. 4
figure 4

Absolute errors for Example 1 at \(t=0.1\)

Fig. 5
figure 5

Absolute errors for Example 1 at \(t=0.15\)

Fig. 6
figure 6

Absolute errors for Example 1 at \(t=0.2\)

Over the space domain [ab], the set of UAT tension B-spline functions \(\{{\mathbb {B}}_{-1,4}\),\({\mathbb {B}}_{0,4}\),...,\({\mathbb {B}}_{N+1,4}\}\) forms a basis and Table 1 lists the values of function \({\mathbb {B}}_{l,4}\) and its first order derivative at grid points where the \(d_i\)’s for \(i=1,2,3,4\) are defined as

$$\begin{aligned} d_1= & {} \frac{1}{4h[\sin ^2(\frac{\tau h}{2})]}\Big [h-\frac{\sin (\tau h)}{\tau }\Big ],\\ d_2= & {} 1-\frac{1}{2h[\sin ^2(\frac{\tau h}{2})]}\Big [h-\frac{\sin (\tau h)}{\tau }\Big ],\\ d_3= & {} \frac{1}{2h},~d_4=-\frac{1}{2h}. \end{aligned}$$

Further, to make the matrix diagonally dominant, \({\mathbb {B}}\)-basis functions are modified as (Tamsir et al. 2018)

$$\begin{aligned} \mathbb{M}\mathbb{B}_{l}(z)=\left\{ \begin{aligned}&{\mathbb {B}}_{0,4}(z)+2{\mathbb {B}}_{-1,4}(z),{} & {} l=0\\&{\mathbb {B}}_{1,4}(z)-{\mathbb {B}}_{-1,4}(z),{} & {} l=1\\&{\mathbb {B}}_{l,4}(z),{} & {} l=2,3,...,N-2\\&{\mathbb {B}}_{N-1,4}(z)-{\mathbb {B}}_{N+1,4}(z),{} & {} l=N-1\\&{\mathbb {B}}_{N,4}(z)+2{\mathbb {B}}_{N+1,4}(z),{} & {} l=N\\ \end{aligned} \right. \end{aligned}$$
(9)

in the domain [ab]. The approximate values of the derivatives of w with respect to z at \(z_i\) can now be estimated by making the assumption that the function w(z) is sufficiently smooth throughout its entire solution domain. We have that the p-order derivatives may be approximated by

$$\begin{aligned} w_z^{(p)}(z_i)=\frac{\partial ^p u(z_i,t)}{\partial z^p}=\sum _{j=0}^{N}\alpha _{ij}^{(p)}w(z_j,t), i=0,1,2,...,N;~p=1,2,3, \end{aligned}$$
(10)

where \(\alpha _{ij}^{(p)}\) are the corresponding weighting coefficients.

2.2 Determination of the weighting coefficients

In order to find the weighting coefficients for the first order derivative, consider \(p=1\) in eq. (10) and trial functions to be \(\mathbb{M}\mathbb{B}_l\) in (9) such that one gets

$$\begin{aligned} \mathbb{M}\mathbb{B}_l'(z_i)=\sum _{j=0}^{N}\alpha _{ij}^{(1)}\mathbb{M}\mathbb{B}_l(z_j), \text { for }l=0,1,...,N\text {; } i=0,1,...,N. \end{aligned}$$
(11)

As a consequence, we get the following system of equations

$$\begin{aligned} KA=S, \end{aligned}$$

where the j-th column of A is

$$\begin{aligned} A_j= & {} [\alpha _{j-1,0}^{(1)},\alpha _{j-1,1}^{(1)},...,\alpha _{j-1,N}^{(1)}]^T,~ j=1,2,\dots ,N+1,\\ K= & {} \begin{bmatrix} d_2+2d_1&{}d_1&{}0&{}&{}&{}\\ 0&{}d_2&{}d_1&{}0&{}&{}\\ 0&{}d_1&{}d_2&{}d_1&{}&{}\\ &{}&{}..&{}..&{}..&{}\\ &{}&{}..&{}..&{}..&{}\\ &{}&{}&{}d_1&{}d_2&{}0\\ &{}&{}&{}0&{}d_1&{}d_2+2d_1\\ \end{bmatrix}, \end{aligned}$$

and the columns of S are

\(S_1=[2d_4,d_3-d_4,0,...,0]^T,\)

\(S_2=[d_3,0,d_4,0,...,0]^T,\)

\(S_3=[0,d_3,0,d_4,0,...,0]^T,\)

\(\dots \)

\(\dots \)

\(S_{N+1}=[0,...,0,d_4-d_3,2d_3]^T.\)

Solving the above system of equations, we obtain the weighting coefficients \(\{\alpha _{i0}^{(1)}, \alpha _{i1}^{(1)}, ... ,\alpha _{iN}^{(1)}\}\) for \(i=0,1,2,...,N\). Further, using Shu’s recurrence formula (Shu 2012), the weighting coefficients for the second order derivative can be evaluated as

$$\begin{aligned} \alpha _{ij}^{(2)}&=2\Big [\alpha _{ij}^{(1)}\alpha _{ii}^{(1)}-\frac{\alpha _{ij}^{(1)}}{z_i-z_j}\Big ],\text { for }i\ne j \end{aligned}$$
(12)

and

$$\begin{aligned} \alpha _{ii}^{(2)}&=-\sum _{j=0,i\ne j}^{N}\alpha _{ij}^{(2)}. \end{aligned}$$

By matrix multiplication approach, we have

$$\begin{aligned}{}[\alpha _{ij}^{(3)}]=[\alpha _{ij}^{(1)}][\alpha _{ij}^{(2)}], \end{aligned}$$

where \([\alpha _{ij}^{(1)}]\), \([\alpha _{ij}^{(2)}]\) and \([\alpha _{ij}^{(3)}]\) are weighting coefficients for the approximations of first, second and third order derivatives, respectively. Hence, approximations to the partial derivatives are attained by using these weighting coefficients.

3 Formulation of the proposed discetization

The approximations of the derivatives obtained in (10) are substituted in the CH eq. (2) and its modified form (3) to obtain the following

$$\begin{aligned}{} & {} \begin{aligned} \frac{\hbox {d}w_i}{\hbox {d}t}-\sum _{j=0}^{N}\alpha _{ij}^{(2)}\frac{\hbox {d}w_j}{\hbox {d}t} =&-3w_i\left( \sum _{j=0}^{N}\alpha _{i j}^{(1)}w_j\right) \\&+2\left( \sum _{j=0}^{N}\alpha _{i j}^{(1)}w_j\sum _{j=0}^{N}\alpha _{ij}^{(2)}w_j\right) +w_i\sum _{j=0}^{N}\alpha _{i j}^{(3)}w_j, \end{aligned} \end{aligned}$$
(13)
$$\begin{aligned}{} & {} \begin{aligned} \frac{\hbox {d}w_i}{\hbox {d}t}-\sum _{j=0}^{N}\alpha _{ij}^{(2)}\frac{\hbox {d}w_j}{\hbox {d}t} =&-3w_i^2\left( \sum _{j=0}^{N}\alpha _{ij}^{(1)}w_j\right) \\&+2\left( \sum _{j=0}^{N}\alpha _{ij}^{(1)}w_j\sum _{j=0}^{N}\alpha _{ij}^{(2)}w_j\right) +w_i\sum _{j=0}^{N}\alpha _{ij}^{(3)}w_j, \end{aligned} \end{aligned}$$
(14)

for \(i=1,2,...,N-1\). Similarly, substitutions are done for the DP eq. (5) and its modified form (6) which results, respectively, in the following approximations

$$\begin{aligned}{} & {} \begin{aligned} \frac{\hbox {d}w_i}{\hbox {d}t}-\sum _{j=0}^{N}\alpha _{ij}^{(2)}\frac{\hbox {d}w_j}{\hbox {d}t} =&-4w_i\left( \sum _{j=0}^{N}\alpha _{ij}^{(1)}w_j\right) \\&+3\left( \sum _{j=0}^{N}\alpha _{ij}^{(1)}w_j\sum _{j=0}^{N}\alpha _{ij}^{(2)}w_j\right) +w_i\sum _{j=0}^{N}\alpha _{ij}^{(3)}w_j, \end{aligned} \end{aligned}$$
(15)
$$\begin{aligned}{} & {} \begin{aligned} \frac{\hbox {d}w_i}{\hbox {d}t}-\sum _{j=0}^{N}\alpha _{ij}^{(2)}\frac{\hbox {d}w_j}{\hbox {d}t} =&-4w_i^2\left( \sum _{j=0}^{N}\alpha _{ij}^{(1)}w_j\right) \\&+3\left( \sum _{j=0}^{N}\alpha _{ij}^{(1)}w_j\sum _{j=0}^{N}\alpha _{ij}^{(2)}w_j\right) +w_i\sum _{j=0}^{N}\alpha _{ij}^{(3)}w_j, \end{aligned} \end{aligned}$$
(16)
Table 4 Convergence rate with respect to z in terms of \(L_{\infty }\) for \(t=0.2\)
Fig. 7
figure 7

3D plot of numerical solution of Example 1 for \(t\le 1\) taking \(k=0.01, N=60\)

where \(i=1,2,\dots ,N-1\). The corresponding boundary conditions considered along with the above equations are given below

$$\begin{aligned} w_t(z_0)=f'_1(t)\text { and }w_t(z_N)=f'_2(t). \end{aligned}$$

This gives us a system of \(N+1\) ordinary differential equations of first order with initial condition

$$\begin{aligned} w(z,0)=w_0(z)\text {, }z\in [a,b]. \end{aligned}$$
(17)

Now, this system will be solved using an optimized hybrid block method which is described in the following section.

Table 5 Comparison of absolute errors for Example 2 by taking \(N=40\) and \(k=0.5\) for \(t=0.5\)
Fig. 8
figure 8

Analytical and numerical solutions of Example 2 at \(t=0.5\)

Fig. 9
figure 9

Absolute errors for Example 2 at \(t=0.5\)

4 Hybrid block method

With the evolution of numerical methods for spatial variables, a better independent time-stepping algorithm that integrates the first order initial value problems (IVPs) while overcoming the accuracy-grid size trade-off are required. Such issues can be resolved via hybrid block approaches. Considering a first order initial value problem (IVP) of the form \(\{y'=f(t,y);y(0)=y_0\}\), an optimized one-step hybrid block method has been proposed in Kaur and Kanwar (2022) using the concepts of interpolation and collocation. This method achieves attributes such as zero-stability, convergence, A-stability, and consistency that have at least fourth algebraic order. The so-called hybrid block approach is made up of the following equations

Table 6 Comparison of absolute errors for Example 3 by taking \(N=60\) and \(k=0.05\)
$$\begin{aligned} kf_{i+1}&=-7y_i+5\sqrt{5}y_{i+r}-5\sqrt{5}y_{i+s}+7y_{i+1}-kf_i, \end{aligned}$$
(18a)
$$\begin{aligned} kf_{i+r}&=\frac{(-17-\sqrt{5})}{2\sqrt{5}}y_i+\frac{(5+\sqrt{5})}{2}y_{i+r}+\frac{(-5+3\sqrt{5})}{2}y_{i+s}\nonumber \\&\quad +\frac{(-3+\sqrt{5})}{2\sqrt{5}}y_{i+1}-\frac{k}{\sqrt{5}}f_i, \end{aligned}$$
(18b)
$$\begin{aligned} kf_{i+s}&=\frac{(17-\sqrt{5})}{2\sqrt{5}}y_i+\frac{(-5-3\sqrt{5})}{2}y_{i+r}+\frac{(5-\sqrt{5})}{2}y_{i+s}\nonumber \\&\quad +\frac{(3+\sqrt{5})}{2\sqrt{5}}y_{i+1}+\frac{k}{\sqrt{5}}f_i, \end{aligned}$$
(18c)

where k is the fixed step-size, \(r=\frac{1}{2}-\frac{\sqrt{5}}{10}\), \(s=\frac{1}{2}+\frac{\sqrt{5}}{10}\) and \(f_i=f(t_i,y_i)\). The system of equations of first order IVPs obtained in the previous section, is solved by the block method (18).

Fig. 10
figure 10

Absolute errors for Example 3 at \(t=0.05\)

Fig. 11
figure 11

Absolute errors for Example 3 at \(t=0.1\)

Fig. 12
figure 12

Absolute errors for Example 3 at \(t=0.15\)

Fig. 13
figure 13

Absolute errors for Example 3 at \(t=0.2\)

5 Numerical results

In order to prove the efficiency of the proposed method, this section comprises of numerical experiments and errors are evaluated using following formulas:

$$\begin{aligned} L_{\infty }= & {} \max _i|w_i^{exact}-w_i^{num}|,\\ L_2= & {} \sqrt{h\sum _{i=1}^{N}|w_i^{exact}-w_i^{num}|^2}, \end{aligned}$$

where \(w^{exact}_i\) and \(w^{num}_i\) refer to the exact and approximate solutions evaluated at \((z_i,t)\), where t will be specified on each case. The formula of the convergence rate with respect to z is

$$\begin{aligned} \frac{\log _{10}[Error(h_i)/Error(h_{i+1})]}{\log _{10}[h_i/h_{i+1}]}, \end{aligned}$$

where \(h_i\) is the spatial step size. Numerical results are obtained using MATLAB R2017a on i5-4210U CPU with 64-bit operating system and 4GB RAM.

Example 1: We first investigate the Camassa-Holm eq. (3) with initial condition

$$\begin{aligned} w(z,0)=-2sech^2\Big (\frac{z}{2}\Big ). \end{aligned}$$

The space domain is [-15,15] and the boundary conditions can be easily derived from the analytical solution which is given as

$$\begin{aligned} w(z,t)=-2sech^2\Big (\frac{z}{2}-t\Big ). \end{aligned}$$

To analyze the effectiveness of the derived method, the results are compared in Table 2 to those provided by other numerical methods in Yıldırım (2010); Ganji et al. (2008); Wasim et al. (2018); Çelik (2022); Jan et al. (2022). The results tabulated in Table 2 are obtained using \(k=0.05\), \(N=60\) and \(\tau =1.75\) for different values of t. Comparisons show that the results provided by our method are remarkably better than others. The \(L_{\infty }\) errors at \(t=0.1\) are tabulated in Table 3 for different values of N and \(\tau \) which depicts that value of \(\tau \) closer to 1 gives more accurate solutions for any value of N. Figures 1 and 2 display analytical and numerical solutions at \(t=0.1\) and \(t=0.2\). The proficiency of hybrid block method can be seen through absolute errors obtained in single time step for \(t=0.05, 0.1,0.15,0.20\) that are displayed in Figs. 345 and 6, respectively. Convergence rate with respect to z in terms of \(L_{\infty }\) error is tabulated in Table 4 for \(t=0.2\) by taking \(k=0.2\). A 3D-plot for numerical solution for \(t\in [0,1]\) is shown in Fig. 7.

Example 2: Consider the CH eq. (2), for which \(\phi \) is a homogeneous polynomial in eq. (1) for \(z\in [-10,10]\) and whose exact solution is

$$\begin{aligned} w(z,t)=c\exp ^{-|z-ct|}. \end{aligned}$$

The comparison of the results obtained by Jan et al. (2022) and that of the present method for \(t=0.5\) and \(c=0.01\) are given in Table 5. It is evident that the number of nodes for the derived method is less and the obtained results are more accurate even using just a single time step. Figure 8 presents the analytical and the numerical solutions. The obtained absolute errors are plotted in Fig. 9 for \(t=0.5\).

Example 3: The modified Degasperis-Procesi eq. (6) is considered in the space domain [-15,15] and has an analytical solution given by

$$\begin{aligned} w(z,t)=-\frac{15}{8}sech^2\Big (\frac{z}{2}-\frac{-5t}{4}\Big ). \end{aligned}$$

The initial and boundary conditions are obtained from the exact solution. Many numerical methods have been applied to this equation and are compared with the results obtained by the presented method. We choose \(N=60\), \(k=0.05\) and \(\tau =1.5\) to evaluate the absolute error for different values of t and results are given in Table 6. We can see that the obtained results with the proposed method are the best among all the numerical methods in Yıldırım (2010); Ganji et al. (2008); Wasim et al. (2018); Çelik (2022); Jan et al. (2022). Figures 101112 and 13 display absolute errors for \(t=0.05,0.1,0.15\) and 0.20, respectively. Table 7 shows the absolute error for \(t=0.01\) by considering different values of N along with different values of \(\tau \). The accuracy shifts with the value of \(\tau \) from 1.5 to 1 with the increase of grid-size N. The rate of convergence with respect to z is given in Table 8 at time \(t=0.2\) considering just a single time step. Figure 14 represents a 3D-plot of the numerical solution for \(t\in [0,1]\).

Table 7 Absolute errors using the proposed method for Example 3 by taking different values of N and \(\tau \) at \(t=0.1\)
Table 8 Convergence rate with respect to z in terms of \(L_{\infty }\) for \(t=0.2\)

Example 4: We consider Degasperis-Procesi (DP) eq. (5) which is a subcase of equation (1) with \(\phi \), a homogeneous polynomial. The initial condition for single peakon traveling wave solution is given by

$$\begin{aligned} w(z,0)=c\exp ^{-|z|}. \end{aligned}$$

The boundary conditions can be extracted from the exact solution \(w(z,t)=c\exp ^{-|z-ct|}\). The interval [0,1] is chosen as the space domain and the wave speed \(c=0.25\). The remarkable difference in CPU time in comparison to the methods considered in Shaheen et al. (2022) is recorded in Table 9 for different values of t. The corresponding \(L_{\infty }\) and \(L_2\) errors were obtained taking \(N=10\) and a single time-step.

Fig. 14
figure 14

3D plot of numerical solution of Example 3 for \(t\le 1\) taking \(k=0.01, N=60\)

Table 9 \(L_2\) and \(L_{\infty }\) errors with CPU times for Example 4

6 Stability analysis

The choice of the L-stable optimized hybrid block method (18) ensures that the error in approximating the solution of a well-posed system of initial value problems (IVPs) is not magnified. The stability of the proposed algorithm is investigated using matrix stability analysis (Saka et al. 2011; Kaur and Kanwar 2022) which means that the stability depends on the eigenvalues of the coefficient matrix of the system which is obtained after the implementation of the differential quadrature method (DQM) on a given partial differential equation (PDE). After transforming the PDE into the system of ordinary differential equations (ODEs), we get a matrix equation of the form

$$\begin{aligned} W' = LW + F, \end{aligned}$$

where L is the coefficient matrix and F is formed by the non-homogeneous part and the boundary conditions. If real part of eigenvalues of coefficient matrix are either negative or zero then the system of ODEs obtained is stable. Plots of the eigenvalues of L for different number of nodes N are shown in Figs. 15 and 16. As it is evident from these plots, that all the eigenvalues lie on the stability region. Further, the convergence analysis of the hybrid block method (18) has been done in Kaur and Kanwar (2022). Therefore, this results in the unconditional stability of the presented method.

Fig. 15
figure 15

Eigenvalues for Camassa-Holm equation

Fig. 16
figure 16

Eigenvalues for Degasperis-Procesi equation

7 Conclusion

The novel algorithm that combines the differential quadrature method (DQM) using fourth order UAT-tension B-splines as the basis to convert a partial differential equation (PDE) into a system of ordinary differential equations (ODEs) and an optimized hybrid block method of order four provides accurate numerical solutions with high efficiency. Some numerical experiments have been presented and analyzed in terms of \(L_2\) and \(L_{\infty }\) errors. This study shows that the proposed method achieves better accuracy considering less number of nodes and saves computational time in comparison to other numerical methods available in the literature. The stability analysis shows that the combination of two high resolution numerical methods is unconditionally stable for the CH equation as well as for the DP equation. Many other mixed derivative type PDEs can be solved accurately by applying the presented method.