By using the Legendre–Laguerre collocation method, we can construct a spectral collocation scheme to solve the Klein–Gordon equation on the half-line. The Laguerre function collocation method (based on the Lagrange interpolation) in space and the Legendre–Gauss–Lobatto collocation method in time are used. A Newton iterative algorithm is provided. The numerical results demonstrate the high efficiency and accuracy of suggested algorithms.
As we know, the Klein–Gordon equation plays a significant role in many scientific applications such as solid-state physics, nonlinear optics, and quantum field theory, see Rashidinia et al.1 and references therein. The nonlinear Klein–Gordon (NLKG) equation, which belongs to the nonlinear wave phenomena and particularly solitary waves, has the general form2–6:
where represents the displacement of wave in the direction perpendicular to the x-axis, is a known constant, and is the nonlinear force. Such as, when , equation (1) is the well-known sine-Gordon equation. Some authors considered the solutions of the generalized equation (1) for ( are all the known constants), see the literature.7–10 Moreover, the numerical solutions to the nonlinear Klein–Gordon equation with various forms of have received considerable attention in existing literature, see, for example, Rashidinia et al.,1 Bratsos,2 Mittal and Bhatia,3 Khuri and Sayfy,4 Lynch,5 Li and Guo,11 Lakestani and Dehghan,12 and references therein. A variety of second-order finite difference schemes have been presented,5,13–15 we note that some authors use spectral and pseudospectral methods to solve the NLKG equation.11,16 Also, a finite-element method is introduced in Mahanti.17 Furthermore, two numerical techniques based on the finite difference and collocation methods are presented for the solution of NLKG equation in Lakestani and Dehghan,12 a technique to solve NLKG equation numerically has been proposed using the cubic B-spline collocation method in Mittal and Bhatia3 and Khuri and Sayfy.4 The Chebyshev cardinal functions are used for the solution of a partial differential equation with an unknown time-dependent coefficient and one-dimensional linear hyperbolic equation in Lakestani and Dehghan18 and Dehghan and Lakestani.19 All of the above methods have two things in common, one is a finite interval on spatial and time direction, the other is using finite difference schemes on time direction. Usually, the error order in space and time is different for the same number of nodes on spatial and time direction, so to balance, more nodes are needed in the time direction, which is adding to the work. Thus, it is interesting to use other methods to solve the NLKG equation, such as the collocation method.
Recently, more and more attention has been drawn to the problems defined on unbounded domains. In general, one uses the spectral or pseudospectral method of Laguerre (or Hermite) for the problems defined on the half-line (or the whole line).20–25 While the pseudospectral method is more preferable in actual computation, since it is easier to be implemented and saves work to deal with nonlinear terms.22 Spectral collocation methods are efficient techniques for solving nonlinear equations accurately.26
In this paper, we will develop a Laguerre–Legendre spectral collection method to construct a scheme to calculate the numerical solution of NLKG equation (1) defined on the half-line with initial value conditions:
and boundary condition for the half-line:
The Laguerre collocation method (based on the Lagrange interpolation) in space, and the Legendre–Gauss–Lobatto collocation method in time are used. A simple nonlinear system is suggested, which can be implemented by the Newton iteration. Numerical results demonstrate the efficiency of the proposed algorithm.
This paper is arranged as follows. In section “Lagrange interpolation polynomials based on Gauss nodes,” first, we recall the basis results related to the differential matric of Lagrange interpolation polynomial based on the Legendre–Gauss–Lobatto nodes and derive the scaled differential matrix of Lagrange interpolation polynomial based on the Laguerre–Gauss nodes. In section “Space–time spectral collocation method for Klein–Gordon equation,” we applied the Legendre–Laguerre spectral collocation method to solve NLKG equations (1) to (3). In section “Numerical result,” numerical experiments are presented to demonstrate the viability and the efficiency of the proposed method computationally. The final section is a brief conclusion for this paper.
Lagrange interpolation polynomials base on Gauss nodes
Interpolation basis functions based on Legendre–Gauss–Lobatto nodes and differential matrix
Let . The Legendre polynomial of degree m is (cf. Guo27 and Jie and Tao28)
It is the mth eigenfunction of the singular Sturm–Liouville problem
Related to mth eigenvalue .
Let and be the roots of . Take . The Lagrange interpolation basis functions associated with the Legendre–Gauss–Lobatto nodes are as follows:
Then, for , the Lagrange interpolation polynomial can be written as
Differentiating the above equations m times, and setting gets that
Let
The entries of the first-order differentiation matrix are determined by (cf. Shen et al.29)
Moreover, .
Interpolation basis functions based on Laguerre–Gauss nodes and differential matrix
Let . The Laguerre polynomial of degree n is as follows27,28:
It is the nth eigenfunction of the singular Sturm–Liouville problem:
Related to the nth eigenvalue
The Laguerre function is
Let are the zeros of . We take as the interpolation notes of the Lagrange base function, similarly, the Lagrange base function is
Then , the Lagrange interpolation function can be written as
Differentiating the above equations m times, and setting gets that
Let
The entries of the matrix are determined by (cf. Shen et al.29)
To match the asymptotic behaviors of the exact solutions as , we introduce the scaled generalized Laguerre interpolation functions. To do this, let be a positive constant, we define the following Laguerre function:
The corresponding Lagrange base function is
Let
The entries of the matrix are determined by
Also,
Space–time spectral collocation method for the Klein–Gordon equation
We consider initial-boundary value problems of the NLKG equation as following2:
where , and are some given constants. We need the variable transformation for time t. Let , then we can obtain a new equation:
we expand the numerical solution as
to approximate the exact solution of (12). Take in (12), then (12) can be transformed into nonlinear systems
For the description of the numerical accuracy, we introduce the maximum absolute error
Let in (10) and in (11). In Figures 1 and 2, we plot the errors with , , and in (17), respectively, versus . Obviously, we can obtain the high-accuracy numerical solution even for smaller nodes , which indicates that the Klein–Gordon equation on a half-line for the x-direction can be used to effectively simulate.
Error with .
Error with .
Let in (10) and in (11). In Figure 3, we plot the errors with , in (17) versus N, which show the scheme (16) can also give better numerical results, even for larger time
Error with .
Let in (11). In Figure 4, we plot the errors with , in (17) versus N and differential . It seems that the larger the , the smaller the error. Until today, we did not know how to choose an appropriate value of .
Error with .
Let in (11). In Figures 5 and 6, we plot the exact solution with , and in (17) versus the numerical solution with , and . It shows the numerical solution fits the exact solution very well.
In this paper, we use the Legendre–Laguerre spectral collection method to construct a spectral collection scheme to solve the NLKG equation. We consider the NLKG equation defined on the half-line in the spatial direction, which is different from many existing literatures that only consider the NLKG equation defined on a finite interval. Furthermore, we need only a few space and time nodes to get high-accuracy numerical results. Although we only consider the NLKG equation in this paper, the suggested method will also be applicable to many other nonlinear problems.
Footnotes
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The authors received no financial support for the research, authorship, and/or publication of this article.
ORCID iD
Ping Zhang
References
1.
RashidiniaJGhasemiMJalilianR. Numerical solution of the nonlinear Klein–Gordon equation. J Comput Appl Math2010; 233: 1866–1878.
2.
BratsosAG. On the numerical solution of the Klein–Gordon equation. Numer Methods Partial Differ Equ2010; 25: 939–951.
3.
MittalRCBhatiaR. Numerical solution of nonlinear system of Klein–Gordon equations by cubic B-spline collocation method. Int J Comput Math2015; 92: 2139–2159.
4.
KhuriSASayfyA. A spline collocation approach for the numerical solution of a generalized nonlinear Klein–Gordon equation. Appl Math Comput2010; 216: 1047–1056.
5.
LynchMAM. Large amplitude instability in finite difference approximations to the Klein–Gordon equation. Appl Numer Math1999; 31: 173–182.
6.
SarbolandMAminataeiA. Numerical solution of the nonlinear Klein–Gordon equation using multi-quadric quasi-interpolation scheme. Univers J Appl Math2015; 3: 40–49.
7.
LanXLanC-RChenS-M. The soliton and double solution of nonlinear Klein–Gordon equation derived from Heisenberg’s nonlinear spinor equation. International Conference on Computing Science and Engineering 2018; 34: 923–927.
8.
WazwazA. New traveling wave solutions to the Boussinesq and the Klein–Gordon equations. Commun Nonlinear Sci Numer Simul2008; 13: 889–901.
9.
WazwazAM. Compactions, solitons and periodic solutions for some forms of nonlinear Klein–Gordon equations. Chaos Solitons Fractals2006; 28: 1005–1013.
10.
MalflietWHeremanW. The tanh method. I. Exact solutions of nonlinear evolution and wave equations. Phys Scr1996; 54: 563–568.
11.
LiXGuoBY. A Legendre pseudospectral method for solving nonlinear Klein–Gordon equation. J Comput Math1997; 15: 105–126.
12.
LakestaniMDehghanM. Collocation and finite difference-collocation methods for the solution of nonlinear Klein–Gordon equation. J Comput Phys Commun2010; 181: 1392–1401.
13.
JiminezSVazquezL. Analysis of four numerical schemes for a nonlinear Klein–Gordon equation. Appl Math Comput1990; 35: 61–94.
14.
Vu-QuocLLiS. Invariant-conserving finite difference algorithms for the nonlinear Klein–Gordon equation. Comput Methods Appl Mech Eng1993; 107: 314–391.
15.
WongYSChangQGongL. An initial-boundary value problem of a nonlinear Klein–Gordon equation. Appl Math Comput1997; 84: 77–93.
16.
Ben-YuGXunLVazquezL. A Legendre spectral method for solving the nonlinear Klein–Gordon equation. Comput Appl Math1996; 15: 19–36.
17.
MahantiPK. A numerical solution scheme of the Klein–Gordon equation by the finite element method. Indian J Pure Appl Math1976; 7: 342–346.
18.
LakestaniMDehghanM. The use of Chebyshev cardinal functions for the solution of a partial differential equation with an unknown time-dependent coefficient subject to an extra measurement. J Comput Appl Math2010; 235: 669–678.
19.
DehghanMLakestaniM. The use of Chebyshev cardinal functions for solution of the second-order one-dimensional telegraph equation. Numer Methods Partial Differ Equ2010; 25: 931–938.
20.
CoulaudOFunaroDKavianO. Laguerre spectral approximation of elliptic problems in exterior domains. Comput Mech Appl Mech Eng1990; 80: 451–458.
21.
BoydJP. The rate of convergence of Hermite function series. Math Comput1980; 35: 1309–1316.
22.
GuoBY. Spectral and pseudospectral methods for unbounded domains. Sci China Math2015; 45: 975–1024.
23.
GuoBYZhangXY. Spectral method for differential equations of degenerate type on unbounded domains by using generalized Laguerre functions. Appl Numer Math2007; 57: 455–471.
24.
ZamiriABorhanifarAGhannadiaslA. Laguerre collocation method for solving lane-Emden type equations. Comput Methods Differ Equ2021; 9(4): 1176–1197. doi:10.22034/cmde.2020.35895.1621
25.
YüzbasiSYidirimG. A Laguerre approach for solving of the systems of linear differential equations and residual improvement. Comput Methods Diff Equ2021; 9): 553–576.
26.
TatariMHaghighiM. A generalized Laguerre–Legendre spectral collocation method for solving initial-boundary value problems. Appl Math Model2014; 38: 1351–1364.
27.
GuoBY. Spectral methods and their applications. Singapore: World Scientific, 1998.
28.
JieSTaoT. Spectral and high-order methods with applications. Beijing: Science Press, 2006.
29.
ShenJTangTWangLL. Spectral methods: algorithms, analysis and applications. Berlin: Spring-Verlag, 2011.