#### Abstract

The construction of mathematical models for different phenomena, and developing their solutions, are critical issues in science and engineering. Among many, the Buckmaster and Korteweg-de Vries (KdV) models are very important due to their ability of capturing different physical situations such as thin film flows and waves on shallow water surfaces. In this manuscript, a new approach based on the generalized Taylor series and residual function is proposed to predict and analyze Buckmaster and KdV type models. This algorithm estimates convergent series with an easy-to-use way of finding solution components through symbolic computation. The proposed algorithm is tested against the Buckmaster and KdV equations, and the results are compared with available solutions in the literature. At first, proposed algorithm is applied to Buckmaster-type linear and nonlinear equations, and attained the closed-form solutions. In the next phase, the proposed algorithm is applied to highly nonlinear KdV equations (namely, classical, modified, and generalized KdV) and approximate solutions are obtained. Simulations of the test problems clearly reassert the dominance and capability of the proposed methodology in terms of accuracy. Analysis reveals that the projected scheme is reliable, and hence, can be utilized for more complex problems in engineering and the sciences.

#### 1. Introduction

Many real-world systems are translated into mathematical models as differential equations [1, 2]. For more accurate analysis and predictions, it is recommended to use partial differential equations instead of ordinary differential equations for modeling various physical phenomena. These equations are widely used for describing different complex situations, such as fluid flow [3, 4], signal processing, control and information theory [5, 6], entropy generations [7], and waves on shallow water surfaces [8–10]. Examples include radioactive decay, spring-mass systems, population growth, and predator-prey models. As nonlinear model, KdV equations has enormous effect on many aspects in theoretical and mathematical physics [11], quantum and string theory [12, 13]. KdV equations are famous for capturing nonlinear dispersive waves. For the solution of such complex equations, scientist needs different methods and tools. In literature, various analytical and numerical techniques are available, such as the Darboux transformation [14], the tanh method [15], the separation of variable [16], and Sine–Cosine method [17], and Lie symmetry [18, 19] for the solution of DEs, but these methods are limited to linear problems only. Due to nonlinearity in most of the physical phenomena, researchers have switched their attention towards approximate solutions of DEs. These solutions can be obtained through different numerical schemes like radial basis function (RBF) methods [20], finite element methods (FEM) [21], and so on and seminumerical schemes include the homotopy perturbation method (HPM) [22, 23] and its different modifications, the variational iteration method (VIM) [24], and the Adomian decomposition method (ADM) [25].

Every numerical scheme has its own restriction, such as linearization, discretization, or perturbation. To overcome these difficulties, we propose RPSM, which can start working with initial conditions and lead us to the convergent series solutions of initial and boundary value problems (IBVPs). In this method, truncated series and residual function concepts are essential for the solution process. Scientists have used RPSM to solve various types of problems. At first, RPSM was proposed by Arqub et al. for higher-order IVPs [26, 27]. Aqub also extended RPSM to fractional and fuzzy type DEs in [28, 29]. Al-Smadi also applies RPSM to different classes of IVPs in [30]. Later on, Kamoshynska utilize solved coupled Burger equations through RPSM [31]. Zhang et al. modify RPSM by mixing it with the least square method for time fractional PDEs in [32]. El-Ajou et al. extend this method to time fractional Burger-type equations in [33]. Alquran investigated the fractional drainage equation through RPSM [34]. Qayyum and Fatema utilized RPSM for the solution of stiff systems in [35]. Qayyum et al. extended this technique to higher order BVPs [36]. Other researchers also used RPSM to various problems arise in science and engineering [37–39].

The objective of this paper is the application of RPSM to Buckmaster and KdV type nonlinear PDEs for improved results with less computational cost. In the rest of the paper, the basic idea of RPSM for PDEs is given in Section 2. Convergence analysis of RPSM is in Section 3 while application of RPSM to the Buckmaster and KdV families are in Sections 4 and 5, respectively. Section 6 contains a discussion of results while Section 7 presents a conclusion.

#### 2. Basic Idea of Residual Power Series Algorithm for Partial Differential Equations

To explain the proposed scheme, let us take the following PDEwhere and are source term and differential operator, respectively. The initial and boundary conditions are

Let the following power series as a solution of the problemwhere are unknowns to be computed. By using initial condition

Consider the truncated series aswhere

Next, we use (3) in (1) to obtain the following residual function

In next step of implementation, we use the following fundamental concept with residual function to get coefficients of series solution.where represents the number of initial conditions. This iterative process is repeated for higher order solution. By computing more coefficients improved accuracy can be achieved.

#### 3. Convergence Analysis of Residual Power Series Algorithm

In this section, we introduce necessary definition and theorem of residual power series.

*Definition 1. *[26] *A power series (PS) about**is defined as*where constants , are coefficients of power series.

Theorem 1 (see [30]). *let ** have a power series representation at ** of the form*

If , are continuous on , then and is the radius of convergence.

Theorem 2. *For residual power series , there are following three possibilities:*(1)*If convergence radius is zero, then the series will converge only for .*(2)*If convergence radius is equal to , then series will converge for all .*(3)*The series converges for , for some positive real number and diverges for . Where is the radius of convergence in this case.*

*Proof. *Let we assume that Case (1) and (2) are not true. Then, there exist nonzero numbers and such that series converges for and diverges for . Therefore, the convergence set is not empty. Thus using completeness axiom, has at least upper bound . If , then does not belong to , and hence, series diverges. If , then, is not an upper bound for and so there exists such that . Since and series converges, so converges, hence, proof of the theorem is complete.

#### 4. Application and Simulations in Buckmaster Family of Equations

##### 4.1. Test Problem 1

Consider the following nonlinear and nonhomogeneous Buckmaster equation

With initial and boundary conditions

Exact solution of the problem is

To start solution process, let we assume the following truncated series as

Next, re-writing (11) as

And plug truncated series in (17) to get the following residual function

Now, putting in (18) provide

Repeat the process by putting in (8) and (18), we get

Continuing the recursive process, the series solution is

Which is closed form (exact) solution of Test Problem 1.

##### 4.2. Test Problem 2

Consider the nonlinear and nonhomogeneous Buckmaster equation

With IBCs

Exact solution is

Using basic theory of RPSM recursively, following are the unknown coefficients of the truncated series

Hence, series solution is

Which is closed form solution of Test Problem 2.

#### 5. Application and Simulations in KdV Family of Equations

##### 5.1. Test Problem 3 (Classical KdV)

Consider the following nonlinear and nonhomogeneous classical KdV equation (25):

With initial condition

Exact solution is

Using basic idea of RPSM recursively, unknown coefficients of the required series are

Hence, series solution is

Which leads to a closed form solution of Test Problem 3.

##### 5.2. Test Problem 4 (Classical KdV)

Consider the following nonlinear classical KdV equation [40]:

With initial condition

Exact solution of this problem is

After applying basic theory of RPSM recursively, third order solution is obtained. Numerical results of Test Problem 4 are shown in Table 1 and Figure 1.

**(a)**

**(b)**

**(c)**

##### 5.3. Test Problem 5 (Classical KdV)

Consider the following nonlinear classical KdV equation [41]:

With initial condition

Exact solution is

Sixth order RPS solution is obtained. Numerical results of Test Problem 5 are shown in Table 2 and Figure 2.

**(a)**

**(b)**

**(c)**

##### 5.4. Test Problem 6 (Modified KdV)

Consider the following nonlinear modified KdV equation [40]:

With initial condition

Exact solution of the problem is

Fourth order RPS solution is obtained whose results are shown in Table 3 and Figure 3.

**(a)**

**(b)**

**(c)**

##### 5.5. Test Problem 7 (Modified KdV)

Consider the following nonlinear modified KdV equation [40]:

With initial condition

The exact solution of the problem is

Fourth order RPS solution is obtained and results are shown in Table 4 and Figure 4.

**(a)**

**(b)**

**(c)**

##### 5.6. Test Problem 8 (Generalized KdV)

Consider third-order nonlinear generalized KdV equation [42]:

With initial conditionwhere , , and are constants and .

Exact solution of the problem is

To obtain solution we fixed in generalized equation. Other values of can also be used in this problem.

Third order RPS solution is obtained and results are shown in Table 5 and Figure 5.

**(a)**

**(b)**

**(c)**

##### 5.7. Test Problem 9 (Generalized KdV)

Consider fourth-order nonlinear generalized KdV equation [42]:where , and are constants.

With initial condition

The exact solution of the problem iswhere and are constants.

Third order RPS solution is obtained by applying basic theory of RPSM and results are shown in Table 6 and Figure 6.

**(a)**

**(b)**

**(c)**

#### 6. Results and Discussion

In this article, a residual power series algorithm is proposed for predicting and analyzing Buckmaster and KdV type partial differential equations. The algorithm directly applies to PDEs without linearization, discretization or perturbation because it depends on the recursive differentiation of dispersal along with the use of given initial constraints to calculate coefficients of the assumed power series using nominal computations. This algorithm mainly based on residual functions which will be obtained after applying the generalized Taylor series. Initially, the proposed algorithm is tested against linear and nonlinear Buckmaster and KdV equations, and closed-form solutions are obtained. These exact solutions are depicted in Figures 7–9 for reader connivance. In the second stage of testing, RPSM is applied to different nonlinear KdV type equations namely, classical, modified, and generalized KdVs, and approximate series solutions are obtained. Numerical results related to these problems are shown in Tables 1–6 and Figures 1–6. Tables 1 and 2 and Figures 1 and 2 depict the comparison of exact and RPS solutions along with corresponding error in Test Problem 4 and 5 (classical KdV equations). Analysis of tables and figures indicate that the obtained solution is accurate and consistent. Tables 3 and 4 and Figures 3 and 4 present the comparison of RPS and HAM solutions at fixed time in Test Problem 6 and 7 (modified KdV equations). An analysis of tables and figures shows that obtained RPS solutions are consistent and reliable. Tables 5 and 6 and Figures 5 and 6 present the comparison of exact and RPS in Test Problem 8 and 9 (generalized KdV equations). Observation shows that obtained RPS solutions are accurate and acceptable. Overall, analysis endorse that the proposed algorithm is easy to use, and hence, can also be used for other families of PDEs.

#### 7. Conclusions

In this article, a residual power series algorithm is proposed for predicting and analyzing Buckmaster and KdV type partial differential equations. This algorithm mainly based on residual functions, which will be obtained after applying the generalized Taylor series. The algorithm is directly applies to PDEs without linearization, discretization, or perturbation because it depends on the recursive differentiation of dispersal along with the use of given initial constraints to calculate coefficients of the assumed power series using nominal computations. In the first phase of simulations, the proposed algorithm is tested against linear and nonlinear Buckmaster equations, and closed-form solutions are obtained. In the second stage of simulations, proposed methodology is applied to different nonlinear KdV type equations (classical, modified, and generalized), and approximate series solutions are obtained. For validity purpose, results are compared with exact and available solutions from literature. Analysis endorse that the proposed algorithm surpasses the other traditional methods in terms of naivety, speediness, and constraints. Hence, this algorithm can also be extended to other families of differential equations arise in different scientific phenomena.

#### Data Availability

All the related data is within the manuscript.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest in publication of this article.