# Solution to the Klein–Gordon Equation Using FEM

Francisco J. Cardona-García, Fernando Mesa, José Rodrigo González Granada

#### Abstract

The main objective of this paper is to present an approximate numerical solution of the Klein-Gordon equation. For this purpose, the basic concepts associated with the numerical method used to obtain the approximate solution will be presented initially. In our case, we considered as a hypothesis the fact that using the finite element method and in particular the Galerkin method, it is possible to perform a superb numerical approximation of the solution of the Klein-Gordon equation. For this purpose, we will present some of the solutions that have been obtained by employing the modified Adomian decomposition method, via a transformation and Exp-function method and comparison with Adomian's, and using the variational method. This will allow better understanding of the effectiveness of the finite element method because the solutions will be represented in space and time. The novelty results from the fact of being able to take the solutions known as initial and boundary conditions and observe that effectively at great lengths the solution stabilizes at zero and that over time the approximate solutions stabilize. Finally, the simulations obtained by the finite element method indicate that the Klein-Gordon equation is damped nonlinear, its solution stabilizes at  and  and for short times, the function remains close to zero.

Keywords: approximate solution, finite element method, nonlinear equation, the Klein-Gordon equation, the Galerkin solution.

https://doi.org/10.55463/issn.1674-2974.50.7.23

PDF

#### References

LIFSHITZ L. L. A. E. The Classical Theory of Fields. Elsevier, 2010.

SULEMAN M. A. W. Q. Transformed Homotopy Perturbation Method for Approximate Analytical Solution of the Klein-Gordon and Sine-Gordon Equations, 2015.

MESA F., DEVIA-NARVAEZ D., and CARDONA-GARCÍA F. J. Solution to the KDV equation using FEM. Journal of Southwest Jiaotong University, 2023, 58(3): 398-410. https://doi.org/10.35741/issn.0258-2724.58.3.34

BIAZAR J., & GHAZVINI H. He’s Variational Iteration Method for Solving Hyperbolic Differential Equations. International Journal of Nonlinear Sciences and Numerical Simulation, 2007, 8(3): 311-314. https://doi.org/10.1515/IJNSNS.2007.8.3.311

YUSUFOĞLU E. The variational iteration method for studying the Klein-Gordon equation. Applied Mathematics Letters, 2008, 21(7): 669-674. https://doi.org/10.1016/j.aml.2007.07.023

WANG Q., & CHENG D. Numerical solution of damped nonlinear Klein–Gordon equations using variational method and finite element approach. Applied Mathematics and Computation, 2005, 162(1): 381-401. https://doi.org/10.1016/j.amc.2003.12.102

EL-SAYED A. M. A., ELSAID A., and HAMMAD D. A Reliable Treatment of Homotopy Perturbation Method for Solving the Nonlinear Klein-Gordon Equation of Arbitrary (Fractional) Orders. Journal of Applied Mathematics, 2012, 2012: 581481. https://doi.org/10.1155/2012/581481

AGOM E. U., & OGUNFIDITIMI F. O. Exact solution of nonlinear Klein-Gordon equations with quadratic nonlinearity by modified Adomian decomposition method. Journal of Mathematical and Computational Science, 2018, 8: 484-493. https://www.scik.org/index.php/jmcs/article/view/3749

EBAID A. Exact solutions for the generalized Klein-Gordon equation via a transformation and Exp-function method and comparison with Adomian's method. Journal of Computational and Applied Mathematics, 2009, 223(1): 278-290. https://doi.org/10.1016/j.cam.2008.01.010

POZRIKIDIS C. Introduction to Finite and Spectral Element Methods Using MATLAB. 2nd ed. Chapman and Hall/CRC, New York, 2014. https://doi.org/10.1201/b17067

DEVIA D. M., MESA F., and OSPINA R. Analysis of cerebral electrical propagation generated by deep brain stimulation using finite elements. Journal of Physics: Conference Series, 2020, 1671: 012007. https://doi.org/10.1088/1742-6596/1671/1/012007

PLONSEY R., & HEPPNER D. B. Considerations of quasi-stationarity in electrophysiological systems. Bulletin of Mathematical Biophysics, 1967, 29: 657–664. https://doi.org/10.1007/BF02476917

BABU A., & ASHARAF N. Numerical solution of nonlinear Sine-Gordon equation using modified cubic B-spline-based differential quadrature method. Computational Methods for Differential Equations, 2023, 11(2): 369-386. https://doi.org/10.22034/cmde.2022.50331.2091

LANDAU L. D. Y. L. E. M. Teoría Clásica de los Campos, Vol. 2. Editorial Reverté, Mexíco, 1981.

BICKFORD W. B. A First Course in the Finite Element Method. Irwin, Homewood, Illinois, 1990.

OSSA A. A. G. V. A. B. E. Metodología para Resolver por Diferencias Finitas Nuevos Modelos Constitutivos en el Programa FLAC3D, Mexico, 2015.

LEVEQUE R. J. Finite difference methods for ordinary and partial differential equations: steady-state and time-dependent problems. Society for Industrial and Applied Mathematics, Philadelphia, Pennsylvania, 2007.

DEHGHAN M., & SHOKRI A. A meshless method for numerical solution of the one-dimensional wave equation with an integral condition using radial basis functions. Numerical Algorithms, 2009, 52: 461–477. https://doi.org/10.1007/s11075-009-9293-0

### Refbacks

• There are currently no refbacks.