1 Introduction

Partial differential equations which have one or more nonlinear terms are called nonlinear partial differential equations (NLPDEs). Their application is extensive in many branches of sciences such as physics, chemistry, and engineering, since many phenomena can be modeled using the NLPDEs [17]. The most fundamental difficulty in studying NLPDEs is lack of a general technique for solving such equations, so any equation must be examined singly. Note that because the exact solution of NLPDEs is not easily obtained, numerical methods must be used to solve these equations [21].

1.1 A glance over the RLW equation

Here, we focus on one of the most important nonlinear equations which is called regularized long-wave (RLW) equation [12, 17]:

$$\begin{aligned} {u_t} + \nabla .u- \mu \Delta {u_t} + u .\nabla u = 0,\,\,\,\,\,\,\ \mathbf {x} \in \Omega ,\,\,\,\,\,\,\ 0 < t \le T, \end{aligned}$$
(1.1)

with boundary condition

$$\begin{aligned} u(\mathbf {x},t) = {g_1}(t),\,\,\,\,\,\, \mathbf {x} \in \partial \Omega , \end{aligned}$$

and initial condition

$$\begin{aligned} u(\mathbf {x},0) = {g_2}(\mathbf {x}),\,\,\,\,\,\,\ \mathbf {x} \in \Omega , \end{aligned}$$

where \(\Omega \subset \mathbb {R}^d\), \(d \le 3\), and \(\mu\) is positive constant. Equation (1.1) was first presented to model the treatment of the undular bore by Peregrine [54]. It plays a serious role in describing physical model with nonlinear dispersive waves. We mention some of them below [16, 47]:

  • ion-acoustic and magneto-hydrodynamic waves in plasma;

  • pressure waves in liquid bubbles;

  • rotating flow down a tube;

  • longitudinal dispersive waves in elastic rods;

  • phonon packets in nonlinear crystals.

The solution of Eq. (1.1) is special type of solitary wave which is called soliton. Solitons are localized waves of permanent form, they can collide with other solitons, so that they will appear unchanged after the collision. The reader can refer to [35] for more information about solitons. Authors of [6] found an analytical solution under the limited initial and boundary conditions for the one-dimensional RLW equation. Since this solution is not effective, the need for a suitable numerical method is highlighted. Hence, the RLW equation has been solved by various numerical methods including finite-difference scheme [6, 24, 25], finite-element method [10, 11], and pseudo-spectral method [22, 32]. Some researchers also used several kinds of meshless methods to find a numerical solution of the 1-D RLW equation. A collocation method based on radial basis functions (RBFs) has been extended for this equation in [64]. The author of [58] used the Petrov–Galerkin method to solve the GRLW equation with choosing a linear hat function and a quintic B-spline function as the trial and test function, respectively.

The exact solution for two-dimensional RLW equation has been presented in [62]. The cnoidal wave solutions of this model were found by elliptic integral method in paper [73]. The 2-D case of Eq. (1.1) which is appeared in the investigation of the Rossby wave in fluid rotating and the drift waves in plasma has been solved with a combination of the analog equation method and the boundary knot method [16]. The main purpose of [17] is to develop element-free Galerkin meshless method for solving this equation on a non-rectangular region. Author of [52] studied and analyzed the Crank–Nicolson Galerkin method for the Benjamin–Bona–Mahony (BBM) equation. In [59], two conservative difference schemes, one two-level and nonlinear implicit and the other three-level and linear implicit have been studied for solving the BBM-KdV equation. Authors of [60] proposed a high-order nonlinear conservative difference method for the RLW–KdV equation. Furthermore, they indicated the stability and convergence of the presented method. Ghiloufi et al. [31] focused on applying a nonlinear conservative fourth-order difference technique for a model of nonlinear dispersive equations. Moreover, they proved the convergence of the used method by employing the energy method.

1.2 A glance over the EFK equation

The Fisher–Kolmogorov (FK) equation is a nonlinear second-order differential equation which is used to model many phenomena related to reaction–diffusion in chemistry and biology fields [1]. Some researchers [9] added an additional stabilizing fourth-order derivative term to FK equation and called the obtained model as the extended Fisher–Kolmogorov (EFK) equation. It emerges from describing important phenomena such as:

  • pattern formation [15] and spatio-temporal turbulence [9] in bistable system;

  • population genetics [2];

  • diffusion of domain walls in liquids crystals [74];

  • traveling waves in reaction–diffusion systems [2];

  • mesoscopic model of a phase transition in a binary system nearby the Lifshitz point [39].

The EFK equation is indicated as follows [40]:

$$\begin{aligned} {u_t} + \gamma {\Delta ^2}u - \Delta u + g(u) = 0, \quad \mathbf {x} \in \Omega \subset {\mathbb {R}^d}, \quad 0 < t \le T, \end{aligned}$$
(1.2)

with initial condition

$$\begin{aligned} u(\mathbf {x},0) = {u_0}(\mathbf {x}),\quad \mathbf {x} \in \Omega , \end{aligned}$$

and boundary conditions

$$\begin{aligned} u = f_1(t), \quad \Delta u = f_2(t), \quad \mathbf {x} \in \partial \Omega , \quad t \in (0,T], \end{aligned}$$

where \(g(u) = {u^3} - u\), \(\gamma\) is constant.

Up to now, Eq. (1.2) has attracted the attention of many scholars. In [53], its steady state has been surveyed by applying shooting technique. Authors of [15] focused on dynamics of Eq. (1.2) by choosing various values of \(\gamma\). The quintic B-spline collocation scheme is offered for detecting the approximate solution of 1-D EFK equation in [51]. Danumjaya and Pani [13, 14] used the orthogonal cubic spline collocation technique and the finite-element Galerkin method to investigate Eq. (1.2). Authors of [42, 46] rendered the discretization for the 2-D EFK model by applying finite-difference schemes. Moreover, authors of [40] introduced various meshless local boundary integral equation (LBIE) techniques for solving the extended Fisher–Kolmogorov equation. In [43], a nonlinear FD scheme for the 1-D EFK equation is implemented. In addition, the convergence analysis of the obtained difference scheme has been proven by applying the energy method.

1.3 A glance over RBFs and RBF–FD schemes

Meshless methods can solve the PDEs with a set of scattered points in their computational domain. Their most advantage is that they don't require mesh generation. Radial basis functions (RBFs) which were employed by Hardy [33, 34] for the interpolation of scattered points play a significant role in meshless methods. Kansa [44, 45] was the first scholar that acquired the approximate solution of a PDE by applying the RBFs interpolation technique and using all the points in the domain. Hence, the RBFs collocation method is called Kansa’s method. So far, researchers succeeded in solving many PDEs with Kansa’s method, including heat transport equation [72], 1-D nonlinear Burgers equation [36], shallow water equations [37], Schrödinger equation [19], free boundary problems [38, 49], etc. In the Kansa’s method, an ill-conditioned and large linear system is created that can lead to uncertain results. On the other hand, local RBF (LRBF) method has been introduced which for each point (center) uses only a limited number of points (stencil) instead of applying the entire points. This method produces a better-conditioned, sparse linear system. Therefore, it has good accuracy for bad-posed problems.

The RBF–FD method, combining the meshless and FD [20] methods, has attracted the attention of many scholars due to its advantage. The RBF–FD, which can fall into the category of LRBF techniques, is expanded in [23, 63, 66, 68, 69]. Shu and his co-authors [65] implemented the RBF–FD and LSFD for 2-D case of Poisson and Lid-Driven equations, and then, by comparing their results, they showed that the RBF–FD method has a significant accuracy. The steady convection–diffusion equations were solved by the RBF–FD method in [8]. The authors of [27] explained how to apply the RBF–FD method to the shallow water equations and they also established the accuracy and computational efficiency of the RBF–FD method. Bolling and his co-authors [7] were the first researchers to focus on the parallel performance of the RBF–FD method and introduced parallelization strategies. Bayona and his co-workers [4] presented an efficient technique for finding the solutions of PDEs using the local RBF–FD method. Moreover, they showed that the approximation error can be minimized by choosing the optimal shape parameter. The main goals of [41] are to implement the RBF–FD method for 2-D Navier–Stokes and to present an adaptive shape parameter for RBFs to improve numerical results. The authors of [67] solved atmospheric flow by a scalable RBF–FD and they also concentrated on parallelizing of this method. A new method was introduced to decrease the CPU time by combining the RBF–FD idea with the proper orthogonal decomposition technique [18]. Authors of [5] demonstrated that achieving high accuracy without choosing optimal shape parameter is possible when the RBF–FD approximations are combined with polyharmonic splines. Petras and his co-workers [55] solved PDEs on moving surface using the least-squares implicit RBF–FD method.

1.4 The main purpose and framework of this article

In current article, we are going to implement the RBF–FD for solving 1-, 2-, and 3-D cases of the RLW and EFK equations. The framework of this paper is as follows:

  • In Sect. 2, the RBFs and RBF–FD schemes are described.

  • In Sect. 3, we employ the RBF–FD technique for Eq. (1.1) in dimensions one and two.

  • Section 4 relates to the implementation of RBF–FD technique for Eq. (1.2).

  • In Sect. 5, the numerical results of the simulation of RBF–FD method are reported for RLW and EFK equations.

  • Section 6 is dedicated to the overall conclusion of this investigation.

2 The RBFs and RBF–FD methods

To obtain the RBF–FD formulation, we need to RBF interpolants. Hence, we will first review the essential concepts of the RBF interpolation.

2.1 RBF interpolation

A radial function in each point can be defined based on the distance from that point to the origin. It should be noted that a set of specific centers can be considered as the origin that we show them with \({\mathbf {x}_i}\) for \(i=1,2,\ldots ,N\). On the other words, let \({\mathbf {x} \in \mathbb {R}^d}\), \(\psi :\) \({\mathbb {R}^d}\) \(\rightarrow\) \(\mathbb {R}\) be a radial function, then \(\psi (\mathbf {x}) = \varphi (\left\| \mathbf {x} \right\| )\) [26, 70], where \(\varphi\) is a real-valued, non-negative and single variable function and Euclidean norm denoted by \(\left\| . \right\|\)

We presume that a set of scattered points \({\mathbf {x}_i} \in {\mathbb {R}^d}\) and function values \(u({\mathbf {x}_i})\) for \(i = 1,\ldots ,N\) are given. Finding an interpolant as below is known as the RBFs interpolation problem [26, 28, 70]:

$$\begin{aligned} P(\mathbf {x}) = \sum \limits _{i = 1}^N {{\eta _i}\psi (\left\| {\mathbf {x} - {\mathbf {x}_i}} \right\| )}, \end{aligned}$$

where \(\psi\) is a radial function. The coefficients \({{\eta _i}}\) are specified by exerting the interpolation conditions:

$$\begin{aligned} P({\mathbf {x}_i}) = u({\mathbf {x}_i}), \quad i = 1,\ldots ,N. \end{aligned}$$

Thus, the above condition leads to linear system:

$$\begin{aligned}&\left[ {\begin{array}{*{20}{c}} {\psi (\left\| {{\mathbf {x}_1} - {\mathbf {x}_1}} \right\| )}&{}{\psi (\left\| {{\mathbf {x}_1} - {\mathbf {x}_2}} \right\| )}&{}{...}&{}{\psi (\left\| {{\mathbf {x}_1} - {\mathbf {x}_N}} \right\| )}\\ {\psi (\left\| {{\mathbf {x}_2} - {\mathbf {x}_1}} \right\| )}&{}{\psi (\left\| {{\mathbf {x}_2} - {\mathbf {x}_2}} \right\| )}&{} \cdots &{}{\psi (\left\| {{\mathbf {x}_2} - {\mathbf {x}_N}} \right\| )}\\ \vdots &{} \vdots &{} \ddots &{} \vdots \\ {\psi (\left\| {{\mathbf {x}_N} - {\mathbf {x}_1}} \right\| )}&{}{\psi (\left\| {{\mathbf {x}_N} - {\mathbf {x}_2}} \right\| )}&{}{...}&{}{\psi (\left\| {{\mathbf {x}_N} - {\mathbf {x}_N}} \right\| )} \end{array}} \right] \\&\quad \left[ {\begin{array}{*{20}{c}} {{\eta _1}}\\ {{\eta _2}}\\ \vdots \\ {{\eta _N}} \end{array}} \right] = \left[ {\begin{array}{*{20}{c}} u({{\mathbf{x}}_1})\\ u({{\mathbf{x}}_2})\\ \vdots \\ u({{\mathbf{x}}_N}) \end{array}} \right] . \end{aligned}$$

The most popular radial functions are listed below [26, 29, 70]:

  • Gaussian kernel (GA):

    $$\begin{aligned} \psi (r) = \exp \left( { - {{({\varvec{\varepsilon }} r)}^2}} \right) . \end{aligned}$$
  • Multiquadric kernel (MQ):

    $$\begin{aligned} \psi (r) = {\left( {1 + {{({\varvec{\varepsilon }} r)}^2}}. \right) ^{\dfrac{1}{2}}} \end{aligned}$$
  • Inverse multiquadric kernel (IMQ):

    $$\begin{aligned} \psi (r) = \frac{1}{{{{\left( {1 + {{({\varvec{\varepsilon }} r)}^2}} \right) }^{\dfrac{1}{2}}}}}. \end{aligned}$$
  • Inverse quadric kernel (IQ):

    $$\begin{aligned} \psi (r) = \frac{1}{{\left( {1 + {{({\varvec{\varepsilon }} r)}^2}} \right) }}. \end{aligned}$$

In the present investigation, we apply the (MQ) radial function in 1- , 2-, and 3- D.

2.1.1 Shape parameter

The RBFs depend on the shape parameter, which greatly affects the accuracy and stability of the interpolation. Note that when two points are close to each other, the selecting of shape parameter can prevent producing the singular problem [48, 56]. The shape parameter is considered in two forms :

  1. 1.

    Fixed shape parameter

    In this case, the shape parameter is the same for all centers. In fact, the distance between the points and the centers does not affect the choice of shape parameter.

  2. 2.

    Variable shape parameter

    In this case, a different shape parameter is considered for each center. In fact, the distance between the points and the centers plays a role in choosing the shape parameter, for example, \(\psi (x) = \sqrt{{{(x - {x_i})}^2} +{\varvec{\varepsilon }}_i^2}\), so that if the distance from one point to center is large (small), the small (large) shape parameter is considered.

There are two ways to find the optimal shape parameter:

  • Test and trial

    This procedure is a completely experimental method.

  • Optimal algorithms

    Certain researchers have done many studies to find the good shape parameter [56, 61]. Particularly, authors of [3, 4] succeeded in finding an optimal value of the constant and variable shape parameters for the RBF–FD method which minimize the error of approximation. Sarra [61] proposed an algorithm for choosing the optimal shape parameter in which the SVD of interpolation matrix is used.

2.2 RBF–FD method

This section will be devoted to explaining the structure of the RBF–FD method. Figures 1 and 2 demonstrate the applied stencil in 1- and 2-D situations.

Fig. 1
figure 1

One-dimensional case of considered stencil

Fig. 2
figure 2

Two-dimensional case of considered stencil

At first, we suppose that N points \(\left\{ {\left. {{\mathbf {x}_i}} \right\} } \right. _{i = 1}^N\) are scattered on the computational domain \(\Omega \subset \mathbb {R}^d\). The main part of RBF–FD method is that the values of unknown function, \(u_i\) (\(i=1,\ldots ,\left| {\mathcal {I}({\mathbf {x}_j})} \right|\)), are used to approximate any desired linear differential operator (\(\mathcal {L}\)) as below [29, 57]:

$$\begin{aligned} \mathcal {L}u({\mathbf {x}_j}) \approx \displaystyle \sum \limits _{i \in \mathcal {I}({\mathbf {x}_j})} {{w_i}u({\mathbf {x}_i})}, \end{aligned}$$
(2.1)

where \(\mathcal {I}(\mathbf {x}_j)\) contains the index of the points that are in the stencil of \(\mathbf {x}_j\).

In addition, the local interpolation problem is known as [29]

$$\begin{aligned} {P_l}(\mathbf {x}) = \sum \limits _{i = 1}^{\left| {\mathcal {I}({\mathbf {x}_j})} \right| } {{\lambda _i}\psi (\left\| {\mathbf {x} - {\mathbf {x}_i}} \right\| )}. \end{aligned}$$
(2.2)

To get RBF–FD formulation [57], we employ the Lagrangian form of the local RBF interpolant (2.2):

$$\begin{aligned} {P_l}(\mathbf {x}) = \sum \limits _{i = 1}^{\left| {\mathcal {I}({\mathbf {x}_j})} \right| } {\psi _i^*(\mathbf {x})} u({\mathbf {x}_i}), \end{aligned}$$
(2.3)

in which \(\psi _i^*({\mathbf {x}_j}) = {\delta _{ij}},\,\,j = 1,\ldots ,\left| {I({\mathbf {x}_j})} \right| .\)

A closed form for \(\psi _i^*({\mathbf {x}_j})\) is presented in [30, 57] as

$$\begin{aligned} \psi _i^*(\mathbf {x}) = \frac{{\det ({A_i}(\mathbf {x}))}}{{\det (A)}}, \end{aligned}$$
(2.4)

where \(A = \psi (\left\| {{\mathbf {x}_j} - {\mathbf {x}_i}} \right\| )\), \(i,j=1,\ldots ,\left| {\mathcal {I}({\mathbf {x}_j})} \right|\) and \({{A_i}}\) is achieved by inserting the ith row of A with vector:

$$\begin{aligned} B = \left[ {\begin{array}{*{20}{c}} {\psi (\left\| {\mathbf {x} - {\mathbf {x}_1}} \right\| )}&{\psi (\left\| {\mathbf {x} - {\mathbf {x}_2}} \right\| )}&{...} \end{array}\left. {\psi (\Vert {\mathbf {x} - {\mathbf {x}_{\left| {\mathcal {I}({\mathbf {x}_j})} \right| }}} \Vert )} \right] }. \right. \end{aligned}$$

By exerting operator \(\mathcal {L}\) on (2.3), the approximation of \(\mathcal {L}u({\mathbf {x}_j})\) at \(\mathbf {x}_j\) is obtained as [57, 71]

$$\begin{aligned} \mathcal {L}u({\mathbf {x}_j}) \approx \mathcal {L}{P_l}({x_j}) = \sum \limits _{i = 1}^{\left| {\mathcal {I}({\mathbf {x}_j})} \right| } {\mathcal {L}\psi _i^*({\mathbf {x}_j})} u({\mathbf {x}_i}). \end{aligned}$$
(2.5)

Hence, from Eqs. (2.1) and (2.5), it can be concluded that \({w_i} = \mathcal {L}\psi _i^*({\mathbf {x}_j})\). Finally, the weights can be found by solving the linear system [29, 57]:

$$\begin{aligned} A{w^T} = {\left[ {\left( {\mathcal {L}B({\mathbf {x}_i})} \right) } \right] ^T}, \end{aligned}$$
(2.6)

as

$$\begin{aligned}&\left[ {\begin{array}{*{20}{c}} {\psi (\left\| {{\mathbf {x}_1} - {\mathbf {x}_1}} \right\| )}&{}{\psi (\left\| {{\mathbf {x}_2} - {\mathbf {x}_1}} \right\| )}&{}{...}&{} \psi (\left\| {{\mathbf {x}_{\left| {\mathcal{I}({\mathbf {x}_i})} \right| }} - {\mathbf {x}_1}} \right\| )\\ {\psi (\left\| {{\mathbf {x}_1} - {\mathbf {x}_2}} \right\| )}&{}{\psi (\left\| {{\mathbf {x}_2} - {\mathbf {x}_2}} \right\| )}&{} \cdots &{}\psi (\left\| {{\mathbf {x}_{\left| {\mathcal{I}({\mathbf {x}_i})} \right| }} - {\mathbf {x}_2}} \right\| )\\ \vdots &{} \vdots &{} \ddots &{} \vdots \\ {\psi (\left\| {{\mathbf {x}_1} - {\mathbf {x}_{\left| {\mathcal {I}({\mathbf {x}_i})} \right| }}} \right\| )}&{}{\psi (\left\| {{\mathbf {x}_2} - {\mathbf {x}_{\left| {\mathcal {I}({\mathbf {x}_i})} \right| }}} \right\| )}&{}{...}&{}{\psi (\left\| { {\mathbf {x}_{\left| {\mathcal {I}({\mathbf {x}_i})} \right| }} - {\mathbf {x}_{\left| {\mathcal {I}({\mathbf {x}_i})} \right| }}} \right\| )} \end{array}} \right] \left[ {\begin{array}{*{20}{c}} {{w_{1}}}\\ {{w_{2}}}\\ \vdots \\ { {w_{\left| {\mathcal {I}({\mathbf {x}_i})} \right| }}} \end{array}} \right] \nonumber \\&\quad = \left[ {\begin{array}{*{20}{c}} {\mathcal {L} \psi (\left\| {\mathbf {x} - {\mathbf {x}_1}} \right\| ){|_{\mathbf {x} = {\mathbf {x}_i}}}}\\ {\mathcal {L} \psi (\left\| {\mathbf {x} - {\mathbf {x}_2}} \right\| ){|_{\mathbf {x} = {\mathbf {x}_i}}}}\\ \vdots \\ {\mathcal {L} \psi (\left\| {\mathbf {x} - {\mathbf {x}_{\left| {\mathcal {I}({\mathbf {x}_i})} \right| }}} \right\| ){|_{\mathbf {x} = {\mathbf {x}_i}}}} \end{array}} \right] . \end{aligned}$$
(2.7)

Now, to get the optimal shape parameter, we use the algorithm provided by Sarra [61]. The parameters required for Algorithm 1 are defined as

  • \(\mathbf {Q}\) denotes the interpolation matrix.

  • \({\varvec{\sigma }}_{\min }\) and \({\varvec{\sigma }_{\max }}\), which are the smallest and largest singular values, are obtained from the singular-value decomposition (SVD).

  • \({\mathrm {K}_{\min }} = 10^2\) and \({\mathrm {K}_{\max }} = 10^4.\)

  • \({\varvec{\varepsilon }}_{\mathrm{Increment}} = \dfrac{1}{N}.\)

figure a

3 Regularized long-wave equation

This section is allocated to the discretization of 1-D and 2-D RLW equations by RBF–FD procedure.

3.1 The one-dimensional RLW equation

We intend to illustrate the discretization of RBF–FD method for the 1-D case of Eq. (1.1):

$$\begin{aligned} \dfrac{{\partial u}}{{\partial t}} + \dfrac{{\partial u}}{{\partial x}} - \mu \,\,\dfrac{\partial }{{\partial t}}\left( {\dfrac{{{\partial ^2}u}}{{\partial {x^2}}}} \right) + u\dfrac{{\partial u}}{{\partial x}} = 0,\,\,\,\,\mathbf {x}=x \in \mathbb {R} ,\,\,\,0 < t \le T, \end{aligned}$$
(3.1)

in which u(xt) shows the horizontal velocity of fluid.

From Eq. (2.1), the approximation solution is written as

$$\begin{aligned} u(\mathbf {x}_j,t) = \sum \limits _{i = 1}^{\left| {\mathcal {I}({\mathbf {x}_j})} \right| } {{w_i}u_i(t)}, \end{aligned}$$
(3.2)

also, the first- and second-order derivatives are approximated as given in the following:

$$\begin{aligned} \frac{{\partial u(\mathbf {x}_j,t)}}{{\partial x}}= & {} \sum \limits _{i = 1}^{\left| {\mathcal {I}({\mathbf {x}_j})} \right| } {w_i^xu_i(t)}, \quad \quad\\ \frac{{{\partial ^2}u({\mathbf {x}_j},t)}}{{\partial {x^2}}} \nonumber =& {} \sum \limits _{i = 1}^{\left| {\mathcal {I}({\mathbf {x}_j})} \right| } {w_i^{xx}u_i(t).} \end{aligned}$$
(3.3)

Substituting Eqs. (3.2) and (3.3) in Eq. (3.1) gives

$$\begin{aligned}&\frac{{\mathrm{d}{u_j}(t)}}{{\mathrm{d}t}} + \sum \limits _{i = 1}^{\left| {\mathcal {I}({\mathbf {x}_j})} \right| } {w_i^x{u_i}(t)} - \mu \,\,\frac{\mathrm{d}}{{\mathrm{d}t}}\left( {\sum \limits _{i = 1}^{\left| {\mathcal {I}({\mathbf {x}_j})} \right| } {w_i^{xx}{u_i}(t)} } \right) \nonumber \\&\quad + u_j(t)\left( {\sum \limits _{i = 1}^{\left| {\mathcal {I}({\mathbf {x}_j})} \right| } {w_i^x{u_i}(t)} } \right) = 0, \quad j=1,2,\ldots ,N. \end{aligned}$$
(3.4)

After collocating the points; we receive the system of ordinary differential equations (ODEs) of the form:

$$\begin{aligned} \frac{{\mathrm{d}\left( {\mathbf {I} - \mu {\mathbf {W}_{\mathbf {x}\mathbf {x}}}} \right) \vec {\mathbf {u}} }}{{\mathrm{d}t}} + {\mathbf {W}_\mathbf {x}}\vec {\mathbf {u}}(t) + \vec {\mathbf {u}}.*\left( {{\mathbf {W}_\mathbf {x}}\vec {\mathbf {u}}(t)} \right) = 0, \end{aligned}$$
(3.5)

where

$$\begin{aligned} \mathbf {u}(t) = {\left[ {\begin{array}{*{20}{c}} {{u_1}(t)}&{{u_2}(t)}&{...}&{{u_{N - 1}}(t)}&{\left. {{u_{N}}(t)} \right] } \end{array}} \right. ^T}. \end{aligned}$$

The structure of matrices \(\mathbf {W}_\mathbf {x}\) and \(\mathbf {W}_{\mathbf {x}\mathbf {x}}\) depends on the number of points in each stencil (\({\left| {\mathcal {I}({\mathbf {x}_j})} \right| }\)). For instance, if three points in each stencil are selected, then \(\mathbf {W}_\mathbf {x}\) and \(\mathbf {W}_{\mathbf {x}\mathbf {x}}\) are tridiagonal matrices.

3.1.1 Time discretization

So far, the spatial derivatives of the RLW equation have been discretized by the RBF–FD method, and then, the system of ODEs (3.5) has been acquired. There are various methods for solving this equation, such as Euler, Runge–Kutta, etc. However, we preferred to use a command in MATLAB software. In the following, Algorithm 2 illustrates the full discretization of the RLW equation.

figure b

3.2 The two-dimensional RLW equation

We now focus on the 2-D case of Eq. (1.1) and apply the RBF–FD procedure to discretize it. Let the 2-D RLW equation be

$$\begin{aligned}&\frac{{\partial u}}{{\partial t}} + \frac{{\partial u}}{{\partial x}} + \frac{{\partial u}}{{\partial y}} - \mu \,\,\,\frac{\partial }{{\partial t}}\left( {\frac{{{\partial ^2}u}}{{\partial {x^2}}}} \right) - \gamma \,\,\,\frac{\partial }{{\partial t}}\left( {\frac{{{\partial ^2}u}}{{\partial {y^2}}}} \right) + u\frac{{\partial u}}{{\partial x}} \nonumber \\&\quad + u\frac{{\partial u}}{{\partial y}} = 0,\,\,\,\,\mathbf {x}=(x,y) \in \Omega \subset {\mathbb {R}^2},\,\,0< t < T. \end{aligned}$$
(3.6)

According to (2.1), the first- and second-order derivatives with respect to x are approximated as

$$\begin{aligned}&\frac{{\partial u({\mathbf {x}_j},t)}}{{\partial x}} = \sum \limits _{i = 1}^{\left| {\mathcal{I}({\mathbf {x}_j})} \right| } {w_i^x{u_i}(t)} ,\nonumber \\&\frac{{{\partial ^2}u({\mathbf {x}_j},t)}}{{\partial {x^2}}} = \sum \limits _{i = 1}^{\left| {\mathcal{I}({\mathbf {x}_j})} \right| } {w_i^{xx}{u_i}(t)}. \end{aligned}$$
(3.7)

In addition, the same approximations for derivatives in y direction are applied:

$$\begin{aligned}&\frac{{\partial u({\mathbf {x}_j},t)}}{{\partial y}} = \sum \limits _{i = 1}^{\left| {\mathcal{I}({\mathbf {x}_j})} \right| } {w_i^y{u_i}(t)} ,\nonumber \\&\frac{{{\partial ^2}u({\mathbf {x}_j},t)}}{{\partial {y^2}}} = \sum \limits _{i = 1}^{\left| {\mathcal{I}({\mathbf {x}_j})} \right| } {w_i^{yy}{u_i}(t)}. \end{aligned}$$
(3.8)

Substituting Eqs. (3.7)–(3.8) in (3.6) leads to

$$\begin{aligned}&\frac{{\mathrm{d}{u_j}(t)}}{{\mathrm{d}t}} +\sum \limits _{i = 1}^{\left| {\mathcal{I}({\mathbf {x}_j})} \right| } {w_i^x{u_i}(t)} + \sum \limits _{i = 1}^{\left| {\mathcal{I}({\mathbf {x}_j})} \right| } {w_i^y{u_i}(t)} \nonumber \\&\quad - \mu \,\,\frac{\mathrm{d}}{{\mathrm{d}t}}\left( {\sum \limits _{i = 1}^{\left| {\mathcal{I}({\mathbf {x}_j})} \right| } {w_i^{xx}{u_i}(t)} } \right) - \gamma \,\,\frac{\mathrm{d}}{{\mathrm{d}t}}\left( {\sum \limits _{i = 1}^{\left| {\mathcal{I}({\mathbf {x}_j})} \right| } {w_i^{yy}{u_i}(t)} } \right) \nonumber \\&\quad + {u_j}(t)\left( {\sum \limits _{i = 1}^{\left| {\mathcal{I}({\mathbf {x}_j})} \right| } {w_i^x{u_i}(t)} } \right) \nonumber \\&\quad + {u_j}(t)\left( {\sum \limits _{i = 1}^{\left| {\mathcal{I}({\mathbf {x}_j})} \right| } {w_i^y{u_i}(t)} } \right) = 0,\quad j= 1,2,\ldots ,N. \end{aligned}$$
(3.9)

Consequently, we can attain the matrix-vector form of (3.9) as

$$\begin{aligned}&\frac{{\mathrm{d}\left( {{\mathbf{I}} - \mu \mathbf {L}_{\mathbf {xx}}- \gamma \mathbf {L}_{\mathbf {yy}}} \right) \overrightarrow{\mathbf{u}} }}{{\mathrm{d}t}} +\mathbf {L}_{\mathbf {x}}\overrightarrow{\mathbf{u}} (t) + \mathbf {L}_{\mathbf {y}}\overrightarrow{\mathbf{u}} (t) \nonumber \\&\quad +\overrightarrow{\mathbf{u}} .*\left( {\mathbf {L}_{\mathbf {x}}\overrightarrow{\mathbf{u}} (t)} \right) + \overrightarrow{\mathbf{u}} .*\left( {\mathbf {L}_{\mathbf {y}}\overrightarrow{\mathbf{u}} (t)} \right) = 0, \end{aligned}$$
(3.10)

in which \(\mathbf {L}_{\mathbf {xx}}\) is Kronecker product \({\mathbf{I}}\) in \(\mathbf {W}_{\mathbf {xx}}\,\,(\mathbf {L_{xx}}=\mathbf {I}\otimes\mathbf {W}_{\mathbf {xx}})\), \({{\mathbf{L}}_{{\mathbf{yy}}}} = \mathbf {W}_{\mathbf {yy}} \otimes {\mathbf{I}}\), \({{\mathbf{L}}_{{\mathbf{x}}}} ={\mathbf{I}} \otimes \mathbf {W}_{\mathbf {x}}\), \(\mathbf {L}_{\mathbf {y}} =\mathbf {W_{y}} \otimes {\mathbf{I}}\) and

$$\begin{aligned} \mathbf {u}(t) = {\left[ {\begin{array}{*{20}{c}} {{u_1}(t)}&{{u_2}(t)}&{...}&{{u_{{N^2} - 1}}(t)}&{\left. {{u_{N^2}}(t)} \right] } \end{array}} \right. ^T}. \end{aligned}$$

3.2.1 Time discretization

So far, the spatial derivatives of the RLW equation have been discretized by the RBF–FD method. Now, the fourth-order Runge–Kutta method is applied to solve the system of ODEs (3.10). Hence, we introduce Algorithm 3 for the full discretization of the RLW equation.

figure c

4 Extended Fisher–Kolmogrov equation

To solve 1-D and 2-D extended Fisher–Kolmogorov (EFK) equations, we employ the RBF–FD technique. First, how to apply the RBF–FD method for the 1-D case of the EFK equation is explained. Then, the attention is paid on its 2-D case.

4.1 The one-dimensional EFK equation

The one-dimensional EFK equation is

$$\begin{aligned} \frac{{\partial u}}{{\partial t}} + \gamma \frac{{{\partial ^4}u}}{{\partial {x^4}}} - \frac{{{\partial ^2}u}}{{\partial {x^2}}} + g(u) = 0, \quad \mathbf {x}=x \in \Omega \subset {\mathbb {R}},\,\,0 < t \le T, \end{aligned}$$
(4.1)

which can be rewritten by changing the variable as the following system:

$$\begin{aligned} \left\{ {\begin{array}{*{20}{l}} {v = \dfrac{{{\partial ^2}u}}{{\partial {x^2}}},}\\ {}\\ {\dfrac{{\partial u}}{{\partial t}} = - \gamma \dfrac{{{\partial ^2}v}}{{\partial {x^2}}} + v - g(u).} \end{array}} \right. \end{aligned}$$
(4.2)

According to Eq. (2.1), second-order derivatives are approximated as below:

$$\begin{aligned}&\frac{{{\partial ^2}u({\mathbf {x}_j},t)}}{{\partial {x^2}}} = \sum \limits _{i = 1}^{\left| {\mathcal {I}({{\mathbf{x}}_j})} \right| } {w_i^{xx}{u_i}(t)}, \nonumber \\&\frac{{{\partial ^2}v({\mathbf {x}_j},t)}}{{\partial {x^2}}} = \sum \limits _{i = 1}^{\left| {\mathcal {I}({{\mathbf{x}}_j})} \right| } {z_i^{xx}{v_i}(t)}. \end{aligned}$$
(4.3)

By substituting Eq. (4.3) in (4.2), we acquire

$$\begin{aligned} \left\{ \begin{array}{l} {v_j}(t) = \displaystyle \sum \limits _{i = 1}^{\left| {\mathcal{I}({\mathbf {x}_j})} \right| } {w_i^{xx}{u_i}(t)} ,\\ \dfrac{{\mathrm{d}{u_j}(t)}}{{\mathrm{d}t}} = - \gamma \displaystyle \sum \limits _{i = 1}^{\left| {\mathcal{I}({\mathbf {x}_j})} \right| } {z_i^{xx}{v_i}(t)} + {v_j}(t) - g({u_j}(t)), \end{array} \right. \end{aligned}$$
(4.4)

for \(j=1,2,\ldots ,N\). Finally, the matrix-vector form of (4.4) is written as

$$\begin{aligned} \left\{ \begin{array}{l} \vec {\mathbf {v}}(t) = {\mathbf {W}_{xx}}\vec {\mathbf {u}} (t),\\ \dfrac{{\mathrm{d}\vec {\mathbf {u}}(t)}}{{\mathrm{d}t}} = - \gamma {\mathbf {Z}_{xx}}\vec {\mathbf {v}}(t) + \vec {\mathbf {v}}(t) - g(\vec {\mathbf {u}}(t)), \end{array} \right. \end{aligned}$$
(4.5)

where

$$\begin{aligned}&\mathbf {u}(t) = {\left[ {\begin{array}{*{20}{c}} {{u_1}(t)}&{{u_2}(t)}&{...}&{{u_{N - 1}}(t)}&{\left. {{u_N}(t)} \right] } \end{array}} \right. ^T},\\&\mathbf {v}(t) = {\left[ {\begin{array}{*{20}{c}} {{v_1}(t)}&{{v_2}(t)}&{...}&{{v_{N - 1}}(t)}&{\left. {{v_N}(t)} \right] } \end{array}} \right. ^T}. \end{aligned}$$

4.1.1 Time discretization

So far, we have discretized the spatial derivatives of EFK equation by the RBF–FD method and have arrived at the system of (4.5). In the following, the full discretization of the 1-D EFK equation is introduced in Algorithm 4.

figure d

4.2 The two-dimensional EFK equation

The two-dimensional EFK equation

$$\begin{aligned} {u_t} + \gamma {\Delta ^2}u - \Delta u + g(u) = 0, \end{aligned}$$
(4.6)

may be rewritten as the following system:

$$\begin{aligned} \left\{ {\begin{array}{*{20}{l}} {v = \dfrac{{{\partial ^2}u}}{{\partial {x^2}}} + \dfrac{{{\partial ^2}u}}{{\partial {y^2}}},}\\ {\dfrac{{\partial u}}{{\partial t}} = - \gamma \left( {\dfrac{{{\partial ^2}v}}{{\partial {x^2}}} + \dfrac{{{\partial ^2}v}}{{\partial {y^2}}}} \right) + v - g(u).} \end{array}} \right. \end{aligned}$$
(4.7)

From Eq. (2.1), we consider the approximation of second-order derivatives with respect to x as

$$\begin{aligned}&\frac{{{\partial ^2}u({\mathbf {x}_j},t)}}{{\partial {x^2}}} = \sum \limits _{i = 1}^{\left| {\mathcal {I}({{\mathbf{x}}_j})} \right| } {w_i^{xx}{u_i}(t)}, \nonumber \\&\frac{{{\partial ^2}v({\mathbf {x}_j},t)}}{{\partial {x^2}}} = \sum \limits _{i = 1}^{\left| {\mathcal {I}({{\mathbf{x}}_j})} \right| } {z_i^{xx}{v_i}(t)}, \end{aligned}$$
(4.8)

and similarly with respect to y as

$$\begin{aligned}&\frac{{{\partial ^2}u({{\mathbf{x}}_j},t)}}{{\partial {y^2}}} = \sum \limits _{i = 1}^{\left| {\mathcal{I}({{\mathbf{x}}_j})} \right| } {w_i^{yy}{u_i}(t)} ,\nonumber \\&\frac{{{\partial ^2}v({{\mathbf{x}}_j},t)}}{{\partial {y^2}}} = \sum \limits _{i = 1}^{\left| {\mathcal{I}({{\mathbf{x}}_j})} \right| } {z_i^{yy}{v_i}(t)}. \end{aligned}$$
(4.9)

By substituting Eqs. (4.8) and (4.9) in (4.7), the following system was obtained

$$\begin{aligned} \left\{ {\begin{array}{*{20}{l}} {{v_j}(t) = \displaystyle \sum \limits _{i = 1}^{\left| {\mathcal {I}({{\mathbf{x}}_j})} \right| } {w_i^{xx}{u_i}(t) + \displaystyle \sum \limits _{i = 1}^{\left| {\mathcal {I}({{\mathbf{x}}_j})} \right| } {w_i^{yy}{u_i}(t)} } ,}\\ {\dfrac{{\mathrm{d}{u_j}(t)}}{{\mathrm{d}t}} = - \gamma \left( {\displaystyle \sum \limits _{i = 1}^{\left| {\mathcal {I}({{\mathbf{x}}_j})} \right| } {z_i^{xx}{v_i}(t)} + \displaystyle \sum \limits _{i = 1}^{\left| {\mathcal{I}({{\mathbf{x}}_j})} \right| } {z_i^{yy}{v_i}(t)} } \right) + {v_j}(t) - g({u_j}(t)),} \end{array}} \right. \end{aligned}$$
(4.10)

for \(j=1,2,\ldots ,N\). At the end, we can write the matrix-vector form:

$$\begin{aligned} \left\{ {\begin{array}{*{20}{l}} {\overrightarrow{\mathbf{v}} (t) = \left( {\mathbf {L}_{\mathbf {xx}}+ \mathbf {L}_{\mathbf {yy}}} \right) \overrightarrow{\mathbf{u}} (t),}\\ {\dfrac{{\mathrm{d}\overrightarrow{\mathbf{u}} (t)}}{{\mathrm{d}t}} = - \gamma \left( {\mathbf {L}_{\mathbf {xx}} + \mathbf {L}_{\mathbf {yy}}} \right) \overrightarrow{\mathbf{v}} (t) + \overrightarrow{\mathbf{v}} (t) - g(\overrightarrow{\mathbf{u}} (t)),} \end{array}} \right. \end{aligned}$$
(4.11)

in which \(\mathbf {L}_{\mathbf {xx}}\) is Kronecker product \({\mathbf{I}}\) in \(\mathbf {W}_{\mathbf {xx}}\), \({{\mathbf{L}}_{{\mathbf{yy}}}} = \mathbf {W}_{\mathbf {yy}} \otimes {\mathbf{I}}\) and

$$\begin{aligned}&\mathbf {u}(t) = {\left[ {\begin{array}{*{20}{c}} {{u_1}(t)}&{{u_2}(t)}&{...}&{{u_{N^2 - 1}}(t)}&{\left. {{u_{N^2}}(t)} \right] } \end{array}} \right. ^T}, \\&\mathbf {v}(t) = {\left[ {\begin{array}{*{20}{c}} {{v_1}(t)}&{{v_2}(t)}&{...}&{{v_{N^2 - 1}}(t)}&{\left. {{v_{N^2}}(t)} \right] } \end{array}} \right. ^T}. \end{aligned}$$

4.2.1 Time discretization

Here, Algorithm 5 is presented to illustrate the full discretization of the 2-D EFK equation.

figure e

5 Numerical results

5.1 Instance 1

As the first instance, the 1-D RLW equation (3.1) is considered with parameter \(\mu =1\). The analytic solution of this equation introduces a solitary wave as [12]

$$\begin{aligned} u(x,t) = 3d\,\mathrm {sech}^2\left( {k[x - {x_0} - vt]} \right) , \end{aligned}$$

where 3d and \(v = 1 + \varepsilon d\) represent the amplitude and velocity of the wave, respectively, and \(k = \sqrt{\dfrac{{\varepsilon d}}{{4\mu v}}}\).

We are employing the RBF–FD method for solving mentioned model with initial condition

$$\begin{aligned} u(x,0) = 3d\,\mathrm{{sec}}{\mathrm{{h}}^2}\left( {k[x - {x_0}]} \right) , \end{aligned}$$

and the boundary conditions

$$\begin{aligned} u(a,t) = u(b,t) = 0, \end{aligned}$$

in which \(x_0=0\) and \(d=0.03\) or \(d=0.1\).

The numerical solutions and absolute errors on spatial domain [−80, 100] at different final times with \(\mathrm{d}t = 0.1\), \(N=500\), \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =131 \,\,( j=1, \ldots , N)\) and d = 0.1 are plotted in Fig. 3. As shown in Fig. 3, the solitary wave moves to the right across the space interval \([-80,100]\) in the time duration [0, 20]. The purpose of Table 1 is to compare the introduced method in [64] with the RBF–FD method for the parameters \(d=0.03\) and \(\mathrm{d}t=0.1\) at different final times. In Table 2, we reported the error values and CPU time acquired by RBF–FD method with the number of points N and \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| \,\,( j=1, \ldots , N)\) at final time \(T=10\) for Instance 1. The behavior of numerical solution of Instance 1 with \(d=0.03\) and \(\mathrm{d}t=0.01\) at time period [0, 20] is demonstrated in Fig. 4.

Table 1 Comparison of the error values of the RBF–FD method with method of [64] with \(d=0.03\) for Instance 1
Table 2 Errors and CPU time acquired by the RBF–FD method with \(d=0.1\) at final time \(T=10\) for Instance 1
Fig. 3
figure 3

Illustration of approximate and exact solutions at several final times with \(N=500\), \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =131 \,\,( j=1,\ldots , N)\) and \(d=0.1\) for Instance 1

Fig. 4
figure 4

Illustration of approximate solution in time interval [0, 20] with \(N=500\), \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =131 \,\,( j=1,\ldots , N)\) and \(d=0.03\) for Instance 1

5.2 Instance 2

Here, the one-dimensional RLW equation (3.1) is investigated by considering the initial condition [64]:

$$\begin{aligned} u(x,0) = \sum \limits _{i = 1}^2 {3\,{d_i}\,\,\mathrm {sech}^2\left( {{k_i}(x - {x_i})} \right) }, \end{aligned}$$

in which \({d_i} = \dfrac{{4k_i^2}}{{1 - 4k_i^2}}\). Moreover, its boundary conditions are assumed to be zero Dirichlet. The solution of this model presents the interaction of two solitary waves. The parameters of this example are \(\varepsilon = \mu = 1\), \(k_1 =0.4\), \(k_2 =0.3\), \(x_1 =15\), and \(x_2 =35\).

We are employing the RBF–FD method to simulate the behavior of two solitary waves that are moving in opposite direction. Figure 5 presents the approximate solution in time interval [0, 25] over domain [0, 120] for Instance 2.

Fig. 5
figure 5

Illustration of solution in time interval [0, 25] with \(\mathrm{d}t=0.01, N=500\) and \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =351 \,\,( j=1, \ldots , N)\) for Instance 2

The approximate solutions of Instance 2 at different final times with \(\mathrm{d}t=0.01\), \(N=500\) and \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =341 \,\,( j=1, \ldots , N)\) are indicated in Fig. 6. As shown in Fig. 6, two waves move towards each other, collide at \(T=12\) and then pass through each other.

Fig. 6
figure 6

Graphs of approximate solution at different final times with \(\mathrm{d}t=0.01\), \(N=500\) and \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =341 \,\,( j=1, \ldots , N)\) for Instance 2

5.3 Instance 3

In this problem, we focus on the 1-D RLW equation (3.6) which has exact solution as [17]

$$\begin{aligned} u(x,y,t) = \frac{q}{2}\mathrm {sech}^2\left[ {k(x + y - {x_0} - {y_0} - vt)} \right] , \end{aligned}$$

where \(q = 3(v - 2),\,k = \dfrac{{\sqrt{q} }}{{2p}}\) and \(p = \sqrt{6v}.\)

This model is solved by employing the RBF–FD method with various values of N and \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| \,\,( j=1, \ldots , N)\) at several final times on region \(\Omega = [ - 80,100]^2\). Figure 7 indicates the approximate solution obtained by RBF–FD method with the parameters \(T=10\), \(\mathrm{d}t=0.001\), \(N=130\), \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =91\,\,( j=1, \ldots , N)\), \(v=2.2\) (right graph) and \(v=2.06\) (left graph) for Instance 3.

Fig. 7
figure 7

Graphs of the approximate solutions at \(T=10\) with \(N=130\), \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =91\,\,( j=1,\ldots , N)\) and \(\mathrm{d}t=0.001\) and \(v=2.2\) (right graph) and \(v=2.06\) (left graph) for Instance 3

We compare the introduced numerical results in [17] with the RBF–FD method for various values of N and \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| \,\,( j=1, \ldots , N)\) at \(T=10, 20\) for Instance 3 in Table 3. From Table 3, it can be concluded that the same result of [17] can be obtained by selecting fewer points.

Table 3 Comparison between the \({L_\infty }\) error norms of the RBF–FD method and method of [17] with \(v=2.06\) for Instance 3

5.4 Instance 4

In this problem, the two-dimensional RLW equation (3.6) is considered which has exact solution as [17]

$$\begin{aligned} u(x,y,t) = \sum \limits _{i = 1}^2 {\dfrac{{{q_i}}}{2}\mathrm {sech}^2\left[ {{k_i}(x + y - {x_{0i}} - {y_{0i}} - {v_i}t)} \right] } , \end{aligned}$$

where \({q_i} = 3({v_i} - 2)\), \({k_i} = \dfrac{{\sqrt{{q_i}} }}{{2{p_i}}}\) and \({p_i} = \sqrt{6{v_i}}.\)

We used the RBF–FD method for solving this model with various values of N and \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| \,\,( j=1,\ldots , N)\) on region \(\Omega = [0,120]^2\). We compare the introduced numerical results in [17] with the RBF–FD method for various values of N and \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| \,\,( j=1, \ldots , N)\) at \(T=2, 10\) for Instance 4 in Table 4. From Table 4, it can be deduced that the same results of [17] can be achieved by selecting fewer points. Figure 8 demonstrates the approximate solutions obtained from the RBF-FD method at different final times.

Fig. 8
figure 8

Graphs of the approximate solutions at several final times with \(N=80\), \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =41 \,\,( j=1, \ldots , N)\) and \(\mathrm{d}t=0.01\) for Instance 4

Table 4 Comparison between the \({L_\infty }\) error norms of the RBF–FD method and method of [17] with \(v_1=2.04\) and \(v_2=2.06\) for Instance 4

5.5 Instance 5

We consider the 3-D RLW equation as

$$\begin{aligned} {u_t} - \Delta {u_t} + \nabla. u + u.\nabla u = f(x,y,z,t),\quad \mathbf {x}=(x,y,z) \in [-1,1]^3 ,\quad \ 0< t < T, \end{aligned}$$
(5.1)

which has exact solution

$$\begin{aligned} u(x,y,z,t)=exp( - t)\,\,sin(2\pi x)\,\,sin(2\pi y)\,\,\sin (2\pi z). \end{aligned}$$
(5.2)

By substituting solution (5.2) into Eq. (5.1), we can obtain the source function f(xyzt).

Using the RBF method, we obtained approximate solutions for the model mentioned. Figure 9 demonstrates the graphs of approximate solution and its absolute error with \(\mathrm{d}t=10^{-4}\), \(N=15\) and \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =11 \,\,( j=1, \ldots , N)\) at final time \(T=1\).

Fig. 9
figure 9

Graphs of approximation solution and its absolute error applying the RBF–FD method with \(N=15\), \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =11\) and \(\mathrm{d}t=10^{-4}\) on region \([-1,1]^3\) for Instance 5

Fig. 10
figure 10

Graphs of numerical solution with \(\mathrm{d}t=0.01\), \(N=400\), \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =55\) and \(\gamma = 10^{-4}\) (right graph) and \(\gamma = 0\) (left graph) on region \([-4,4]\) at different final times for Instance 6

5.6 Instance 6

In this problem, the 1-D EFK equation (4.1) is considered with the initial condition [13, 50, 51]

$$\begin{aligned} u(x,0) = - \sin (\pi x), \quad x \in [ - 4,4], \end{aligned}$$

and the boundary conditions

$$\begin{aligned} u( - 4,t) = u(4,t) = 0,\quad t \in [0,T]. \end{aligned}$$

We found the approximate solution of Eq. (4.1) using RBF–FD method for various values of \(\gamma\). The numerical results at different final time \((T=0,0.05,0.1,0.15,0.2)\) for \(\gamma = 0, {10^{ - 4}}, {10^{ - 1}}\) are shown in Figs. 10 and 11. It is clear that the behavior of the solutions for \(\gamma = 0, {10^{ - 4}}\) is the same, while the numerical solution related to \(\gamma = {10^{ - 1}}\) decays fast to zero. Hence, the effect of \(\gamma\) is defined as the stabilization parameter for the EFK equation. These numerical results are consistent with the results obtained in [13, 50, 51].

Fig. 11
figure 11

Graphs of numerical solution with \(\mathrm{d}t=0.01\), \(N=400\), \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =55\) and \(\gamma = 0.1\) on region \([-4,4]\) at different final times for Instance 6

5.7 Instance 7

We consider the two-dimensional EFK model as

$$\begin{aligned} {u_t} + \gamma {\Delta ^2}\,u - \Delta u + g(u) = f(x,y,t),\quad (x,y) \in \Omega \subset {\mathbb {R}^2} ,\quad t \in [0,T], \end{aligned}$$
(5.3)

with

$$\begin{aligned} f(x,y,t)=\mathrm {exp}( - \mathrm {t})\,\mathrm {sin}(2\pi \mathrm {x})\,\mathrm {sin}(2\pi \mathrm {y})\left( {64\gamma {\pi ^4} + 8{\pi ^2} + \mathrm {exp}( - 2\mathrm {t})\,\mathrm {sin}{{(2\pi \mathrm {x})}^2}\,\mathrm {sin}{{(2\pi \mathrm {y})}^2} - 2} \right) . \end{aligned}$$

The exact solution of Eq. (5.3) is  [40]

$$\begin{aligned} u(x,y,t) = \exp ( - t)\sin (2\pi x)\sin (2\pi y). \end{aligned}$$
(5.4)

The initial condition can be obtained from (5.4) by substituting \(t=0\) and the boundary conditions for this problem are considered as follows:

$$\begin{aligned} u = 0,\quad \Delta u = 0. \end{aligned}$$

We solved this model with parameter \(\gamma =0.01\) using RBF–FD technique. In Table 5, the \({L_\infty }\) error and the CPU time used at final time \(T=1\) are reported with considering \(\mathrm{d}t=0.1\). Moreover, the plot of numerical solution and its contour with \(N=40, \left| {\mathcal {I}({\mathbf {x}_j})} \right| =25 \,\,( j=1, \ldots , N)\) at \(T=1\) is shown in Fig. 12.

Table 5 Comparison between \({L_\infty }\)-error and CPU Time earned by techniques introduced in [40] and RBF–FD method for Instance 7
Fig. 12
figure 12

Graphs of approximation solution and its contour using the RBF–FD method with \(N=40\), \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =25\) and \(\mathrm{d}t=0.1\) on region \([0,1] \times [0,1]\) for Instance 7

5.8 Instance 8

We consider the two-dimensional EFK equation (5.3) which has the following exact solution [40]:

$$\begin{aligned} u(x,y,t) = \exp ( - t)\exp \left( - \frac{{{{(x - 0.5)}^2}}}{\eta } - \frac{{{{(y - 0.5)}^2}}}{\eta }\right). \end{aligned}$$
(5.5)

The source term f(xyt) is obtained by substituting exact solution (5.5) into model (5.3). Moreover, the initial and boundary conditions are acquired from exact solution (5.5).

This problem is investigated with \(\gamma = \eta = 0.01\) by RBF–FD technique. The graphs of numerical solution are presented in Fig. 13. We compare the introduced numerical results in [40] with the RBF–FD method for various values of N and \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| \,\,( j=1, \ldots , N)\) at \(T=1\) for Instance 8 in Table 6.

Table 6 Comparison between \({L_\infty }\) error and CPU time earned by techniques introduced in [40] and RBF–FD method for Instance 8
Fig. 13
figure 13

Graphs of approximation solution and its contour using the RBF–FD method with \(N=40\), \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =25\) and \(\mathrm{d}t=0.1\) on region \([0,1] \times [0,1]\) for Instance 8

5.9 Instance 9

In this example, the three-dimensional case of model (4.6) is considered which has the exact solution:

$$\begin{aligned} u(x,y,z,t) = \exp ( - t)\sin (2\pi x)\sin (2\pi y)\sin (2\pi z). \end{aligned}$$
(5.6)

The initial and boundary conditions are acquired from the exact solution (5.6).

This instance in 3-D case is solved by RBF–FD method with \(\gamma =0.01\), \(N=14\), \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =7\) and \(\mathrm{d}t=0.001\) at \(T=1\). Figure 14 demonstrates various slices of the approximate solution and its absolute error.

Fig. 14
figure 14

Graphs of approximation solution (left graph) and absolute error (right graph) at \(T=1\) employing the RBF–FD method with \(N=14\), \(\left| {\mathcal {I}({\mathbf {x}_j})} \right| =7\) and \(\mathrm{d}t=0.001\) on region \([0,1] \times [0,1] \times [0,1]\) for Instance 9

6 Conclusion

This paper is devoted to solving two nonlinear equations using the RBF–FD method, which is a combination of meshless idea and finite-difference method. Unlike the finite-difference method, this method does not require any mesh generating. Rather, it is only necessary to consider a set of scattered points over the computational region of the problem. Furthermore, each differential operator of problem at a point is approximated by the values of the unknown function in the points that are in stencil of considered point. This procedure is performed for all points within the computational region. This method is examined on the one-, two-, and three-dimensional EFK equations. According to numerical results obtained for EFK equation, this method can achieve high-order accurate results compared to the recent methods. On the other hand, this method is employed to approximate the solitary waves of the one- and two-dimensional RLW equations. Numerical results show that this method can well simulate the behavior of a single solitary wave and interaction two solitary waves.