Issue 
Wuhan Univ. J. Nat. Sci.
Volume 27, Number 4, August 2022



Page(s)  313  320  
DOI  https://doi.org/10.1051/wujns/2022274313  
Published online  26 September 2022 
Mathematics
CLC number: O 242
The SpaceTime Meshless Methods for the Solution of OneDimensional KleinGordon Equations
^{1}
General Education Center, Zhengzhou Business University, Gongyi
451200, Henan, China
^{2}
School of Mathematics and Statistics, Xuzhou University of Technology, Xuzhou 221018, Jiangsu, China
^{3}
School of Computer Science & Technology, Huaibei Normal University, Huaibei 235000, Anhui, China
^{4}
School of Information and Control Engineering, China University of Mining and Technology, Xuzhou 221116, Jiangsu, China
^{†} To whom correspondence should be addressed. Email: wangfuzhang1984@163.com
Received:
21
March
2022
A simple direct spacetime meshless scheme, based on the radial or nonradial basis function, is proposed for the onedimensional KleinGordon equations. Since these equations are timedependent, it is worthwhile to present two schemes for the basis functions from radial and nonradial aspects. The first scheme is fulfilled by considering time variable as normal space variable, to construct an "isotropic" spacetime radial basis function. The other scheme considered a realistic relationship between space variable and time variable which is not radial. The timedependent variable is treated regularly during the whole solution process and the KleinGordon equations can be solved in a direct way. Numerical results show that the proposed meshless schemes are simple, accurate, stable, easytoprogram and efficient for the KleinGordon equations.
Key words: radial basis functions / meshless method / spacetime
Biography: ZHANG Zhiqiang, male, Associate professor, research direction: computational physics. Email: zhangzhiqiang08@gmail.com
Fundation item: Supported by Anhui Provincial Natural Science Foundation ( 1908085QA09)
© Wuhan University 2022
This is an Open Access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
0 Introduction
The mathematical formulation and subsequent assistance in the resolution of physical and other problems involving functions of multiple variables, such as the propagation of heat or sound, fluid flow, elasticity, electrostatics, and electrodynamics, are made possible by the use of partial differential equations^{[13]}. After the first report by Cajori Florian in the year 1928 on partial differential equations (PDEs), partial differentiation and integration, there have been different kinds of PDEs. A large number of mathematical models in mathematical physics can be described by the onedimensional KleinGordon equations. It has attracted much attention in studying classical and quantum mechanics, solitons and condensed matter physics^{[4,5]}.
For such problems, it is almost impossible to get the analytical solutions^{[69]}. Thus one should consider numerical approximations to the KleinGordon equations. A variety of numerical techniques have been developed and compared for solving the KleinGordon equations^{[1014]}. These numerical techniques are based on the finite difference schemes^{[15]} or spectral and pseudospectral methods^{[16,17]}.
To avoid the mesh generation, the traditional radialbasisfunctionbased meshless methods have attracted the attention of researchers^{ [1820]}. Based on the Thin Plate Splines radial basis functions and the cubic Bspline scaling functions, Dehghan and his coworkers^{[21,22]} proposed numerical schemes to solve the onedimensional nonlinear KleinGordon equation with quadratic and cubic nonlinearity. Dehghan and Mohammadi^{[23]} proposed two numerical meshless techniques based on radial basis functions and the method of generalized moving least squares for simulation of coupled KleinGordonSchrodinger equations. The spectral meshless radial point interpolation technique is applied to obtain the solution of two and threedimensional coupled KleinGordonSchrodinger equations by Shivanian and Jafarabadi ^{[24]}. Very recently, Ahmad et al^{ [25]} proposed a local meshless differential quadrature collocation method based on radial basis functions for the numerical simulation of onedimensional KleinGordon equations. These traditional numerical techniques are based on twolevel finite difference approximations. A direct meshless method, which belongs to the onelevel type, is promising in dealing with such onedimensional KleinGordon equations.
In this paper, we propose a direct meshless method with onelevel approximation, based on the radial basis functions, for the onedimensional KleinGordon equations. Since the KleinGordon equation is timedependent, we present two schemes for the basis functions from radial and nonradial aspects. The radial aspect is similar to the traditional radial basis functions and the nonradial aspect is a newlyproposed scheme. The first scheme is fulfilled by considering time variable as normal space variable to construct an "isotropic" spacetime radial basis function. The other scheme considered a realistic relationship between space variable and time variable which is not radial. The timedependent variable is treated regularly during the whole solution process and the KleinGordon equations can be solved in a direct way.
The structure of this paper is organized as follows. Followed by Section 1, we describe the onedimensional KleinGordon equations with initial and boundary conditions. Section 2 introduces the spacetime radial and nonradial basis functions. Followed by Section 3, we present the methodology of the direct meshless method (DMM) for the onedimensional KleinGordon equations under initial condition and boundary conditions. Several numerical examples are presented to validate the accuracy and stability of the proposed algorithms in Section 4. Some conclusions are given in Section 5 with some additional remarks.
1 OneDimensional KleinGordon Equation
In this paper, we consider the general mathematical formulation of onedimensional KleinGordon equation
in terms with the initial conditions
and boundary conditions
2 Formulation of the SpaceTime Radial and NonRadial Basis Functions
By using traditional numerical techniques, Eqs. (1)(3) can be solved by using the twolevel finite difference approximations or integral transform methods. In order to overcome the twolevel strategy, direct meshless methods by using spacetime radial and nonradial basis functions were worthy to be proposed.
As is known to all, the radial basis functions (RBFs) are "isotropic" for Euclidean spaces. For steadystate problems, the approximate solution can be written as a linear combination of RBFs with 2D or higher dimensions. Take the famous Multiquadric (MQ) RBF as an example
where is the Euclidean distance between two points and , is the RBF shape parameter.
However, there is only one space variable for the onedimensional KleinGordon equation, the traditional RBFs are inapplicable in the direct sense. For this reason, we propose a simple meshless method by combining the space variable and time variable from the perspective of radial and nonradial. More specifically, the interval is evenly divided into segments firstly with corresponding finess . The time variable is evenly chosen from the initial time to a final time as with timestep . The corresponding configuration of the spacetime coordinate is shown in Fig. 1. Then the spacetime radial basis function can be constructed as
Fig.1 Configuration of the spacetime coordinates "○" stands for the value of space variable [x], "•" stands for the value of time variable [t] and "×" stands for the point [(x,t)] 
is the Euclidean distance between two points two points and . Besides, it is possible to construct the spacetime nonradial basis function which has the following expression
where is a parameter which reflects a realistic relationship between space variable and time variable .
We note that the spacetime nonradial basis function which is product of two positive definite functions on space dimension and time dimension is investigated in Refs.[2627]. For the MQ case, one has
However, the corresponding numerical results are not well in dealing with the problems in this research.
For twodimensional cases, the spacetime radial and nonradial basis functions can be easily obtained
Here is the Euclidean distance between two points two points and .
3 Implementation of the Direct Meshless Method (DMM)
Here, we consider the initial boundary value problem Eqs. (1)(3) to illustrate the direct meshless method (DMM). Based on the definition of spacetime radial and nonradial basis functions, Eqs. (1)(3) can be solved directly in a one level approximation. The approximate solution of the function has the form
with the unknown coefficients.
To illustrate the direct meshless method, we choose collocation points on the whole physical domain which include internal points , initial boundary points and boundary points . According to the traditional collocation approach, substituting Eq. (10) into Eqs. (1)(3), we have the following equations
where . We note that the initial boundary points are used twice to cope with initial conditions. Thus, the number of total collocation points .
Hence we should seek for the solution of the following linear algebraic system
where
is known matrix. and are vectors.
Eq. (15) can be solved by the backslash computation in MATLAB codes. From the above procedures, we can find that the implementation of the proposed direct meshless method is very simple.
4 Numerical Simulations
To compare with the previous literatures, we consider using the maximum error(ML), absolute error and root mean square error (RMSE)^{ [28,29]} defined as below:
where is the analytical solution at test points and is the numerical solutions at the test points . is the number of test points on the physical domain. The optimal choice of RBF parameter is beyond the scope of our current research. For more details about this topic, readers can be referred to Refs.[30,31] and references therein. The shape parameter is chosen prior to numerical results.
For simplicity, we denote the spacetime radial basis function Eq. (5) and spacetime nonradial basis function Eq. (6) as DMM1 and DMM2, respectively.
4.1 Example 1
Here, we consider an example of the onedimensional KleinGordon equation with parameters and , i.e., . The corresponding exact solution is given as
which has a series form
with the following initial conditions
and boundary conditions
The corresponding source function is .
Numerical results of the DMM are listed in Table 1 with the final time T=1. We note that our time step , which leads to less computations, is far larger than the one in Refs.[25, 32]. It is clear from Table 1 that the two schemes of the DMM give the same or better accuracy compared to the numerical procedures reported in Refs.[25, 32].
Table 2 shows the time convergence rate in terms of the and error norms for the different time step sizes for fixed point parameter . From Table 2, we can find that the two schemes of the DMM perform better than the forward Euler difference formula (FEDF ) in Ref.[25].
For fixed parameter , the numerical results obtained by the DMM for a long range of shape parameter value , are shown in Fig. 2 for Example 1. Less sensitivity to the selection of the shape parameter in the case of the DMM2, in comparison to the DMM1, can be observed from Fig. 2. But the quasioptimal parameter for the DMM1 is near the number .
Fig.2 Shape parameter versus the ML of the DMM1 (a) and DMM2 (b) 
The numerical results obtained by the DMM for the point parameter value are shown in Fig. 3. It can be seen that solutions of the two DMM schemes consistently converge very quickly from Fig.3. For example, the convergence rate for the square plate is about 9 for both DMM1 and DMM2 before reaching the minimum relative error value.
Fig.3 Point parameter versus the ML of the DMM1 (a) and DMM2 (b) 
Numerical comparison of the maximum errors (ML) for example 1
Time convergence results of the maximum errors and errors for example 1
4.2 Example 2
In this example, we consider the onedimensional KleinGordon equation with parameters , and , i.e., . The corresponding exact solution is given as
with the following initial conditions
and boundary conditions
and the source function .
Numerical results of the DMM are listed in Table 3 with the final time . We note that our time step , which leads to less computations, is larger than the one in Refs.[25,32,33]. It is clear from Table 3 that the two schemes of the DMM give the same or better accuracy compared to the numerical procedures reported in Refs.[25,32,33]. Meanwhile the DMM results are more stable than the other methods for different time
For fixed parameter , the numerical results obtained by the DMM for a long range of shape parameter value , are shown in Fig. 4. Less sensitivity to the selection of the shape parameter in the case of the DMM1, as well as DMM2, can be observed from Fig. 4. The quasioptimal parameter for the DMM1 is near the number which is similar to the previous example.
Fig.4 Shape parameter versus the ML of the DMM1 (a) and DMM2 (b) 
The numerical results obtained by the DMM for the point parameter value are shown in Fig. 5. It is shown that the DMM solutions consistently converge very quickly. Before reaching the minimum relative error value, the convergence rate for the square plate is about 9 for both DMM1 and DMM2. Table 4 shows the time convergence rate in terms of the and error norms for the different time step sizes , . From Table 4, we can find that the two schemes of the DMM perform better than the FEDF in Ref.[25].
Fig.5 Point parameter versus the ML of the DMM1 (a) and DMM2 (b) 
Numerical comparison of the maximum errors for example 2
Time convergence results of the maximum errors and errors for example 2
5 Conclusion
In this paper, a new direct meshless method is proposed for the onedimensional KleinGordon equations. Two schemes are proposed for the basis functions from radial and nonradial aspects. The first scheme is fulfilled by considering time variable as normal space variable to construct an "sotropic" spacetime radial basis function. The other scheme considered a realistic relationship between space variable and time variable which is not radial. Both schemes for the proposed meshless method are simple, accurate, stable, easytoprogram and efficient for the KleinGordon equations. More importantly, the proposed method can be used to nonlinear problems accompanied with iteration methods. The theory of our DMM procedure can be directly applied to wave propagation, transient heat transfer and thermoelastic problems with high dimensions. Also, it is promising in dealing with fractional equations^{ [34,35]}.
Moreover, there is much theoretical investigation that needs to be done in this area of numerical analysis. This will be studied in the near future.
References
 Animasaun I L, Shah N A, Wakif A, et al. Ratio of Momentum Diffusivity to Thermal Diffusivity: Introduction, Metaanalysis, and Scrutinization[M]. New York: Chapman and Hall/CRC, 2022. [Google Scholar]
 Cao W H, Animasaun I L, Yook S J, et al. Simulation of the dynamics of colloidal mixture of water with various nanoparticles at different levels of partial slip: Ternaryhybrid nanofluid[J]. Inter J Commun Heat Mass, 2022, 135: 106069. [CrossRef] [Google Scholar]
 Xia W F, Animasaun I L, Wakif A, et al. Geargeneralized differential quadrature analysis of oscillatory convective TaylorCouette flows of secondgrade fluids subject to Lorentz and DarcyForchheimer quadratic drag forces[J]. Inter J Commun Heat Mass, 2021, 126: 105395. [CrossRef] [Google Scholar]
 Chowdhury M S H, Hashim I. Application of homotopyperturbation method to KleinGordon and sineGordon equations[J]. Chaos Soliton Fract, 2009, 39: 19281935. [CrossRef] [Google Scholar]
 Wazwaz M A. New travelling wave solutions to the Boussinesq and the KleinGordon equations[J]. Commun Nonlinear Sci Numer Simul, 2008, 13: 889901. [NASA ADS] [CrossRef] [MathSciNet] [Google Scholar]
 Zheng H, Zhang C Z, Wang Y S, et al. A local RBF collocation method for band structure computations of 2D solid/fluid and fluid/solid phononic crystals[J]. Int J Numer Meth Eng, 2017, 110 (5): 467500. [NASA ADS] [CrossRef] [Google Scholar]
 Wang L H, Qian Z H. A meshfree stabilized collocation method (SCM) based on reproducing kernel approximation[J]. Comput Method Appl M, 2020, 371:113303. [NASA ADS] [CrossRef] [Google Scholar]
 Gu Y, Fan C M, Xu R P. Localized method of fundamental solutions for largescale modelling of twodimensional elasticity problems[J]. Appl Math Lett, 2019, 93: 814. [CrossRef] [MathSciNet] [Google Scholar]
 Lin J, Chen F, Zhang L J. An accurate meshless collocation technique for solving twodimensional hyperbolic telegraph equations in arbitrary domains[J]. Eng Anal Bound Elem, 2019, 108: 372384. [CrossRef] [MathSciNet] [Google Scholar]
 Lee I J. Numerical solution for nonlinear KleinGordon equation by collocation method with respect to spectral method[J]. J Korean Math Soc, 1995, 32: 541551. [MathSciNet] [Google Scholar]
 Duncan D B. Symplectic finite difference approximations of the nonlinear KleinGordon equation[J]. SIAM J Numer Anal, 1997, 34: 17421760. [CrossRef] [MathSciNet] [Google Scholar]
 ElSayed S M. The decomposition method for studying the KleinGordon equation[J]. Chaos Soliton Fract, 2003, 18: 10251030. [CrossRef] [Google Scholar]
 Hariharan G. Haar wavelet method for solving the KleinGordon and the SineGordon equations[J]. Int J Nonlinear Sci, 2011, 11: 180189. [Google Scholar]
 Pekmen B, TezerSezgin M. Differential quadrature solution of nonlinear KleinGordon and SineGordon equations[J]. Comput Phys Commun, 2012, 183: 17021713. [NASA ADS] [CrossRef] [MathSciNet] [Google Scholar]
 Lynch MAM. Large amplitude instability in finite difference approximations to the KleinGordon equation[J]. Appl Numer Math, 1999, 31: 173182. [Google Scholar]
 Guo B Y, Li X, Vazquez L. A Legendre spectral method for solving the nonlinear KleinGordon equation[J]. Math Appl Comput, 1996, 15 (1): 1936. [Google Scholar]
 Li X, Guo B Y. A Legendre spectral method for solving nonlinear KleinGordon equation[J]. J Comput Math, 1997, 15 (2): 105126. [MathSciNet] [Google Scholar]
 Zheng H, Wang F, Chen C S, et al. Improved 3D surface reconstruction via the method of fundamental solutions[J]. Numer Mathe Theory Me, 2020, 13(4): 973985. [CrossRef] [Google Scholar]
 Zheng H, Xiong J G, Yuan Y, et al. Mixedmode dynamic stress intensity factors by variation technique with finite block method[J]. Eng Anal Bound Elem, 2019, 106: 2733. [CrossRef] [MathSciNet] [Google Scholar]
 Zheng H, Sladek J, Sladek V, et al. Fracture analysis of functionally graded material by hybrid meshless displacement discontinuity method[J]. Eng Fract Mech, 2021, 247: 107591. [CrossRef] [Google Scholar]
 Dehghan M, Shokri A. Numerical solution of the nonlinear KleinGordon equation using radial basis functions[J]. J Comput Appl Math, 2009, 230: 400410. [NASA ADS] [CrossRef] [MathSciNet] [Google Scholar]
 Lakestani M, Dehghan M. Collocation and finite differencecollocation methods for the solution of nonlinear KleinGordon equation[J]. Comput Phys Commun, 2010, 181: 13921401. [NASA ADS] [CrossRef] [Google Scholar]
 Dehghan M, Mohammadi V. Two numerical meshless techniques based on radial basis functions (RBFs) and the method of generalized moving least squares (GMLS) for simulation of coupled KleinGordonSchrodinger (KGS) equations[J]. Comput Math Appl, 2016, 71: 892921. [CrossRef] [MathSciNet] [Google Scholar]
 Shivanian E, Jafarabadi A. An improved meshless method for solving two and threedimensional coupled KleinGordonSchrodinger equations on scattered data of generalshaped domains[J]. Eng Comput –GERMANY, 2018, 34: 757774. [CrossRef] [Google Scholar]
 Ahmad I, Ahsan M, Hussain I, et al. Numerical simulation of PDEs by local meshless differential quadrature collocation method[J]. SymmetryBASEL, 2019, 11(3): 394. [NASA ADS] [CrossRef] [Google Scholar]
 Myers D E, Iaco S D, Posa D, et al. Spacetime radial basis functions[J]. Comput Math Appl, 2002, 43: 539549. [CrossRef] [MathSciNet] [Google Scholar]
 Liu C, Ku C, Xiao J, et al. A novel spacetime collocation meshless method for solving two dimensional backward heat conduction problems[J]. CMES Comp Model Eng, 2019, 118(1): 229252. [Google Scholar]
 Wang F Z, Chen W, Jiang X R. Investigation of regularization techniques for boundary knot method[J]. Commun Numer Meth Eng, 2010, 26: 18681877. [Google Scholar]
 Wang F Z, Chen W, Ling L. Combinations of the method of fundamental solutions for general inverse source identification problems[J]. Appl Math Comput, 2012, 219: 11731182. [CrossRef] [MathSciNet] [Google Scholar]
 Fasshauer G E, Zhang J G. On choosing optimal shape parameters for RBF approximation[J]. Numer Algorithms, 2007, 45: 345368. [NASA ADS] [CrossRef] [MathSciNet] [Google Scholar]
 Chen W, Hong Y X, Lin J. The sample solution approach for determination of the optimal shape parameter in the multiquadric function of the Kansa method[J]. Comput Math Appl, 2018, 75: 29422954. [CrossRef] [MathSciNet] [Google Scholar]
 ElSayed S M. The decomposition method for studying the KleinGordon equation[J]. Chaos Soliton Fract, 2003, 18: 10251030. [CrossRef] [Google Scholar]
 Hussain A, Haq S, Uddin M. Numerical solution of KleinGordon and sineGordon equations by meshless method of lines[J]. Eng Anal Bound Elem, 2013, 37: 13511366. [CrossRef] [MathSciNet] [Google Scholar]
 Wang F Z, Hou E R, Salama S A, et al. Numerical Investigation of the nonlinear fractional Ostrovsky equation[J]. Fractals, 2022, 30(5): 22401429. [Google Scholar]
 Wang F Z, Khan M N, Ahmad I, et al. Numerical solution of traveling waves in chemical kinetics: Time fractional fishers equations[J]. Fractals, 2022, 30(2): 2240051. [CrossRef] [Google Scholar]
All Tables
All Figures
Fig.1 Configuration of the spacetime coordinates "○" stands for the value of space variable [x], "•" stands for the value of time variable [t] and "×" stands for the point [(x,t)] 

In the text 
Fig.2 Shape parameter versus the ML of the DMM1 (a) and DMM2 (b)  
In the text 
Fig.3 Point parameter versus the ML of the DMM1 (a) and DMM2 (b)  
In the text 
Fig.4 Shape parameter versus the ML of the DMM1 (a) and DMM2 (b)  
In the text 
Fig.5 Point parameter versus the ML of the DMM1 (a) and DMM2 (b)  
In the text 
Current usage metrics show cumulative count of Article Views (fulltext article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.
Data correspond to usage on the plateform after 2015. The current usage metrics is available 4896 hours after online publication and is updated daily on week days.
Initial download of the metrics may take a while.