1 Introduction

As a type of nonlinear model to describe natural wave phenomena, the effective solution of nonlinear wave equations can not only help understand the motion laws of waves under nonlinear effects [1], but also promote the development of related disciplines and engineering fields, such as fluid mechanics [2], electromagnetic waves [3] and nonlinear optics [4]. Establishing accurate nonlinear wave models is an inevitable issue to study nonlinear science. However, most nonlinear problems cannot be solved analytically, and even if an analytical solution can be obtained, it often contains many limiting conditions, which restraints the practical application of nonlinear wave models [5]. Therefore, researchers have turned their attention to studying numerical solutions to solve nonlinear wave equations. When the numerical solution meets the required accuracy, it has physical significance.

There are many methods to solve the numerical solutions of nonlinear wave equations. Among them, inverse scattering method [6], straight line method based on cubic recursion relation [7], hyperbolic tangent function expansion method [8], Laplace transform method [9] are studied to obtain the approximate solution of Sine/Klein–Gordon equation. Homotopy analysis method [10, 11], optimal homotopy analysis method [12], finite difference method [13,14,15], direct meshless local Petrov-Galerkin method [16, 17] are used to study some nonlinear wave problems in engineering problems. In addition, there are numerical methods such as modified simple equation (MSE) method [18] and spectral method based on Legendere wavelet basis [19].

Lagrange interpolation is a type of polynomial interpolation that plays an important role in numerical analysis and theoretical analysis. However, as the number of interpolation nodes increases, it exhibits significant numerical instability, resulting in a sharp decrease in interpolation accuracy. To solve this problem, Berrut et al deformed the Lagrange interpolation formula and put forward the barycentric Lagrange interpolation method, which greatly improved the stability of the method [20, 21]. A modified Lagrange form and barycentric Lagrange form was used to analyze the error of the interpolation polynomial, showing that when the interpolation nodes were not selected properly, the accuracy of the barycentric Lagrange interpolation formula might be obviously lower than that of the modified Lagrange interpolation formula [22]. It was shown that computing the roots of a polynomial expressed in barycentric form via the eigenvalues of an associated companion matrix pair was numerically stable [23]. The barycentric Lagrange interpolation method was applied to solve nonlinear vibration systems [24]. Reference [25] applied the barycentric Lagrange interpolation method to solve (1+1) and (2+1)-dimensional Sine–Gordon equations. The barycentric Lagrange interpolation method and Crank-Nicolson scheme are combined to solve the two-dimensional Allen-Cahn equation [26]. In addition, the barycentric Lagrange interpolation method was used to solve telegraph equation [27], heat conduction equation [28], beam vibration equation [29], and so on.

Here, we introduce a class of (2+1) and (3+1) dimensional nonlinear wave equations. We show the (2+1) dimensional nonlinear wave equations

$$\begin{aligned} \left\{ \begin{aligned}&u_{tt}-u_{xx}-u_{yy}=F(x,y,t,u), \\&u(a,y,t)=\chi _1(y,t),\quad u(b,y,t)=\chi _2(y,t), \\&u(x,c,t)=\gamma _1(x,t),\quad u(x,d,t)=\gamma _2(x,t), \\&u(x,y,0)=\varphi (x,y),\quad u_t(x,y,0)=\phi (x,y). \end{aligned} \right. \end{aligned}$$
(1)

Where\((x,y,t)\in \Omega \times [0,T]\),\(\Omega =[a,b]\times [c,d]\), F(xytu) for a given function containing nonlinear term.

Then, we show the (3+1) dimensional nonlinear wave equations

$$\begin{aligned} \left\{ \begin{aligned}&{{u}_{tt}}-{{u}_{xx}}-{{u}_{yy}}-{{u}_{zz}}=F(x,y,z,t,u), \\&u(a,y,z,t)={{\chi }_{1}}(y,z,t),\begin{matrix} {} \\ \end{matrix}u(b,y,z,t)={{\chi }_{2}}(y,z,t), \\&u(x,c,z,t)={{\gamma }_{1}}(x,z,t),\begin{matrix} {} \\ \end{matrix}u(x,d,z,t)={{\gamma }_{2}}(x,z,t), \\&u(x,y,e,t)={{\zeta }_{1}}(x,y,t),\begin{matrix} {} \\ \end{matrix}u(x,y,f,t)={{\zeta }_{2}}(x,y,t), \\&u(x,y,z,0)=\varphi (x,y,z),\begin{matrix} {} \\ \end{matrix}{{u}_{t}}(x,y,z,0)=\phi (x,y,z). \\ \end{aligned} \right. \end{aligned}$$
(2)

Where\((x,y,z,t)\in \Omega \times [0,T]\),\(\Omega =[a,b]\times [c,d]\times [e,f]\). F(xyztu) is a given function containing nonlinear term.

There are three main sources of nonlinearity in nonlinear wave equations. The first type nonlinearity is form the nonlinearity of unknown function, the second type from of the derivative of the unknown function, and the third type form the unknown function and its derivative. We studies the second and third types of (2+1) dimensional nonlinear wave equations, and validates the effectiveness of the method proposed later in solving nonlinear wave equations with nonlinear terms of \(\sin ({{u}_{t}})\), \({{u}_{t}}\sin (u)\) and \(u_{t}^{2}\) as examples. With the (3+1) dimensional nonlinear wave equations, we study the first and third types nonlinearity, and verifies the effectiveness and computational efficiency of the method to (3+1) dimensional nonlinear wave equation with nonlinear terms \(\sin (u)\) and \({{u}^{2}}{{u}_{t}}\) as examples.

In this paper, the barycentric Lagrange interpolation method is further extended to (2+1)- and (3+1)-dimensional nonlinear wave equations with derivative and mixed nonlinear terms. In the first section, the barycentric Lagrange interpolation method for solving (2+1)- and (3+1)-dimensional nonlinear wave equations with different types of nonlinear terms is derived, and the expressions of nonlinear wave equations and the types of nonlinear terms are introduced. The second section, introduces the barycentric Lagrange interpolation and differential matrices. In the third section, we describe the direct linearization iterative schemes for (2+1)- and (3+1)-dimensional nonlinear wave equations are given. In the fourth section, we present a direct linearized iterative matrix scheme for (2+1)- and (3+1)-dimensional nonlinear wave equations. The fifth section, we describe the discretization scheme of the initial boundary condition of nonlinear wave equations and the method of applying the boundary condition. In the sixth section, we perform comparative experiments to show that the high precision and stability of this method for solving nonlinear wave equations.

2 Barycentric Lagrange Interpolation and Its Differential Matrix

2.1 Barycentric Lagrange Interpolation

if we give n different interpolation nodes \(\{{{x}_{j}},j=1,2,\ldots ,n\}\) and define the function value of u(x) at the interpolation node as \({{u}_{j}}=u({{x}_{j}})\), then the barycentric Lagrange interpolation polynomial can be represented as

$$\begin{aligned} u(x)=\sum \limits _{j=1}^{n}{\frac{\frac{{{w}_{j}}}{x-{{x}_{j}}}}{\sum \nolimits _{j=1}^{n}{\frac{{{w}_{j}}}{x-{{x}_{j}}}}}}{{u}_{j}}, \end{aligned}$$
(3)

where \({{w}_{j}}\) is the barycentric Lagrange interpolation weight function, expressed as

$$\begin{aligned}{{w}_{j}}=\frac{1}{\prod \nolimits _{k=1,k\ne j}^{n}{({{x}_{j}}-{{x}_{k}})}},j=1,2,\ldots ,n.\end{aligned}$$

If we assume \({{L}_{j}}(x)={\frac{{{w}_{j}}}{x-{{x}_{j}}}}/{\sum \nolimits _{j=1}^{n}{\frac{{{w}_{j}}}{x-{{x}_{j}}}}}\;\), the equation (3) can be abbreviated as

$$\begin{aligned} u(x)=\sum \limits _{j=1}^{n}{{{L}_{j}}(x){{u}_{j}}}, \end{aligned}$$
(4)

where \({{L}_{j}}(x)\) is the barycentric Lagrange interpolation basis function. A derivative of formula (4) is \({u}'(x)=\sum \nolimits _{j=1}^{n}{{{{{L}'}}_{j}}(x)}{{u}_{j}}\), where

$$\begin{aligned} {{{L}'}_{j}}({{x}_{i}})=\left\{ \begin{aligned} \frac{\frac{{{w}_{j}}}{{{w}_{i}}}}{{{x}_{i}}-{{x}_{j}}},i\ne j,&\\ -\sum \limits _{j=1,j\ne i}^{n}{{{{{L}'}}_{j}}({{x}_{i}}),i=j.}&\\ \end{aligned} \right. \end{aligned}$$
(5)

The recurrence formula for the higher-order derivative of the interpolation basis function \({{L}_{j}}(x)\) at the interpolation node is

$$\begin{aligned} L_{j}^{(k)}({{x}_{i}})=\left\{ \begin{array}{cl} k\left[ L_{i}^{(k-1)}({{x}_{i}}){{{{L}'}}_{j}}({{x}_{i}})-\frac{L_{j}^{(k-1)}({{x}_{i}})}{{{x}_{i}}-{{x}_{j}}} \right] &{}i\ne j,k\ge 2, \\ -\sum \limits _{j=1,j\ne i}^{n}L_{j}^{(k)}({{x}_{i}})&{} i=j,k\ge 2. \\ \end{array} \right. \end{aligned}$$
(6)

2.2 Differential Matrix

If the discrete interpolation node \(\left\{ {{x}_{i}},i=1,2,\ldots ,n \right\}\) is substituted into equation (4), the discrete form of the higher-order derivative of Eq. (4) is

$$\begin{aligned} {{u}^{(k)}}({{x}_{i}})=\sum \limits _{j=1}^{n}{L_{j}^{(k)}({{x}_{i}}){{u}_{j}},\begin{matrix} {} \\ \end{matrix}i=1,2,\ldots ,n.} \end{aligned}$$

It can be expressed in differential matrix is

$$\begin{aligned} \varvec{{u}^{(k)}}=\varvec{{D}^{(k)}}\varvec{u}, \end{aligned}$$

where \(\varvec{{u}^{(k)}}={\left[ {{u}^{(k)}}({{x}_{1}}),{{u}^{(k)}}({{x}_{2}}),\ldots ,{{u}^{(k)}}({{x}_{n}}) \right] }^{{T} }\), \(\varvec{u}={\left[ {{u}_{1}},{{u}_{2}},\ldots ,{{u}_{n}} \right] }^{{T} }\),

$$\begin{aligned}\varvec{{D}^{(k)}}=\left[ \begin{matrix} L_{1}^{(k)}({{x}_{1}}) &{} L_{2}^{(k)}({{x}_{1}}) &{} \cdots &{} L_{n}^{(k)}({{x}_{1}}) \\ L_{1}^{(k)}({{x}_{2}}) &{} L_{2}^{(k)}({{x}_{2}}) &{} \cdots &{} L_{n}^{(k)}({{x}_{2}}) \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ L_{1}^{(k)}({{x}_{n}}) &{} L_{2}^{(k)}({{x}_{2}}) &{} \cdots &{} L_{n}^{(k)}({{x}_{n}}) \\ \end{matrix} \right] , \end{aligned}$$

when \(k=0\), \({\varvec{D}^{(0)}}={\varvec{I}_{n}}\), of which \({\varvec{I}_{n}}\) is n order unit matrix. When \(k\ge 1\), the \({\varvec{D}^{(k)}}\) of the matrix elements can be inferred according to the Eqs. (5) and (6).

3 A Linearized Iterative Scheme for Nonlinear Wave Equations

3.1 (2+1) Dimensional Nonlinear Wave Equation Linearization Iterative Scheme

Considering the (2+1) dimensional nonlinear wave equation (1) with nonlinear terms \(\sin ({{u}_{t}})\), \({{u}_{t}}\sin (u)\), and \(u_{t}^{2}\), \(F(x,y,t,u)=f(x,y,t)-g(u)\), where g(u) is a nonlinear term function, the wave equation can be abbreviated as

$$\begin{aligned} {{u}_{tt}}-{{u}_{xx}}-{{u}_{yy}}+g(u)=f(x,y,t). \end{aligned}$$
(7)

Any given iterative initial value function \({{u}^{*}}\) can be directly substituted into the nonlinear term g(u) of Eq. (7) to obtain a directly linearized equation

$$\begin{aligned} {{u}_{tt}}-{{u}_{xx}}-{{u}_{yy}}+g({{u}^{*}})=f(x,y,t). \end{aligned}$$
(8)

By a given transformation \(u\rightarrow {{u}^{\omega }}\), \({{u}^{*}}\rightarrow {{u}^{\omega -1}}\) (\(\omega \in {{N}^{+}}\) indicates the number of iterations), we can construct a direct linearization iterative format for Eq. (8) as

$$\begin{aligned} u_{tt}^{(\omega )}-u_{xx}^{(\omega )}-u_{yy}^{(\omega )}=f(x,y,t)-g({{u}^{(\omega -1)}}). \end{aligned}$$
(9)

Therefore, for the nonlinear terms \(\sin ({{u}_{t}})\), \({{u}_{t}}\sin (u)\) and \(u_{t}^{2}\), the direct linearization iterative formats are described as follows:

$$\begin{aligned} u_{tt}^{(\omega )}-u_{xx}^{(\omega )}-u_{yy}^{(\omega )}= & {} f(x,y,t)-\sin (u_{t}^{(\omega -1)}), \end{aligned}$$
(10)
$$\begin{aligned} u_{tt}^{(\omega )}-u_{xx}^{(\omega )}-u_{yy}^{(\omega )}= & {} f(x,y,t)-u_{t}^{(\omega -1)}\sin ({{u}^{(\omega -1)}}), \end{aligned}$$
(11)
$$\begin{aligned} u_{tt}^{(\omega )}-u_{xx}^{(\omega )}-u_{yy}^{(\omega )}= & {} f(x,y,t)-{{(u_{t}^{2})}^{(\omega -1)}}. \end{aligned}$$
(12)

3.2 ((3+1) Dimensional Nonlinear Wave Equation Linearization Iterative Scheme

Considering the (3+1) dimensional nonlinear wave equation (2) with nonlinear terms \(\sin (u)\) and \({{u}^{2}}{{u}_{t}}\), let \(F(x,y,z,t,u)=f(x,y,z,t)-g(u)\), where g(u) is a nonlinear term function, the wave equation can be abbreviated as

$$\begin{aligned} {{u}_{tt}}-{{u}_{xx}}-{{u}_{yy}}-{{u}_{zz}}+g(u)=f(x,y,z,t). \end{aligned}$$
(13)

The direct linearization iterative formats for the (3+1) dimensional wave equation with nonlinear terms \(\sin (u)\) and \({{u}^{2}}{{u}_{t}}\) are as follows

$$\begin{aligned} u_{tt}^{(\omega )}-u_{xx}^{(\omega )}-u_{yy}^{(\omega )}-u_{zz}^{(\omega )}= & {} f(x,y,z,t)-\sin ({{u}^{(\omega -1)}}), \end{aligned}$$
(14)
$$\begin{aligned} u_{tt}^{(\omega )}-u_{xx}^{(\omega )}-u_{yy}^{(\omega )}-u_{zz}^{(\omega )}+u_{t}^{(\omega )}= & {} f(x,y,z,t)+{{({{u}^{2}}{{u}_{t}})}^{(\omega -1)}}. \end{aligned}$$
(15)

4 Matrix Format for Nonlinear Wave Equations

Let the function u(xyt), where \((x,y,t)\in \Omega \times [0,T]\), \(\Omega =[a,b]\times [c,d]\), continuously differentiable over the defined domain. On the x-axis, set m interpolation nodes \({{x}_{i}}({{x}_{1}}=a,{{x}_{m}}=b)\), on the y-axis set n interpolation nodes \({{y}_{j}}({{y}_{1}}=c,{{y}_{n}}=d)\), and in the time domain, set h interpolation nodes \({{t}_{k}}({{t}_{1}}=0,{{t}_{h}}=T)\). Using the tensor product method, construct interpolation nodes \(({{x}_{i}},{{y}_{j}},{{t}_{k}}),\) \((i=1,\ldots ,m;j=1,\ldots ,n;k=1,\ldots ,h)\) on the domain \(\Omega \times [0,T]\). The function u(xyt) evaluated at the nodes \(({{x}_{i}},{{y}_{j}},{{t}_{k}})\) is denoted as \(u({{x}_{i}},{{y}_{j}},{{t}_{k}})\), abbreviated as \({{u}_{i,j,k}}\).

Using the tensor product form of the three dimensional barycentric Lagrange interpolation formula, the barycentric Lagrange interpolation of a three variable function can be written as

$$\begin{aligned} u(x,y,t)=\sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{k=1}^{h}{{{L}_{i}}(x){{M}_{j}}(y){{T}_{k}}(t){{u}_{i,j,k}}}}}, \end{aligned}$$
(16)

where

$$\begin{aligned} {{L}_{i}}(x)= & {} {\frac{{{\omega }_{i}}}{x-{{x}_{i}}}}/{\sum \limits _{p=1}^{m}{\frac{{{\omega }_{p}}}{x-{{x}_{p}}}}}\;{{\omega }_{i}}=\frac{1}{\prod \nolimits _{i\ne p}{({{x}_{i}}-{{x}_{p}})}},i=1,2,\ \ldots ,m,\\ {{M}_{j}}(y)= & {} {\frac{{{\nu }_{j}}}{y-{{y}_{j}}}}/{\sum \limits _{q=1}^{n}{\frac{{{\nu }_{q}}}{x-{{x}_{q}}}}},{{\nu }_{j}}=\frac{1}{\prod \nolimits _{j\ne q}{({{y}_{j}}-{{y}_{q}})}},j=1,2,\ \ldots ,n,\\ {{T}_{k}}(t)= & {} {\frac{{{\tau }_{k}}}{t-{{t}_{k}}}}/{\sum \limits _{r=1}^{h}{\frac{{{\tau }_{r}}}{t-{{t}_{r}}}}},{{\tau }_{k}}=\frac{1}{\prod \nolimits _{k\ne r}{({{t}_{k}}-{{t}_{r}})}},r=1,2,\ \ldots ,h, \end{aligned}$$

is the barycentric Lagrange interpolation basis function and weight function.

The \({{g}_{1}}+{{g}_{2}}+{{g}_{3}}\) derivative of the Eq. (16) can be expressed as

$$\begin{aligned} {{u}^{({{g}_{1}}+{{g}_{2}}+{{g}_{3}})}}(x,y,t)=\sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{k=1}^{h}{L_{i}^{({{g}_{1}})}(x)M_{j}^{({{g}_{2}})}(y)T_{k}^{({{g}_{3}})}(t){{u}_{i,j,k}}}}}, \end{aligned}$$
(17)

therefore, the function value of Eq. (17) at the interpolation node \(({{x}_{p}},{{y}_{q}},{{t}_{r}})\), \(p=1,\ldots ,m\), \(q=1,\ldots ,n\), \(r=1,\ldots ,h\) is discretized as

$$\begin{aligned} {{u}^{({{g}_{1}}+{{g}_{2}}+{{g}_{3}})}}({{x}_{p}},{{y}_{q}},{{t}_{r}})=\sum \limits _{p=1}^{m}{\sum \limits _{q=1}^{n}{\sum \limits _{r=1}^{h}{L_{i}^{({{g}_{1}})}({{x}_{p}})M_{j}^{({{g}_{2}})}({{y}_{q}})T_{k}^{({{g}_{3}})}({{t}_{r}}){{u}_{i,j,k}}}}.} \end{aligned}$$
(18)

The matrix form of Eq. (18) is given by

$$\begin{aligned} \varvec{U}^{(\varvec{g}_{\varvec{1}}+\varvec{g}_{\varvec{2}}+\varvec{g}_{\varvec{3}})}=((\varvec{D}_{{}}^{(\varvec{{g}_{\varvec{1}}}\varvec{00})}\otimes \varvec{E}_{{}}^{(\varvec{0}\varvec{{g}_{2}}\varvec{0})})\otimes \varvec{C}_{{}}^{(\varvec{00}\varvec{{g}_{3}})})\varvec{U},\forall \varvec{{g}_{1}},\varvec{{g}_{2}},\varvec{{g}_{3}}\in N, \end{aligned}$$
(19)

where

$$\begin{aligned} {\varvec{D}^{(\varvec{{g}_{1}00)}}}= & {} \left[ \begin{matrix} L_{1}^{({{g}_{1}})}({{x}_{1}}) &{} L_{2}^{({{g}_{1}})}({{x}_{1}}) &{} \cdots &{} L_{m}^{({{g}_{1}})}({{x}_{1}}) \\ L_{1}^{({{g}_{1}})}({{x}_{2}}) &{} L_{2}^{({{g}_{1}})}({{x}_{2}}) &{} \cdots &{} L_{m}^{({{g}_{1}})}({{x}_{2}}) \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ L_{1}^{({{g}_{1}}}({{x}_{m}}) &{} L_{2}^{({{g}_{1}})}({{x}_{m}}) &{} \cdots &{} L_{m}^{({{g}_{1}})}({{x}_{m}}) \\ \end{matrix} \right] ,\\ {\varvec{E}^{(\varvec{{g}_{1}00})}}= & {} \left[ \begin{matrix} M_{1}^{({{g}_{2}})}({{y}_{1}}) &{} M_{2}^{({{g}_{2}})}({{y}_{1}}) &{} \cdots &{} M_{n}^{({{g}_{2}})}({{y}_{1}}) \\ M_{1}^{({{g}_{2}})}({{y}_{2}}) &{} M_{2}^{({{g}_{2}})}({{y}_{2}}) &{} \cdots &{} M_{n}^{({{g}_{2}})}({{y}_{2}}) \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ M_{1}^{({{g}_{2}})}({{y}_{n}}) &{} M_{2}^{({{g}_{2}})}({{y}_{n}}) &{} \cdots &{} M_{n}^{({{g}_{2}})}({{y}_{n}}) \\ \end{matrix} \right] ,\\ {\varvec{C}^{\varvec{(00{g}_{3})}}}= & {} \left[ \begin{matrix} T_{1}^{({{g}_{3}})}({{t}_{1}}) &{} T_{2}^{({{g}_{3}})}({{t}_{1}}) &{} \cdots &{} T_{h}^{({{g}_{3}})}({{t}_{1}}) \\ T_{1}^{({{g}_{3}})}({{t}_{2}}) &{} T_{2}^{({{g}_{3}})}({{t}_{2}}) &{} \cdots &{} T_{h}^{({{g}_{3}})}({{t}_{2}}) \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ T_{1}^{({{g}_{3}})}({{t}_{h}}) &{} T_{2}^{({{g}_{3}})}({{t}_{h}}) &{} \cdots &{} T_{h}^{({{g}_{3}})}({{t}_{h}}) \\ \end{matrix} \right] . \end{aligned}$$

Therefore, the matrix

$$\begin{aligned} {(\varvec{D}_{{}}^{(\varvec{{g}_{1}}\varvec{00})}\otimes \varvec{E}_{{}}^{(\varvec{0}\varvec{{g}_{2}}\varvec{0})})\otimes \varvec{C}_{{}}^{(\varvec{00}\varvec{{g}_{3}})},} \end{aligned}$$

is an \(mnh\times mnh\) dimensions, and when \(\varvec{{g}_{1}}=\varvec{{g}_{2}}=\varvec{{g}_{3}}=0\), we define \(\varvec{D}_{{}}^{(\varvec{{g}_{1}}\varvec{00})}={\varvec{I}_{m}}\), \(\varvec{E}_{{}}^{(\varvec{0}\varvec{{g}_{2}}\varvec{0})}={\varvec{I}_{n}}\), \(\varvec{C}_{{}}^{(\varvec{00}\varvec{{g}_{3}})}={\varvec{I}_{h}}\), where \(\quad {\varvec{I}_{m}}\), \({\varvec{I}_{n}}, {\varvec{I}_{h}}\) represents m-dimensional, n-dimensional, h-dimensional identity matrices, respectively. Here \(\otimes\) represents the Kronecker product between matrices, and \(\varvec{D}_{{}}^{(\varvec{{g}_{1}}\varvec{00})},\varvec{E}_{{}}^{(\varvec{0}\varvec{{g}_{2}}\varvec{0})},\varvec{C}_{{}}^{(\varvec{00}\varvec{{g}_{3}})}\) represents the differential matrices of xyt respectively.

4.1 (2+1) Dimensional Nonlinear Wave Equation in Direct Linearized Iterative Matrix Format

By combining (16) and (10), we can obtain

$$\begin{aligned} \begin{aligned} \sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{k=1}^{h}{\left[ {{L}_{i}}(x){{M}_{j}}(y){{{{T}''}}_{k}}(t)-{{{{L}''}}_{i}}(x){{M}_{j}}(y){{T}_{k}}(t)-{{L}_{i}}(x){{{{M}''}}_{j}}(y){{T}_{k}}(t) \right] }}}u_{i,j,k}^{(\omega )}&\\ =f(x,y,t)-\sin (u_{t}^{(\omega -1)}),&\\ \end{aligned} \end{aligned}$$
(20)

by substituting the interpolation nodes \(({{x}_{p}},{{y}_{q}},{{t}_{r}})\) into (20), we can obtain

$$\begin{aligned} \begin{aligned} \sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{k=1}^{h}{\left[ {{L}_{i}}({{x}_{p}}){{M}_{j}}({{y}_{q}}){{{{T}''}}_{k}}({{t}_{r}})-{{{{L}''}}_{i}}({{x}_{p}}){{M}_{j}}({{y}_{q}}){{T}_{k}}({{t}_{r}})-{{L}_{i}}({{x}_{p}}){{{{M}''}}_{j}}({{y}_{q}}){{T}_{k}}({{t}_{r}}) \right] }}}u_{i,j,k}^{(\omega )}&\\ =f({{x}_{p}},{{y}_{q}},{{t}_{r}})-\sin (u_{t}^{(\omega -1)}({{x}_{p}},{{y}_{q}},{{t}_{r}})).&\\ \end{aligned} \end{aligned}$$
(21)

The Eq. (21) can be written in matrix form as

$$\begin{aligned}{} & {} \left[ (\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{C}^{(002)}}-(\varvec{{D}^{(200)}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{h}}-(\varvec{{I}_{m}}\otimes \varvec{{E}^{(020)}})\otimes \varvec{{I}_{h}} \right] {\varvec{U}^{({\varvec{\omega }} )}}\nonumber \\{} & {} \quad =\varvec{f}-\text {sin(}{\varvec{U}_{t}}^{{(\varvec{\omega -1})}}\text {)}, \end{aligned}$$
(22)

where

$$\begin{aligned} {\varvec{U}^{({\varvec{\omega }} )}}={{\left[ \begin{matrix} u_{111}^{(\omega )} &{} \cdots &{} u_{11h}^{(\omega )} &{} u_{121}^{(\omega )} &{} \cdots &{} u_{1nh}^{(\omega )} &{} u_{211}^{(\omega )} &{} \cdots &{} u_{mnh}^{(\omega )} \\ \end{matrix} \right] }^{T},} \end{aligned}$$
$$\begin{aligned} \varvec{f}={{\left[ \begin{matrix} {{f}_{111}} &{} \cdots &{} {{f}_{11h}} &{} {{f}_{121}} &{} \cdots &{} {{f}_{1nh}} &{} {{f}_{211}} &{} \cdots &{} {{f}_{mnh}} \\ \end{matrix} \right] }^{T},} \end{aligned}$$
$$\begin{aligned}\text {sin(}{\varvec{U}_{t}}^{({\varvec{\omega -1}})}\text {)}=\left[ \begin{matrix} \sin ({{u}_{t,}}_{111}^{(\omega -1)}) &{} \cdots &{} \sin ({{u}_{t}}_{,11h}^{(\omega -1)}) &{} \sin (u_{t,121}^{(\omega -1)}) &{} \cdots &{} \sin (u_{t,1nh}^{(\omega -1)}) &{} \cdots &{} \sin (u_{t,mnh}^{(\omega -1)}) \\ \end{matrix} \right] . \end{aligned}$$

Equation (22) can be abbreviated as

$$\begin{aligned} {\varvec{L}}{\varvec{U}^{(\omega )}}=\varvec{f}-\sin (\varvec{U}_{t}^{({\varvec{\omega -1}})}), \end{aligned}$$
(23)

where

$$\begin{aligned} \varvec{L}=(\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{C}^{(002)}}-(\varvec{{D}^{(200)}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{h}}-(\varvec{{I}_{m}}\otimes \varvec{{E}^{(020)}})\otimes \varvec{{I}_{h}}. \end{aligned}$$

By combining (16) and (11), we can obtain

$$\begin{aligned} \begin{aligned} \sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{k=1}^{h}{\left[ {{L}_{i}}(x){{M}_{j}}(y){{{{T}''}}_{k}}(t)-{{{{L}''}}_{i}}(x){{M}_{j}}(y){{T}_{k}}(t)-{{L}_{i}}(x){{{{M}''}}_{j}}(y){{T}_{k}}(t) \right] }}}u_{i,j,k}^{(\omega )}&\\ =f(x,y,t)-u_{t}^{(\omega -1)}\sin ({{u}^{(\omega -1)}}),&\\ \end{aligned} \end{aligned}$$
(24)

by substituting the interpolation nodes \(({{x}_{p}},{{y}_{q}},{{t}_{r}})\) into Eq. (24), we can obtain

$$\begin{aligned} \begin{aligned} \sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{k=1}^{h}{\left[ {{L}_{i}}({{x}_{p}}){{M}_{j}}({{y}_{q}}){{{{T}''}}_{k}}({{t}_{r}})-{{{{L}''}}_{i}}({{x}_{p}}){{M}_{j}}({{y}_{q}}){{T}_{k}}({{t}_{r}})-{{L}_{i}}({{x}_{p}}){{{{M}''}}_{j}}({{y}_{q}}){{T}_{k}}({{t}_{r}}) \right] }}}u_{i,j,k}^{(\omega )}&\\ =f({{x}_{p}},{{y}_{q}},{{t}_{r}})-u_{t}^{(\omega -1)}({{x}_{p}},{{y}_{q}},{{t}_{r}})\sin (u_{{}}^{(\omega -1)}({{x}_{p}},{{y}_{q}},{{t}_{r}})).&\\ \end{aligned} \end{aligned}$$
(25)

The system of equations (25) can be written in matrix form as

$$\begin{aligned}{} & {} \left[ (\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{C}^{(002)}}-(\varvec{{D}^{(200)}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{h}}-\varvec{(}{{I}_{m}}\otimes \varvec{{E}^{(020)}})\otimes \varvec{{I}_{h}} \right] {\varvec{U}^{(\varvec{\omega } )}}\nonumber \\{} & {} \quad =\varvec{f}-\varvec{U}_{t}^{(\varvec{\omega -1})}\text {sin(}{\varvec{U}_{{}}}^{(\varvec{\omega -1})}\text {)}, \end{aligned}$$
(26)

abbreviated as

$$\begin{aligned} \varvec{L}{\varvec{U}^{(\omega )}}=\varvec{f}-\varvec{U}_{t}^{(\varvec{\omega -1})}\text {sin(}{\varvec{U}_{{}}}^{(\varvec{\omega -1})}\text {)}, \end{aligned}$$
(27)

where

$$\begin{aligned} \varvec{L}=(\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{C}^{(002)}}-(\varvec{{D}^{(200)}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{h}}-(\varvec{{I}_{m}}\otimes \varvec{{E}^{(020)}})\otimes \varvec{{I}_{h}}. \end{aligned}$$

By combining Eqs. (16) and (12) and substituting the interpolation nodes \(({{x}_{p}},{{y}_{q}},{{t}_{r}})\), we can obtain

$$\begin{aligned} \begin{aligned} \sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{k=1}^{h}{\left[ {{L}_{i}}({{x}_{p}}){{M}_{j}}({{y}_{q}}){{{{T}''}}_{k}}({{t}_{r}})-{{{{L}''}}_{i}}({{x}_{p}}){{M}_{j}}({{y}_{q}}){{T}_{k}}({{t}_{r}})-{{L}_{i}}({{x}_{p}}){{{{M}''}}_{j}}({{y}_{q}}){{T}_{k}}({{t}_{r}}) \right] }}}u_{i,j,k}^{(\omega )}&\\ =f({{x}_{p}},{{y}_{q}},{{t}_{r}})-{{(u_{t}^{2}({{x}_{p}},{{y}_{q}},{{t}_{r}}))}^{(\omega -1)}}.&\\ \end{aligned} \end{aligned}$$
(28)

The system of equations (28) can be written in matrix form as

$$\begin{aligned} \left[ (\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{C}^{(002)}}-(\varvec{{D}^{(200)}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{h}}-(\varvec{{I}_{m}}\otimes \varvec{{E}^{(020)}})\otimes \varvec{{I}_{h}} \right] {\varvec{U}^{(\varvec{\omega } )}}=\varvec{f}-{{(\varvec{U}_{t}^{2})}^{(\varvec{\omega -1})}}, \end{aligned}$$
(29)

and further abbreviated as

$$\begin{aligned} \varvec{L}{\varvec{U}^{(\varvec{\omega } )}}=\varvec{f}-{{(\varvec{U}_{t}^{2})}^{(\varvec{\omega -1})}}. \end{aligned}$$
(30)

The nonlinear terms \(\varvec{U}_{t}^{(\varvec{\omega -1})}\text {sin(}{\varvec{U}_{{}}}^{(\varvec{\omega -1})}\text {)}\) and \({{(\varvec{U}_{t}^{2})}^{(\varvec{\omega -1})}}\) in Eqs. (27) and (30) are

$$\begin{aligned} \varvec{U}_{t}^{(\varvec{\omega -1})}\text {sin(}{\varvec{U}_{{}}}^{(\varvec{\omega -1})}\text {)}=\left[ \begin{matrix} {{u}_{t,111}}\sin (u_{111}^{(\omega -1)}) \\ \vdots \\ {{u}_{t,11h}}\sin (u_{11h}^{(\omega -1)}) \\ {{u}_{t,121}}\sin (u_{121}^{(\omega -1)}) \\ \vdots \\ {{u}_{t,1nh}}\sin (u_{1nh}^{(\omega -1)}) \\ {{u}_{t,211}}\sin (u_{211}^{(\omega -1)}) \\ \vdots \\ {{u}_{t,mnh}}\sin (u_{mnh}^{(\omega -1)}) \\ \end{matrix} \right] ,{{(\varvec{U}_{t}^{2})}^{(\varvec{\omega -1})}}=\left[ \begin{matrix} {{(u_{t,111}^{2})}^{(\omega -1)}} \\ \vdots \\ {{(u_{t,11h}^{2})}^{(\omega -1)}} \\ {{(u_{t,121}^{2})}^{(\omega -1)}} \\ \vdots \\ {{(u_{t,1nh}^{2})}^{(\omega -1)}} \\ {{(u_{t,211}^{2})}^{(\omega -1)}} \\ \vdots \\ {{(u_{t,mnh}^{2})}^{(\omega -1)}} \\ \end{matrix} \right] , \end{aligned}$$

\({{u}_{t,ijk}}\) represents the first-order partial derivative of function u(xyt) to t, the function value at node \(({{x}_{i}},{{y}_{j}},{{t}_{k}})\), \(u_{t,ijk}^{2}\) represents the first-order partial derivative of function u(xyt) to t and the square of the function value at node \(({{x}_{i}},{{y}_{j}},{{t}_{k}})\).

4.2 (3+1) Dimensional Nonlinear Wave Equation Directly Linear Iterative Matrix Format

Let the four-dimensional function u(xyzt), \((x,y,z,t)\in \Xi \times [0,T]\), where \(\Xi =[a,b]\) \(\times [c,d]\times [e,f]\) is continuously differentiable over the defined domain. On the x-axis, we set m interpolation nodes \({{x}_{i}}({{x}_{1}}=a,{{x}_{m}}=b)\), on the y-axis, we set n interpolation nodes \({{y}_{j}}({{y}_{1}}=c,{{y}_{n}}=d)\), on the z-axis, we set s interpolation nodes \({{z}_{l}}({{z}_{1}}=e,{{z}_{s}}=f)\), in the time domain, we set h interpolation nodes \({{t}_{k}}({{t}_{1}}=0,{{t}_{h}}=T)\). Using the tensor product method, we construct interpolation nodes \(({{x}_{i}},{{y}_{j}},{{z}_{l}},{{t}_{k}}),\begin{matrix} {} \\ \end{matrix} (i=1,\ldots ,m;j=1,\ldots ,n;l=1,\ldots ,s;k=1,\ldots ,h)\) on the domain \(\Xi \times [0,T]\). The function u(xyzt) at the nodes \(({{x}_{i}},{{y}_{j}},{{z}_{l}},{{t}_{k}})\) is denoted as \(u({{x}_{i}},{{y}_{j}},{{z}_{l}},{{t}_{k}})\) and abbreviated as \({{u}_{i,j,l,k}}\).

The barycentric Lagrange interpolation of a four variable function can be written as

$$\begin{aligned} u(x,y,z,t)=\sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{l=1}^{s}{\sum \limits _{k=1}^{h}{{{L}_{i}}(x){{M}_{j}}(y){{N}_{l}}(z){{T}_{k}}(t){{u}_{i,j,l,k}}}}}}. \end{aligned}$$
(31)

By combining (31) and (14), and substituting the interpolation nodes \(({{x}_{p}},{{y}_{q}},{{z}_{v}},{{t}_{r}})\), we can obtain

$$\begin{aligned} \begin{aligned} \sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{l=1}^{s}{\sum \limits _{k=1}^{h}{\left[ {{L}_{i}}({{x}_{p}}){{M}_{j}}({{y}_{q}}){{N}_{l}}({{z}_{v}}){{{{T}''}}_{k}}({{t}_{r}})-{{{{L}''}}_{i}}({{x}_{p}}){{M}_{j}}({{y}_{q}}){{N}_{l}}({{z}_{v}}){{T}_{k}}({{t}_{r}})- \right. }}}}&\\ {{L}_{i}}({{x}_{p}}){{{{M}''}}_{j}}({{y}_{q}}){{N}_{l}}({{z}_{v}}){{T}_{k}}({{t}_{r}})\left. -{{L}_{i}}({{x}_{p}}){{M}_{j}}({{y}_{q}}){{{{N}''}}_{l}}({{z}_{v}}){{T}_{k}}({{t}_{r}}) \right] u_{i,j,l,k}^{(\omega )}&\\ =f({{x}_{p}},{{y}_{q}},{{z}_{v}},{{t}_{r}})-\sin ({{u}^{^{(\omega -1)}}}({{x}_{p}},{{y}_{q}},{{z}_{v}},{{t}_{r}})).&\\ \end{aligned} \end{aligned}$$
(32)

Equation (32) can be written as matrix form

$$\begin{aligned} \begin{aligned} \left[ ((\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{s}})\otimes \varvec{{C}^{(0002)}}-((\varvec{{D}^{(2000)}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{s}})\otimes \varvec{{I}_{h}}-((\varvec{{I}_{m}}\otimes \varvec{{E}^{(0200)}})\otimes \varvec{{I}_{s}})\otimes \varvec{{I}_{h}} \right.&\\ \left. -((\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{G}^{(0020)}})\otimes \varvec{{I}_{h}} \right] {\varvec{U}^{(\varvec{\omega } )}}=\varvec{f}-sin({\varvec{U}^{^{(\varvec{\omega -1})}}}),&\\ \end{aligned} \end{aligned}$$
(33)

and further abbreviated as

$$\begin{aligned} \varvec{L}{\varvec{U}^{(\varvec{\omega } )}}=\varvec{f}-\sin \text {(}{\varvec{U}^{(\varvec{\omega -1})}}), \end{aligned}$$
(34)

where

$$\begin{aligned}\begin{aligned} \varvec{L}=((\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{s}})\otimes \varvec{{C}^{(0002)}}-((\varvec{{D}^{(2000)}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{s}})\otimes \varvec{{I}_{h}}-((\varvec{{I}_{m}}\otimes \varvec{{E}^{(0200)}})\otimes \varvec{{I}_{s}})\otimes \varvec{{I}_{h}}&\\ -((\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{G}^{(0020)}})\otimes \varvec{{I}_{h}}.&\\ \end{aligned}\end{aligned}$$

By combining (31) and (15), and substituting the interpolation nodes \(({{x}_{p}},{{y}_{q}},{{z}_{v}},{{t}_{r}})\), we can obtain

$$\begin{aligned} \begin{aligned} \sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{l=1}^{s}{\sum \limits _{k=1}^{h}{\left[ {{L}_{i}}({{x}_{p}}){{M}_{j}}({{y}_{q}}){{N}_{l}}({{z}_{v}}){{{{T}''}}_{k}}({{t}_{r}})-{{{{L}''}}_{i}}({{x}_{p}}){{M}_{j}}({{y}_{q}}){{N}_{l}}({{z}_{v}}){{T}_{k}}({{t}_{r}})- \right. }}}}&\\ {{L}_{i}}({{x}_{p}}){{{{M}''}}_{j}}({{y}_{q}}){{N}_{l}}({{z}_{v}}){{T}_{k}}({{t}_{r}})-{{L}_{i}}({{x}_{p}}){{M}_{j}}({{y}_{q}}){{{{N}''}}_{l}}({{z}_{v}}){{T}_{k}}({{t}_{r}})+{{L}_{i}}({{x}_{p}}){{M}_{j}}({{y}_{q}}){{N}_{l}}({{z}_{v}}){{{{T}'}}_{k}}({{t}_{r}})&\\ \left. {} \right] u_{i,j,l,k}^{(\omega )}=f({{x}_{p}},{{y}_{q}},{{z}_{v}},{{t}_{r}})+{{({{u}^{2}}({{x}_{p}},{{y}_{q}},{{z}_{v}},{{t}_{r}}){{u}_{t}}({{x}_{p}},{{y}_{q}},{{z}_{v}},{{t}_{r}}))}^{(\omega -1)}}.&\\ \end{aligned} \end{aligned}$$
(35)

Equation (35) can be written as matrix form

$$\begin{aligned} \begin{aligned} \left[ ((\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{s}})\otimes \varvec{{C}^{(0002)}}-((\varvec{{D}^{(2000)}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{s}})\otimes \varvec{{I}_{h}}-((\varvec{{I}_{m}}\otimes \varvec{{E}^{(0200)}})\otimes \varvec{{I}_{s}})\otimes \varvec{{I}_{h}} \right.&\\ \left. -((\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{G}^{(0020)}})\otimes \varvec{{I}_{h}}+((\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{s}})\otimes \varvec{{C}^{(0001)}} \right] {\varvec{U}^{({\varvec{\omega }} )}}=\varvec{f}+{{(\varvec{{U}^{2}}{\varvec{U}_{t}})}^{({\varvec{\omega -1}})}},&\\ \end{aligned} \end{aligned}$$
(36)

and further abbreviated as

$$\begin{aligned} \varvec{L}{\varvec{U}^{({\varvec{\omega }} )}}=\varvec{f}+{{({\varvec{U}^{2}}{\varvec{U}_{t}})}^{({\varvec{\omega -1}})}}, \end{aligned}$$
(37)

where

$$\begin{aligned} \begin{aligned} \varvec{L}=((\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{s}})\otimes \varvec{{C}^{(0002)}}-((\varvec{{D}^{(2000)}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{s}})\otimes \varvec{{I}_{h}}-((\varvec{{I}_{m}}\otimes \varvec{{E}^{(0200)}})\otimes \varvec{{I}_{s}})\otimes \varvec{{I}_{h}}&\\ -((\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{G}^{(0020)}})\otimes \varvec{{I}_{h}}+((\varvec{{I}_{m}}\otimes \varvec{{I}_{n}})\otimes \varvec{{I}_{s}})\otimes \varvec{{C}^{(0001)}}.&\\ \end{aligned} \end{aligned}$$

5 The Discrete Initial Conditions and Boundary Conditions

Considering Eq. (2) the initial conditions

$$\begin{aligned} u(x,y,z,0)=\varphi (x,y,z), \quad \begin{matrix} {} \\ \end{matrix}{{u}_{t}}(x,y,z,0)=\phi (x,y,z), \end{aligned}$$
(38)

and the boundary conditions of x

$$\begin{aligned} u(a,y,z,t)={{\chi }_{1}}(y,z,t), \quad \begin{matrix} {} \\ \end{matrix}u(b,y,z,t)={{\chi }_{2}}(y,z,t), \end{aligned}$$
(39)

and the boundary conditions of y

$$\begin{aligned} u(x,c,z,t)={{\gamma }_{1}}(x,z,t),\quad \begin{matrix} {} \\ \end{matrix}u(x,d,z,t)={{\gamma }_{2}}(x,z,t), \end{aligned}$$
(40)

and the boundary conditions of z

$$\begin{aligned} u(x,y,e,t)={{\zeta }_{1}}(x,y,t),\quad \begin{matrix} {} \\ \end{matrix}u(x,y,f,t)={{\zeta }_{2}}(x,y,t). \end{aligned}$$
(41)

Employing the barycentric Lagrange interpolation formula (44), we can approximate Eqs. (38)–(41), and get the discrete expression of (38)

$$\begin{aligned} u(x,y,z,0)=\sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{l=1}^{s}{\sum \limits _{k=1}^{h}{{{L}_{i}}(x){{M}_{j}}(y){{N}_{l}}(z){{T}_{k}}(0){{u}_{i,j,l,k}}}}}}=\varphi (x,y,z), \end{aligned}$$
$$\begin{aligned} {{u}_{t}}(x,y,z,0)=\sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{l=1}^{s}{\sum \limits _{k=1}^{h}{{{L}_{i}}(x){{M}_{j}}(y){{N}_{l}}(z){{{{T}'}}_{k}}(0){{u}_{i,j,l,k}}}}}}=\phi (x,y,z). \end{aligned}$$
(42)

Discrete expression of (39)

$$\begin{aligned} u(a,y,z,t)=\sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{l=1}^{s}{\sum \limits _{k=1}^{h}{{{L}_{i}}(a){{M}_{j}}(y){{N}_{l}}(z){{T}_{k}}(t){{u}_{i,j,l,k}}}}}}={{\chi }_{1}}(y,z,t), \end{aligned}$$
$$\begin{aligned} u(b,y,z,t)=\sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{l=1}^{s}{\sum \limits _{k=1}^{h}{{{L}_{i}}(b){{M}_{j}}(y){{N}_{l}}(z){{T}_{k}}(t){{u}_{i,j,l,k}}}}}}={{\chi }_{2}}(y,z,t). \end{aligned}$$
(43)

Discrete expression of (40)

$$\begin{aligned} u(x,c,z,t)=\sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{l=1}^{s}{\sum \limits _{k=1}^{h}{{{L}_{i}}(x){{M}_{j}}(c){{N}_{l}}(z){{T}_{k}}(t){{u}_{i,j,l,k}}}}}}={{\gamma }_{1}}(x,z,t), \end{aligned}$$
$$\begin{aligned} u(x,d,z,t)=\sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{l=1}^{s}{\sum \limits _{k=1}^{h}{{{L}_{i}}(x){{M}_{j}}(d){{N}_{l}}(z){{T}_{k}}(t){{u}_{i,j,l,k}}}}}}={{\gamma }_{2}}(x,z,t). \end{aligned}$$
(44)

Discrete expression of (41)

$$\begin{aligned}u(x,y,e,t)=\sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{l=1}^{s}{\sum \limits _{k=1}^{h}{{{L}_{i}}(x){{M}_{j}}(y){{N}_{l}}(e){{T}_{k}}(t){{u}_{i,j,l,k}}}}}}={{\zeta }_{1}}(x,y,t),\end{aligned}$$
$$\begin{aligned} u(x,y,f,t)=\sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{l=1}^{s}{\sum \limits _{k=1}^{h}{{{L}_{i}}(x){{M}_{j}}(y){{N}_{l}}(f){{T}_{k}}(t){{u}_{i,j,l,k}}}}}}={{\zeta }_{2}}(x,y,t). \end{aligned}$$
(45)

Similarly, the discrete format of the initial condition (42) can be expressed in a matrix form as

$$\begin{aligned} \left[ \varvec{{I}_{m}}\otimes \varvec{{I}_{n}}\otimes \varvec{{I}_{s}}\otimes \varvec{{I}_{h1}} \right] \varvec{u}=\varvec{\varphi },\left[ \varvec{{I}_{m}}\otimes \varvec{{I}_{n}}\otimes \varvec{{I}_{s}}\otimes \varvec{C}_{{\varvec{t1}}}^{\varvec{(1)}} \right] \varvec{u}=\varvec{\phi }, \end{aligned}$$
(46)

where

$$\begin{aligned} \varvec{\varphi }= & {} {{\left[ \varphi ({{x}_{1}},{{y}_{1}},{{z}_{1}}),\ldots ,\varphi ({{x}_{1}},{{y}_{1}},{{z}_{s}}),\ldots ,\ldots ,\varphi ({{x}_{m}},{{y}_{n}},{{z}_{s}}) \right] }^{T}}, \\ \varvec{\phi }= & {} {{\left[ \phi ({{x}_{1}},{{y}_{1}},{{z}_{1}}),\ldots ,\phi ({{x}_{1}},{{y}_{1}},{{z}_{s}}),\ldots ,\ldots ,\phi ({{x}_{m}},{{y}_{n}},{{z}_{s}}) \right] }^{T}}, \end{aligned}$$

\({\varvec{I}_{{\varvec{h1}}}}\) represents the first row of the h-order identity matrix, and \(\varvec{C}_{{\varvec{t1}}}^{\varvec{(1)}}\) represents the first row of the first-order differential matrix with respect to t.

The matrix forms of equations (43)–(45) are respectively represented as

$$\begin{aligned}{} & {} \left[ \varvec{{I}_{m,1}}\otimes \varvec{{I}_{n}}\otimes \varvec{{I}_{s}}\otimes \varvec{{I}_{h}} \right] \varvec{u}={{\varvec{\chi } }_{{\varvec{1}}}},\left[ \varvec{{I}_{m,m}}\otimes \varvec{{I}_{n}}\otimes \varvec{{I}_{s}}\otimes \varvec{{I}_{h}} \right] \varvec{u}={{\varvec{\chi } }_{{\varvec{2}}}}. \end{aligned}$$
(47)
$$\begin{aligned}{} & {} \left[ \varvec{{I}_{m}}\otimes \varvec{{I}_{n,1}}\otimes \varvec{{I}_{s}}\otimes \varvec{{I}_{h}} \right] \varvec{u}={\varvec{\gamma }_{{\varvec{1}}}},\left[ \varvec{{I}_{m}}\otimes \varvec{{I}_{n,n}}\otimes \varvec{{I}_{s}}\otimes \varvec{{I}_{h}} \right] \varvec{u}={\varvec{\gamma }_{{\varvec{2}}}}. \end{aligned}$$
(48)
$$\begin{aligned}{} & {} \left[ \varvec{{I}_{m}}\otimes \varvec{{I}_{n}}\otimes \varvec{{I}_{s,1}}\otimes \varvec{{I}_{h}} \right] \varvec{u}={\varvec{\zeta }_{{\varvec{1}}}},\left[ \varvec{{I}_{m}}\otimes \varvec{{I}_{n}}\otimes \varvec{{I}_{s,s}}\otimes \varvec{{I}_{h}} \right] \varvec{u}={\varvec{\zeta }_{{\varvec{2}}}}. \end{aligned}$$
(49)

So far, we have obtained the direct linearized iterative matrix equations (23), (27), (30) for (2+1) dimensional nonlinear wave equations with nonlinear terms \(\sin ({{u}_{t}})\), \({{u}_{t}}\sin (u)\) and \(u_{t}^{2}\) respectively. The direct linearization iterative matrix equation (34), (37) for (3+1) dimensional nonlinear wave equations with nonlinear terms \(\sin (u)\) and \({{u}^{2}}{{u}_{t}}\) respectively. The matrix equations for the initial and boundary conditions are obtained from (46)–(49). Next, the boundary conditions are imposed on the nonlinear wave equation in matrix form.

In this article, we use the method of additional initial conditions and boundary conditions. The initial condition matrix format of Eq. (46) is \(\left[ \varvec{{I}_{m}}\otimes \varvec{{I}_{n}}\otimes \varvec{{I}_{s}}\otimes \varvec{{I}_{h1}} \right]\), which is directly appended below the system of nonlinear wave equations. Substituting the corresponding \(\varvec{\varphi }\) terms from Eq.  (46) results, in a system of equations with \(mnsh+mnh\) dimensions. Then, the matrix format of Eq. (46), \(\left[ \varvec{{I}_{m}}\otimes \varvec{{I}_{n}}\otimes \varvec{{I}_{s}}\otimes \varvec{C}_{\varvec{t1}}^{\varvec{(1)}} \right]\) is further appended below the system of nonlinear wave equations. Substituting the corresponding \(\varvec{\phi }\) terms from Eq. (46) results, in a system of equations with a dimension of \(mnsh+2mnh\). The attachment methods of x-boundary conditions, y-boundary conditions and z-boundary conditions can similar developed.

Following the aforementioned attachment, we obtain a matrix equation system of dimension \(mnsh+2mnh+2nsh+\) \(2msh+2mns\). Let \(\omega =1\), with a given initial value \({{u}^{(0)}}\) and iteration precision e, and then the iteration begins. The iteration stops when the condition

$$\begin{aligned}{{\left\| {{u}^{(\omega )}}-{{u}^{(\omega -1)}} \right\| }_{2}}={{\left( \sum \limits _{i=1}^{m}{\sum \limits _{j=1}^{n}{\sum \limits _{v=1}^{s}{\sum \limits _{k=1}^{h}{{{({{u}^{(\omega )}}({{x}_{i}},{{y}_{j}},{{z}_{v}},{{t}_{k}})-{{u}^{(\omega -1)}}({{x}_{i}},{{y}_{j}},{{z}_{v}},{{t}_{k}}))}^{2}}}}}} \right) }^{\frac{1}{2}}}\le e,\end{aligned}$$

is satisfied or after exceeding 20 iterations, obtaining the numerical solution of the equations.

6 Numerical Examples

To validate the effectiveness of the method and iterative format submitted in this paper, numerical simulations are carried out on the given analytical solution examples, with computational programs written in MATLAB(R2019b) for all examples below.

Select the second Chebyshev nodes

$$\begin{aligned}{{x}_{i}}=-\cos \frac{i\pi }{m},\begin{matrix} i=1,2,\ldots ,m \\ \end{matrix}, \begin{matrix} {} \\ \end{matrix}{{y}_{j}}=-\cos \frac{j\pi }{n},\begin{matrix} j=1,2,\ldots ,n,\begin{matrix} {} \\ \end{matrix}{{t}_{k}}=-\cos \frac{k\pi }{h},\begin{matrix} k=1,2,\ldots ,h, \\ \end{matrix} \\ \end{matrix} \end{aligned}$$

and equidistant nodes

$$\begin{aligned}{{x}_{i}}=a+i\frac{b-a}{m},\begin{matrix} i=1,2,\ldots ,m,\begin{matrix} {} \\ \end{matrix} \\ \end{matrix}{{y}_{j}}=c+j\frac{d-c}{n},\begin{matrix} j=1,2,\ldots ,n,\begin{matrix} {} \\ \end{matrix} \\ \end{matrix}{{t}_{k}}=k\frac{T}{h},\begin{matrix} k=1,2,\ldots ,h. \\ \end{matrix} \end{aligned}$$

as the interpolation nodes. The Chebyshev nodes are defined on the interval [− 1,1], using the transform \({\widetilde{x}}=\frac{b-a}{2}x+\frac{b+a}{2}\) Chebyshev interpolation nodes can be transform into [a,b] with any reasonable value.

Order of convergence

$$\begin{aligned}rate=\frac{\ln ({{{e}_{1}}}/{{{e}_{2}}}\;)}{\ln ({{{N}_{2}}}/{{{N}_{1}}}\;)}, \end{aligned}$$

where \({{e}_{1}}\) and \({{e}_{2}}\) represent the \({{L}_{2}}\)-norm of the previous error and the subsequent error of the two adjacent node number errors, respectively. \({{N}_{2}}\) represents the number of nodes with error \({{e}_{2}}\), and \({{N}_{1}}\) represents the number of nodes with error \({{e}_{1}}\).

The definition of absolute error \({{E}_{a}}\) and relative error \({{E}_{r}}\), can be respectively defined as:

$$\begin{aligned}{{E}_{a}}={{\left\| {{U}^{A}}-{{U}^{N}} \right\| }_{2}}\begin{matrix} {} \\ \end{matrix},\begin{matrix} {} \\ \end{matrix}{{E}_{r}}=\frac{{{\left\| {{U}^{A}}-{{U}^{N}} \right\| }_{2}}}{{{\left\| {{U}^{A}} \right\| }_{2}}},\end{aligned}$$

where \({{\left\| \centerdot \right\| }_{2}}\) represents the 2-norm of a vector, \({{U}^{A}}\) is the column vector of the analytical solution, and \({{U}^{N}}\) is the column vector of the numerical solution. In this paper, the iterative accuracy of the example is \(e=10\times {{10}^{-10}}\), and the number of iterations is not more than 20.

Example 1

$$\begin{aligned}\left\{ \begin{aligned}&{{u}_{tt}}-({{u}_{xx}}+{{u}_{yy}})+\sin ({{u}_{t}})=f(x,y,t),\begin{matrix} {} \\ \end{matrix}(x,y)\in \Omega ,t\in [0,T]{,} \\&u(x,y,0)=\cos (\pi x)\sin (\pi y),\begin{matrix} {} \\ \end{matrix}{{u}_{t}}(x,y,0)=\cos (\pi x)\sin (\pi y){,} \\ \end{aligned} \right. \end{aligned}$$

where \(\Omega =[0,1]\times [0,1]\), \(f(x,y,t)=(1+2{{\pi }^{2}}){{e}^{t}}\cos (\pi x)\sin (\pi y)+\sin ({{e}^{t}}\cos \pi x\sin \pi y)\) The analytical solution of this example is \(u(x,y,t)={{e}^{t}}\cos (\pi x)\sin (\pi y)\), and the boundary condition is obtained from the analytical solution, so that the final time value \(T=1\), \(N=m=n=h\). The errors of Chebyshev nodes and equidistant nodes under the direct linearization iteration format were estimated (Table 1), with the Chebyshev nodes, when there are 15 nodes, the error accuracy reaches the highest, with an absolute error of the order of \({{10}^{-10}}\), a relative error of the order of \({{10}^{-12}}\), and a convergence order of 31.6. With equidistant nodes, when there are 13 nodes, the error accuracy reaches the highest, with an absolute error of \({{10}^{-9}}\), the relative error of \({{10}^{-10}}\), and a convergence order of 31.4. After reaching the optimal accuracy for equidistant nodes, there is a tendency of decreasing precision when increasing the number of nodes. Actually, the approach using the Chebyshev nodes show better error stability compared to that of equidistant nodes. Both approaches exhibit high computational accuracy, indicating the effectiveness of them in solving nonlinear problems. Let \(S=m=n\), the number of time interpolation nodes is \({{S}^{2}}\), The error and convergence order of the example under the three-point central difference method at \(t=2\Delta t\), show that when the number of spatial nodes reaches 96, the accuracy of absolute error is \({{10}^{-7}}\), the accuracy of relative error is \({{10}^{-8}}\), and the maximum order of convergence is 3.2 (Table 2), which is lower than the optimal accuracy and convergence rate of the barycentric Lagrange interpolation method, where \(\Delta t\) represents the time step.

Table 1 The error and convergence order for Example 1 under direct linearization iterative scheme
Table 2 The error of the three-point central difference method [15] at \(t=2\Delta t\) and the order of convergence of \({{E}_{a}}\) in Example 1

When the Chebyshev nodes reaches 15 in the direct linearization iteration format at \(t=1\), a high degree of agreement is achieved between the numerical solution and the analytical solution at that time (Fig. 1). the error diagrams of the Chebyshev nodes and the equidistant nodes at \(t=1\) are shown under the direct linearization iteration format at the node size of 15 (Fig. 2). The error accuracy of the Chebyshev nodes is on the order of \({{10}^{-12}}\), while that with the equidistant nodes is on the order of \({{10}^{-10}}\). This supports the high accuracy of our approaches in solving (2+1)-dimensional nonlinear wave equations with the second type of nonlinear terms.

Fig. 1
figure 1

Numerical (a) and analytical (b) solutions of Example 1 at time \(t=1\) when the number of Chebyshev nodes is 15

Fig. 2
figure 2

When the node number in Example 1 reaches 15, the errors of Chebyshev nodes (a) and equidistant nodes (b) are obtained at the time of \(t=1\), respectively

Example 2

$$\begin{aligned}\left\{ \begin{aligned}&{{u}_{tt}}-({{u}_{xx}}+{{u}_{yy}})+{{u}_{t}}\sin (u)=f(x,y,t),\begin{matrix} {} \\ \end{matrix}(x,y)\in \Omega ,t\in [0,T]{,} \\&u(x,y,0)=x+y+\cos (\pi x)\cos (\pi y),\begin{matrix} {} \\ \end{matrix}{{u}_{t}}(x,y,0)=0 {,}\\ \end{aligned} \right. \end{aligned}$$

where \(\Omega =[0,1]\times [0,1]\),

$$\begin{aligned}\begin{aligned} f(x,y,t)&=4+{{\pi }^{2}}\cos (\pi x)\cos (\pi y)\cos (\pi t) \\&\quad +[4t-\pi \cos (\pi x)\cos (\pi y)\sin (\pi t)]\sin (x+y+2{{t}^{2}}+\cos (\pi x)\cos (\pi y)\cos (\pi t)). \end{aligned} \end{aligned}$$

The analytical solution in this example is \(u(x,y,t)=x+y+2{{t}^{2}}+\cos (\pi x)\cos (\pi y)\cos (\pi t)\), and the boundary condition can be obtained from the analytic solution, considering the final value \(T=1\), \(N=m=n=h\). The errors with the Chebyshev nodes and equidistant nodes under the direct linearization iteration format were shown (Table 3),and show that the Chebyshev nodes the optimal error accuracy is achieved, when the number of nodes reaches 13, with an absolute error of \({{10}^{-9}}\), a relative error of \({{10}^{-11}}\), and a convergence order of 31.8, exhibits good error stability. Equidistant nodes achieve optimal error accuracy when the number of nodes is 13, with an absolute error of the order of \({{10}^{-9}}\), a relative error of the order of \({{10}^{-11}}\), and a convergence order of 15.1, as the number of nodes continues to increase, there will be a tendency of decreased accuracy.

Table 3 The error and convergence order of Example 2 under direct linearization iterative scheme

The numerical solution at time \(t=1\) with 15 Chebyshev nodes agrees the best with the analytical solution in the direct linearization iterative format (Fig. 3). The errors with the Chebyshev nodes and the equidistant nodes at the node size 15 at \(t=1\) show that the accuracy with the Chebyshev nodes is on the order of \({{10}^{-11}}\) while that of the equidistant nodes is on the order of \({{10}^{-10}}\) (Fig. 4) This implies the high precision of our methods in solving nonlinear (2+1)-dimensional wave equations.

Fig. 3
figure 3

Numerical (a) and analytical (b) solutions of example 2 at time \(t=1\) when the Chebyshev node number reaches 15

Fig. 4
figure 4

When the number in example 2 reaches 15, the errors of Chebyshev nodes (a) and equidistant nodes (b) are obtained at the time of \(t=1\), respectively

Example 3

$$\begin{aligned}\left\{ \begin{aligned}&{{u}_{tt}}-({{u}_{xx}}+{{u}_{yy}})+u_{t}^{2}=f(x,y,t),\begin{matrix} {} \\ \end{matrix}(x,y)\in \Omega ,t\in [0,T] {,}\\&u(x,y,0)=\sin (\pi x)\sin (\pi y),\begin{matrix} {} \\ \end{matrix}{{u}_{t}}(x,y,0)=-2\sin (\pi x)\sin (\pi y){,} \\ \end{aligned} \right. \end{aligned}$$

where \(\Omega =[0,1]\times [0,1]\), \(f(x,y,t)={{e}^{-2t}}\sin (\pi x)\sin (\pi y)\left[ 4+2{{\pi }^{2}}+4{{e}^{-2t}}\sin (\pi x)\sin (\pi y) \right]\) The analytical solution in this example is \(u(x,y,t)={{e}^{-2t}}\sin (\pi x)\sin (\pi y)\), and the boundary condition can be obtained from the analytic solution, considering the time terminal value \(T=1\), \(N=m=n=h\). The error with Chebyshev nodes and the equidistant nodes under the direct linearization iteration format is shown (Table 4), the optimal error accuracy is achieved at 15 with the Chebyshev nodes, with an absolute error of the order of \({{10}^{-11}}\) and a relative error of the order of \({{10}^{-12}}\), and as the number of nodes continues to increase, the error accuracy remains the same. The optimal error accuracy is achieved at 13 with the equivalent nodes, with an absolute error of the order of \({{10}^{-9}}\) and a relative error of the order of \({{10}^{-10}}\), and as the number of nodes continues to increase, there will be a trend of decreasing accuracy.

Table 4 Error and convergence order of Example 3 under direct linearization iterative scheme

The numerical and analytical solutions at \(t=1\) with the Chebyshev nodes at a number of 15 in the direct linearization iteration format are displaced (Fig. 5). The errors with the Chebyshev nodes and the equidistant nodes are shown (Fig. 6)

Fig. 5
figure 5

Numerical (a) and analytical (b) solutions of Example 3 at time \(t=1\) when the Chebyshev nodes number reaches 15

Fig. 6
figure 6

When the number of nodes in Example 3 is 15, the errors of Chebyshev nodes (a) and equidistant nodes (b) are obtained at the time of \(t=1\), respectively

Example 4

$$\begin{aligned}\left\{ \begin{aligned}&{{u}_{tt}}-{{u}_{xx}}-{{u}_{yy}}-{{u}_{zz}}+\sin (u)=\sin (xyz{{e}^{x+y+z-t}})-2(xy+xz+yz+xyz){{e}^{x+y+z-t}} {,}\\&u(x,y,z,0)=xyz{{e}^{x+y+z}},\begin{matrix} {} \\ \end{matrix}{{u}_{t}}(x,y,z,0)=-xyz{{e}^{x+y+z}} {,}\\ \end{aligned} \right. \end{aligned}$$

where \((x,y,z,t)\in \Omega \times [0,T]\), \(\Omega =[0,1]\times [0,1]\times [0,1]\), the analytical solution of this example is \(u(x,y,z,t)=xyz{{e}^{x+y+z-t}}\), and the boundary condition can be obtained from the analytical solution, considering the time terminal value \(T=1\), \(N=m=n=h=s\). The absolute and relative errors with the Chebyshev nodes and the equidistant nodes of the three-dimensional Sine–Gordon equation under the direct linearization iteration format are estimated (Table 5). When the Chebyshev node number reaches 11 the absolute error reaches a maximum of \({{10}^{-8}}\) and, the relative error reaches a maximum of \({{10}^{-10}}\). Comparatively, when there are 9 nodes a maximum convergence order of 24.6 is achieved. For the equidistant nodes, the maximum absolute error is on the order of \({{10}^{-8}}\) the maximum relative error is on the order of \({{10}^{-10}}\), and the maximum convergence order is 25.0. The above findings show that stability of the Chebyshev nodes is better than that of equidistant nodes, and both node types have high numerical accuracy. Let \(S=m=n=h=\), the number of time interpolation nodes is \({{S}^{2}}\), Table 6 shows the error and convergence order of this example under the three-point central difference method at \(t=3\Delta t\), from the data in the table, it can be seen that when the number of spatial nodes is 62, the accuracy of absolute error is \({{10}^{-5}}\), the accuracy of relative error is \({{10}^{-8}}\), and the maximum order of convergence is 2.4, which is lower than the optimal accuracy and convergence rate of the barycentric Lagrange interpolation method.

Table 5 The error and convergence order of Example 4 under direct linearization iterative scheme
Table 6 The error of the three-point central difference method [15] at \(t=3\Delta t\) and the order of convergence of \({{E}_{a}}\) in Example 4

Example 5

$$\begin{aligned}\left\{ \begin{aligned}&{{u}_{tt}}-{{u}_{xx}}-{{u}_{yy}}-{{u}_{zz}}-({{u}^{2}}-1){{u}_{t}}=f(x,y,z,t){,} \\&u(x,y,z,0)=\sin (\pi x)\sin (\pi y)\sin (\pi z),\begin{matrix} {} \\ \end{matrix}{{u}_{t}}(x,y,z,0)=-\sin (\pi x)\sin (\pi y)\sin (\pi z){,} \\ \end{aligned} \right. \end{aligned}$$

where \((x,y,z,t)\in \Omega \times [0,T]\), \(\Omega =[0,1]\times [0,1]\times [0,1]\), the boundary condition is obtained from the analytical solution.

$$\begin{aligned}f(x,y,z,t)={{e}^{-t}}\sin (\pi x)\sin (\pi y)\sin (\pi z)\left[ 3{{\pi }^{2}}+{{e}^{-2t}}{{\sin }^{2}}(\pi x){{\sin }^{2}}(\pi y){{\sin }^{2}}(\pi z) \right] \end{aligned}$$

The analytical solution of this example is \({{e}^{-t}}\sin (\pi x)\sin (\pi y)\sin (\pi z)\), considering the time terminal value \(T=1\). The absolute and relative errors with the Chebyshev nodes and the equidistant nodes of the three-dimensional nonlinear wave equation under the direct linearization iteration format are estimated (Table 7). When the Chebyshev node number reaches 13, the absolute error reaches a maximum of \({{10}^{-8}}\) and, the relative error reaches a maximum of \({{10}^{-9}}\). Comparatively, when there are 13 nodes a maximum convergence order of 25.9 is achieved. For the equidistant nodes, the maximum absolute error is on the order of \({{10}^{-8}}\), the relative error reaches a maximum of \({{10}^{-9}}\), and the maximum convergence order is 28.6.

Table 7 Error and convergence order of Example 5 under direct linearization iterative scheme

7 Conclusion

In this paper, the barycentric Lagrange interpolation collocation method is adopted to solve three kinds of nonlinear wave equations, and the direct linearized iterative schemes are constructed. We developed the linearization iteration matrix formats for (2+1) dimensional nonlinear wave equations and (3+1) dimensional nonlinear wave equations. The numerical results indicate that using the Chebyshev nodes provides greater stability than using equidistant nodes. This method also offers high convergence speed and error accuracy when solving nonlinear wave equations. In addition, the experimental part is also compared with the three-point central difference method, the results show that the proposed method is better than the three-point central difference method in both computational accuracy and convergence rate in solving (2+1) and (3+1)-dimensional nonlinear wave equations, and higher error accuracy can be obtained by using only a few interpolation nodes. this method can also be used to solve fractional order nonlinear wave equations, which to some extent promotes the development of nonlinear problems.