A collocation method based on extended cubic B-splines for numerical solutions of the Klein-Gordon equation
A generalization of classical cubic B-spline functions with a parameter is used as basis in the collocation method. Some initial boundary value problems constructed on the nonlinear Klein-gordon 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 Crank-Nicolson 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: Klein-Gordon Equation; Extended cubic B-spline; collocation; wave motion.
In the study, we derive numerical solutions for some initial boundary value problems constructed with the nonlinear Klein-Gordon (NKG) equation of the form
where , and , are real parameters. 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. 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. The geometrical derivation of the NKG requires some particular gauges and coordinate transformations. 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. 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. The static external field case was also studied for the Klein-Gordon equation. 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. Dusuel et al. 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  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. 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.
Various types of wave solutions like positive or negative frequency plane waves can also be derived from the solutions of convenient field equations. Burt and Reid  set up the exact formal solution of the nonlinear Klein-Gordon equation from the solutions of the linear one. The Klein-gordon equation has also bound state solutions for different attractive potential types. 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 . 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  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 emphasises that the collocation method based on thin plate spline-radial 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. 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.
The classical polynomial cubic B-spline 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 B-splines, namely extended cubic B-splines to solve some initial boundary value problems for the NKG equation. The nature of these B-splines has some siginificant differences from the other B-splines like calassical polynomial [26, 27], or exponential B-splines[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
by assuming . The initial data
and homogenous Neumann boundary conditions
are chosen in the finite problem interval for the convenience.
2 Numerical Integration of the NKG equation
The Crank-Nicolson and the suitable forward finite difference for the time integration of the coupled system (2) yields
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.
Linearization of the term in (4) as
gives the time-integrated system as
where is the real extension parameter. The classical cubic B-spline 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 B-spline directly, Fig 1. The relations between the grids and nonzero functional and derivative values of each extended cubic B-spline at the partition of are calculated as in Table 1.
Let and be the approximate solutions to and , respectively, defined as
in which and are the time dependent new variables. The functional values of and and their derivatives are determined by using (7) as
where and are general notations. denotes when is chosen as and it stands for when .
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 six-banded coefficient matrices that is adapted from the algorithm for the systems having seven-banded 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
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]
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
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
describes a traveling wave moving along the axis with the velocity . 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
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 .
3.2 Single Solitary Wave Case
The single solitary wave solution of the NKG is derived from the solution in Polyanin’s book as
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
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 .
The extended form of the cubic polynomial B-splines are used as basis in the collocation method for the solutions of the nonlinear Klein-Gordon equation. The order of the NKG is reduced to one to be able to integrate in time by Crank-Nicolson method. The dependent variables in the resulting system are approximated by the extended cubic B-splines. 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 B-spline 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, Ankara-Turkey, 2016.
-  Whitham, GB: Linear and Nonlinear Waves, John Wiley & Sons, Newyork(1999).
-  Debnath L: Nonlinear Partial Differential Equations for Scientists and Engineers, Birkhauser, Boston(2005).
-  Detweiler, S: Klein-Gordon equation and rotating black holes. Phys. Rev. D, 22(10), 2323-2326 (1980).
-  Galehouse, DC: Geometrical derivation of the Klein-Gordon equation. Int. J. Theor. Phys., 20(6), 457-479(1981).
-  Weder, RA: Scattering theory for the Klein-Gordon equation. J. Func. Anal., 27(1), 100-117(1978).
-  Ablowitz, MJ:Nonlinear Dispersive Waves, Cambridge University Press, Cambridge(2011).
-  Lundberg, LE: Spectral and scattering theory for the Klein-Gordon equation. Commun. Math. Phys., 31(3), 243-257(1973).
-  Sharma, AS, & Buti, B: Envelope solitons and holes for sine-Gordon and non-linear Klein-Gordon equations. J. Phys. A-Math. Gen., 9(11), 1823-1826(1976)..
-  Dusuel, S, Michaux, P, & Remoissenet, M: From kinks to compactonlike kinks. Phys. Rev. E., 57(2), 2320-2326(1998).
-  Kim, JJ, & Hong, WP: New solitary-wave solutions for the generalized reaction Duffing model and their dynamics. Z. Naturforsch. Pt. A, 59(11), 721-728 (2004).
-  Huang, D. J., & Zhang, H. Q. (2005). The extended first kind elliptic sub-equation method and its application to the generalized reaction Duffing model. Physics Letters A, 344(2), 229-237.
-  Akter, J., & Akbar, M. A. (2015). Exact solutions to the Benney-Luke equation and the Phi-4 equations by using modified simple equation method. Results in Physics, 5, 125-130.
-  Burt, PB (1974). Solitary waves in nonlinear field theories. Physical Review Letters, 32(19), 1080.
-  Burt, P. B., & Reid, J. L. (1976). Exact solution to a nonlinear Klein-Gordon equation. Journal of Mathematical Analysis and Applications, 55(1), 43-45.
-  Fleischer, W., & Soff, G. (1984). Bound state solutions of the Klein-Gordon equation for strong potentials. Zeitschrift f’́ur Naturforschung A, 39(8), 703-719.
-  Kudryavtsev, A. E. (1975). Solitonlike solutions for a Higgs scalar field. Institute of Theoretical and Experimental Physics.
-  Ablowitz, M. J., Kruskal, M. D., & Ladik, J. F. (1979). Solitary wave collisions. SIAM Journal on Applied Mathematics, 36(3), 428-437.
-  Campbell, D. K., & Peyrard, M. (1986). Solitary wave collisions revisited. Physica D: Nonlinear Phenomena, 18(1), 47-53.
-  Strauss, W., & Vazquez, L. (1978). Numerical solution of a nonlinear Klein-Gordon equation. Journal of Computational Physics, 28(2), 271-278.
-  Jiménez, S., & Vázquez, L. (1990). Analysis of four numerical schemes for a nonlinear Klein-Gordon equation. Applied Mathematics and Computation, 35(1), 61-94.
-  Dehghan, M., & Shokri, A. (2009). Numerical solution of the nonlinear Klein-Gordon equation using radial basis functions. Journal of Computational and Applied Mathematics, 230(2), 400-410.
-  Cao, W. M., & Guo, B. Y. (1993). Fourier collocation method for solving nonlinear Klein-Gordon equation. Journal of Computational Physics, 108(2), 296-305.
-  Sarboland, M., & Aminataei, A. (2015). Numerical solution of the nonlinear Klein-Gordon equation using multiquadric quasi-interpolation scheme. Univ J Appl Math, 3(3), 40-49.
-  Rashidinia, J., Ghasemi, M., & Jalilian, R. (2010). Numerical solution of the nonlinear Klein-Gordon equation. Journal of Computational and Applied Mathematics, 233(8), 1866-1878.
-  Zahra, W. K., Ouf, W. A., & El-Azab, M. S. (2016). A robust uniform B-spline collocation method for solving the generalized PHI-four equation. Applications and Applied Mathematics, 11(1), 384-396.
-  Korkmaz, A., & Dağ, İ. (2013). Numerical simulations of boundary-forced RLW equation with cubic b-spline-based differential quadrature methods. Arabian Journal for Science and Engineering, 38(5), 1151-1160.
-  Korkmaz, A., & Dağ, I. (2016). Quartic and quintic B-spline methods for advection-diffusion equation. Applied Mathematics and Computation, 274, 208-219.
-  Ersoy, O., & Dag, I. (2015). Numerical solutions of the reaction diffusion system by using exponential cubic B-spline collocation algorithms. Open Physics, 13(1).
-  Dag, I., & Ersoy, O. (2016). The exponential cubic B-spline algorithm for Fisher equation. Chaos, Solitons & Fractals, 86, 101-106.
-  Prenter, P. M. (1989). Splines and variational methods, John Wiley & Sons, New York.
-  Irk, D., Dag, I., & Tombul, M. (2015). Extended cubic B-spline solution of the advection-diffusion equation. KSCE Journal of Civil Engineering, 19(4), 929-934.
-  Korkmaz, A., & Dag, I. (2013). Cubic B-spline differential quadrature methods and stability for Burgers’ equation. Engineering Computations, 30(3), 320-344.
-  Korkmaz, A., & Dag, I. (2012). Cubic B-spline differential quadrature methods for the advection-diffusion equation. International Journal of Numerical Methods for Heat & Fluid Flow, 22(8), 1021-1036.
-  Jhangeer, A., & Sharif, S. (2014). Conserved quantities for the non-linear Klein-Gordon equation. Afrika Matematika, 25(3), 833-840.
-  Zaki, S.I., Gardner L.R.T., Gardner G.A., 1997, Numerical simulations of Klein-Gordon solitary wave interactions Il Nuovo Cimento, 112B, N.7.
-  Polyanin, A. D., & Zaitsev, V. F. (2004). Handbook of nonlinear partial differential equations. CRC press.