A collocation method based on extended cubic Bsplines for numerical solutions of the KleinGordon equation
Abstract
A generalization of classical cubic Bspline functions with a parameter is used as basis in the collocation method. Some initial boundary value problems constructed on the nonlinear Kleingordon equation are solved by the proposed method for extension various parameters. The coupled system derived as a result of the reduction of the time order of the equation is integrated in time by the CrankNicolson method. After linearizing the nonlinear term, the collocation procedure is implemented. Adapting the initial conditions provides a linear iteration system for the fully integration of the equation. The validity of the method is investigated by measuring the maximum errors between analytical and the numerical solutions. The absolute relative changes of the conservation laws describing the energy and the momentum are computed for both problems.
Keywords: KleinGordon Equation; Extended cubic Bspline; collocation; wave motion.
1 Introduction
In the study, we derive numerical solutions for some initial boundary value problems constructed with the nonlinear KleinGordon (NKG) equation of the form
(1) 
where , and , are real parameters[1]. The main part of the equation containing the derivative terms are just the one dimensional wave operator. The remaining part is the derivative of some potential function. The equation was suggested by Klein and Gordon as a relativistic model for a charged particle in an electromagnetic field[2]. The laser pulses in two state media, the torsional waves propagating down a stretched wire in a pendula system, the dislocation in crystals, Josephson junction transmission lines, the propagation in ferromagnetic materials of waves carrying rotations of the direction of magnetization are another implementatiton fields of some particular forms of the NKG. The analysis of the rotating black holes can also be possible by this equation[3]. The geometrical derivation of the NKG requires some particular gauges and coordinate transformations[4]. The usual procedure for some first order equations in some particular Hilbert spaces supported with some particular norms can lead the scattering field theory for the NKG[5]. Some significant properties such as invariance principle, existence and completenes of the wave operators, the intertwining relations were also proven in that study. There exists a dep relation between the NKG and the Schrödinger equations that both can be converted each other[6]. The static external field case was also studied for the KleinGordon equation[7]. Employing eigenfunction expansion yielded some important results as strong as like in the Schrödinger Equation in spectral and scattering theory.
However, the existence of the envelope type solitons depends upon the sign of the cubic nonlinear terms correlatively the stability of the KGE’s dependency[8]. Dusuel et al.[9] obtained the conditions for the existence of the compactonlike kink solutions of the NKG. They concluded that the static compacton is stable as the dynamic one is not by observing the numerical simulations.
The solitary wave solutions at various forms of NKG are determined by Kim and Hong [10] using the auxilary equation method based on the solutions of a particular nonlinear ordinary differential equation. They also give the existence conditions of those solutions covering the relations among the parameters and coefficients in the equation. Solitary wave solutions in kink or bell shapes can be constructed by the extended form of the first kind elliptic sub equation method by manipulating the solutions of a first order ordinary differential equation with sixth degree nonlinear term[11]. The method is capable to give also explicit forms of the singular and triangular periodic wave solutions. The modified simple equation method is another efficient method to find the solitary wave solutions from the exact traveling solutions under the condition that the parameters in the equation are with their special values[12].
Various types of wave solutions like positive or negative frequency plane waves can also be derived from the solutions of convenient field equations[13]. Burt and Reid [14] set up the exact formal solution of the nonlinear KleinGordon equation from the solutions of the linear one. The Kleingordon equation has also bound state solutions for different attractive potential types[15]. The soliton interaction is examined in different perspectives by using numerical algorithms[16, 17, 18].
Numerical algorithms are also developed for the numerical solutions of the NKG. The classical finite diference method with the central second difference approximation is used to prove the existence of the bounded solutions of the NKG as [19]. It is also concluded that the degree of the power term causes to change the numer of the oscillations and the amplitude in the solutions.
Jiménez and Vázquez [20] implement four different explicit finite difference schemes and conclude that the scheme which conserves energy is the most suitable one to integrate the NKG to study the long time behaviours of the solutions. Dehghan’s study[21] emphasises that the collocation method based on thin plate splineradial basis functions can give sufficiently accurate results while solving the inhomogenous NKG with different degreed nonlinear terms. The Fourier collocation method is also implemented to solve some periodic problems[22]. That study focuses also the convergence and stability properties of the proposed method. The numerical solutions of the NKG can also be obtained by the multiquadric quasi interpolation method[23].
The classical polynomial cubic Bspline collocation and unconditionally stable collocation method are derived for the solutions of some initial boundary value problems for the NKG[24, 25]. In this study we propose a new collocation algorithm based on the extended definiton of the classical polynomial Bsplines, namely extended cubic Bsplines to solve some initial boundary value problems for the NKG equation. The nature of these Bsplines has some siginificant differences from the other Bsplines like calassical polynomial [26, 27], or exponential Bsplines[28, 29]. We observe the effects of change of the extention parameter to the accuracy of the solutions.
The order of the NKG in time can be reduced to one to give a nonlinear coupled system
(2) 
by assuming . The initial data
and homogenous Neumann boundary conditions
(3)  
are chosen in the finite problem interval for the convenience.
2 Numerical Integration of the NKG equation
The CrankNicolson and the suitable forward finite difference for the time integration of the coupled system (2) yields
(4)  
where and represent the solutions of the system at the th. time level. One should note that equals , and is the time step length, superscripts and denote the time levels.
Assume that is the partition of the finite interval as with equal finite intervals . An extended cubic Bspline is defined as [30, 31]
(6) 
where is the real extension parameter. The classical cubic Bspline functions[32, 33] are the particular form when the extension parameter is chosen as . The set defines a basis for the real valued functions defined in the interval [30, 31]. The nonzero values of the extension parameter affects the shape of the cubic Bspline directly, Fig 1. The relations between the grids and nonzero functional and derivative values of each extended cubic Bspline at the partition of are calculated as in Table 1.
Let and be the approximate solutions to and , respectively, defined as
(7)  
in which and are the time dependent new variables. The functional values of and and their derivatives are determined by using (7) as

(8) 
where and are general notations. denotes when is chosen as and it stands for when .
Substituting the approximate solutions and defined in (7) and their derivatives into (5) and rearranging the resulting equations yields the iterative system
where
The system (2) and (2) can be rewritten in the matrix notation for the sake of simplicity as
(11) 
where
and
The system (11) has linear equations and unknown parameters described as . A unique solution of this system requires the equal number of equations and parameters. Implement of the boundary conditions
equalize the number of unknown parameters by generating relations
When the parameters are eliminated from the system, we have linear equations with unknowns. We solve this system of linear equation by the Thomas algorithm for the systems having sixbanded coefficient matrices that is adapted from the algorithm for the systems having sevenbanded coefficient matrix. In order to start the iteration algorithm, we need the initial vector . Assuming , are the components of the initial vector of the iteration, the parameters are eliminated by using the equalities
(12)  
to be able to start the iteration (11).
3 Numerical Solutions
This section is devoted to focus the perform of the suggested method by implementing it to some initial boundary value problems for the NKG. The discrete maximum error norm
is defined to check the validity and accuracy of the suggested method by measuring the error between the analytical and numerical solution at a specific time . The conservation of the energy(E) and the momentum(P) defined as [1, 2, 34]
(13)  
can also be a good indicator of an efficient method in case the absence of the analytical solutions. We define absolute relative changes and at the time of the conserved quantities and as
(14)  
where and are initial values of the energy and the momentum of the system, respectively.
3.1 Traveling Wave Case
The initial boundary value problem is defined for , in the NKG equation. The analytical solution
(15) 
describes a traveling wave moving along the axis with the velocity [35]. The initial data are derived from the analytical solution (15) by substituting into it. The Neumann conditions at both ends of the interval are used for the numerical solutions. The routine is run for various values of the discretization parameters and with the choice of the velocity as to the time . In order to improve the accuracy of the results, the extension parameter is scanned between with the increment for the optimum choice of the extension parameter.
The initial data is an shaped wave positioned at the origin with the properties , . When the simulation starts, the wave moves back along the axis with the constant velocity without changing its shape, Fig 2(a).
The maximum error distribution for the optimum value of the extension parameter and the discretization paramters and at the time is depicted in Fig (2(b)). It is observed from both figures that the error accumulates at the points where the wave descent occours.
The discrete maximum norms for both and various cases are tabulated in Table 2. When the discretization parameters are chosen as and , the maximum error is in two decimal digits for . This error is improved to four decimal digit accuracy by choosing the optimum extension parameter as . Reducing the dicsretization parameters to and improves the results five times for both and optimum . The discretization parameters and gives four decimal digit accurate results for . The maximum error is reduced to the fifth decimal in this case by determining the optimum extension parameter as . One more reduce of the discretization parameters to and gives the error in the fourth decimal digit for as provides six decimal digits accuracy in the results for .
()  
()  
()  
() 
The initial values of the conservation laws are determined by using symbolic software as
(16)  
The approximate values of the conservation laws are computed as and initially. It should be noted that the initial quantity of the energy is computed by reducing the bounds of the related integral to the problem interval . The absolute relative changes of both conserved quantities are reported at the simulation terminating time in Table 3. The absolute relative change of the energy of the system is in seven decimal digits and of the momentum is in five decimal digits for both and the optimum when the discretization parameters are and . The absolute relative changes of the energy and the momentum are in eight and six decimal digits, respectively for and . Reducing the discretization parameters to and gives nine decimal digits absolute relative change for the energy and seven decimal digits for the momentum. When and , the absolute relative changes are in ten and eight decimal digits for the energy and the momentum, respectively. The reduction of the discretization parameters improves the absolute relative changes of both the energy and momentum quantities but we do not observe a significant improve on the results with respect to the optimum choice of the extension parameter .
optimum  optimum  

3.2 Single Solitary Wave Case
The single solitary wave solution of the NKG is derived from the solution in Polyanin’s book[36] as
(17) 
for , . The solution models the propagation of a single solitary wave of amplitude to the right along the horizontal axis. The peak of the wave is positioned at the origin initially. The problem interval is shrunk to to be able apply the numerical method. The initial data is obtained by substituting in the analytical solution (17). The suitable Neumann conditions are considered in accordance with the analytical solution. The routine is run up to the time for various values of the discretization parameters. The simulation of the motion and the maximum error distribution are depicted in Fig 3(a) and Fig 3(b). The peak is positioned at when the simulation time reaches . The position of the peak is measured as at and as at . Thus, the average velocity of the wave can be computed approximately as in the appropriate units.
Even though we scan the extension parameter in the interval with the step size , the best results are obtained when the extension parameter is zero. The results are summerized in Table 4. The discrete maximum error is measured in four decimal digit accuracy for and at . The maximum errors are in three decimal digits at the times and with the same discretization parameters. When the time step size is reduced to , the results are worse than the results obtained with at . Even though the accuracy decimals are equal at and at , the decimal values of the accuracy of the results are worse than the ones obtained for . When is reduced ten times, an improve is observable in the results. The maximum errors are determined as , and at the times , and , respectively with the time step size . When and , the accuracy of the results are in six decimal digits at , and five decimal digits at and .
The conserved quantities describing the energy and momentum of the system is calculated using symbolic calculation software as
(18)  
with the approximate values and initially. The absolute relative changes of these two quantities are tabularised in Table 5. The absolute relatives change in the energy are measured in six decimal digits when , and with at the time . Reducing to improves the change to nine decimal digits for the absolute relative change of the energy. The absolute relative change of the momentum is in six decimal digits when for both and . Choosing and gives eight decimal digit absolute relative change as gives nine decimal digit absolute relative change when and .
4 Conclusion
The extended form of the cubic polynomial Bsplines are used as basis in the collocation method for the solutions of the nonlinear KleinGordon equation. The order of the NKG is reduced to one to be able to integrate in time by CrankNicolson method. The dependent variables in the resulting system are approximated by the extended cubic Bsplines. The validity and accuracy of the suggested method are by solving two initial boundary value problems. The discrete maximum error norms and absolute relative changes of the conserved quantities are reported to validate the results.
The first problem describing the travel of a type wave is solved succesfully by the suggested method. The scan of the extension parameter improves the results when compared with the results of the classical polynomial cubic Bspline case.
In the second problem, we study the propagation of a single solitary wave. The numerical results are in a good agreement with the analytical ones. In contrast to the first example, the scan of the extension parameter does not improve the results in this case.
The absolute relative chances of the conserved quantities correspond the theoretical aspects of the conservation laws.
Acknowledgements: A brief part of this study was presented orally in International Conference on Applied Mathematics and Analysis, AnkaraTurkey, 2016.
References
 [1] Whitham, GB: Linear and Nonlinear Waves, John Wiley & Sons, Newyork(1999).
 [2] Debnath L: Nonlinear Partial Differential Equations for Scientists and Engineers, Birkhauser, Boston(2005).
 [3] Detweiler, S: KleinGordon equation and rotating black holes. Phys. Rev. D, 22(10), 23232326 (1980).
 [4] Galehouse, DC: Geometrical derivation of the KleinGordon equation. Int. J. Theor. Phys., 20(6), 457479(1981).
 [5] Weder, RA: Scattering theory for the KleinGordon equation. J. Func. Anal., 27(1), 100117(1978).
 [6] Ablowitz, MJ:Nonlinear Dispersive Waves, Cambridge University Press, Cambridge(2011).
 [7] Lundberg, LE: Spectral and scattering theory for the KleinGordon equation. Commun. Math. Phys., 31(3), 243257(1973).
 [8] Sharma, AS, & Buti, B: Envelope solitons and holes for sineGordon and nonlinear KleinGordon equations. J. Phys. AMath. Gen., 9(11), 18231826(1976)..
 [9] Dusuel, S, Michaux, P, & Remoissenet, M: From kinks to compactonlike kinks. Phys. Rev. E., 57(2), 23202326(1998).
 [10] Kim, JJ, & Hong, WP: New solitarywave solutions for the generalized reaction Duffing model and their dynamics. Z. Naturforsch. Pt. A, 59(11), 721728 (2004).
 [11] Huang, D. J., & Zhang, H. Q. (2005). The extended first kind elliptic subequation method and its application to the generalized reaction Duffing model. Physics Letters A, 344(2), 229237.
 [12] Akter, J., & Akbar, M. A. (2015). Exact solutions to the BenneyLuke equation and the Phi4 equations by using modified simple equation method. Results in Physics, 5, 125130.
 [13] Burt, PB (1974). Solitary waves in nonlinear field theories. Physical Review Letters, 32(19), 1080.
 [14] Burt, P. B., & Reid, J. L. (1976). Exact solution to a nonlinear KleinGordon equation. Journal of Mathematical Analysis and Applications, 55(1), 4345.
 [15] Fleischer, W., & Soff, G. (1984). Bound state solutions of the KleinGordon equation for strong potentials. Zeitschrift f’́ur Naturforschung A, 39(8), 703719.
 [16] Kudryavtsev, A. E. (1975). Solitonlike solutions for a Higgs scalar field. Institute of Theoretical and Experimental Physics.
 [17] Ablowitz, M. J., Kruskal, M. D., & Ladik, J. F. (1979). Solitary wave collisions. SIAM Journal on Applied Mathematics, 36(3), 428437.
 [18] Campbell, D. K., & Peyrard, M. (1986). Solitary wave collisions revisited. Physica D: Nonlinear Phenomena, 18(1), 4753.
 [19] Strauss, W., & Vazquez, L. (1978). Numerical solution of a nonlinear KleinGordon equation. Journal of Computational Physics, 28(2), 271278.
 [20] Jiménez, S., & Vázquez, L. (1990). Analysis of four numerical schemes for a nonlinear KleinGordon equation. Applied Mathematics and Computation, 35(1), 6194.
 [21] Dehghan, M., & Shokri, A. (2009). Numerical solution of the nonlinear KleinGordon equation using radial basis functions. Journal of Computational and Applied Mathematics, 230(2), 400410.
 [22] Cao, W. M., & Guo, B. Y. (1993). Fourier collocation method for solving nonlinear KleinGordon equation. Journal of Computational Physics, 108(2), 296305.
 [23] Sarboland, M., & Aminataei, A. (2015). Numerical solution of the nonlinear KleinGordon equation using multiquadric quasiinterpolation scheme. Univ J Appl Math, 3(3), 4049.
 [24] Rashidinia, J., Ghasemi, M., & Jalilian, R. (2010). Numerical solution of the nonlinear KleinGordon equation. Journal of Computational and Applied Mathematics, 233(8), 18661878.
 [25] Zahra, W. K., Ouf, W. A., & ElAzab, M. S. (2016). A robust uniform Bspline collocation method for solving the generalized PHIfour equation. Applications and Applied Mathematics, 11(1), 384396.
 [26] Korkmaz, A., & Dağ, İ. (2013). Numerical simulations of boundaryforced RLW equation with cubic bsplinebased differential quadrature methods. Arabian Journal for Science and Engineering, 38(5), 11511160.
 [27] Korkmaz, A., & Dağ, I. (2016). Quartic and quintic Bspline methods for advectiondiffusion equation. Applied Mathematics and Computation, 274, 208219.
 [28] Ersoy, O., & Dag, I. (2015). Numerical solutions of the reaction diffusion system by using exponential cubic Bspline collocation algorithms. Open Physics, 13(1).
 [29] Dag, I., & Ersoy, O. (2016). The exponential cubic Bspline algorithm for Fisher equation. Chaos, Solitons & Fractals, 86, 101106.
 [30] Prenter, P. M. (1989). Splines and variational methods, John Wiley & Sons, New York.
 [31] Irk, D., Dag, I., & Tombul, M. (2015). Extended cubic Bspline solution of the advectiondiffusion equation. KSCE Journal of Civil Engineering, 19(4), 929934.
 [32] Korkmaz, A., & Dag, I. (2013). Cubic Bspline differential quadrature methods and stability for Burgers’ equation. Engineering Computations, 30(3), 320344.
 [33] Korkmaz, A., & Dag, I. (2012). Cubic Bspline differential quadrature methods for the advectiondiffusion equation. International Journal of Numerical Methods for Heat & Fluid Flow, 22(8), 10211036.
 [34] Jhangeer, A., & Sharif, S. (2014). Conserved quantities for the nonlinear KleinGordon equation. Afrika Matematika, 25(3), 833840.
 [35] Zaki, S.I., Gardner L.R.T., Gardner G.A., 1997, Numerical simulations of KleinGordon solitary wave interactions Il Nuovo Cimento, 112B, N.7.
 [36] Polyanin, A. D., & Zaitsev, V. F. (2004). Handbook of nonlinear partial differential equations. CRC press.