Solving Nonlinear Klein-Gordon Equations via PyDEns: A Neural Network-Based PDE Solver
Abstract
We propose PyDEns, a neural network-based framework for solving partial differential equations (PDEs), applied to nonlinear Klein-Gordon equations. The method uses a deep feedforward neural network with four hidden layers containing 30, 40, 50, and 60 neurons respectively. The training process employs a composite loss function integrating the residuals of the PDE, initial, and Neumann boundary conditions. Optimization is carried out using stochastic gradient descent (SGD). Dataset generation is performed by sampling collocation points across the spatiotemporal domain. The model achieves high accuracy, with a maximum relative L2 error of 2.3 × 10−4 and RMSE as low as 0.0021, depending on the test case. Results show excellent agreement with known analytical solutions and fast convergence within 600 training iterations, demonstrating PyDEns’ potential as an efficient and generalizable solver for nonlinear PDEs.DOI:
https://doi.org/10.31449/inf.v49i28.8912Downloads
Published
How to Cite
Issue
Section
License
Authors retain copyright in their work. By submitting to and publishing with Informatica, authors grant the publisher (Slovene Society Informatika) the non-exclusive right to publish, reproduce, and distribute the article and to identify itself as the original publisher.
All articles are published under the Creative Commons Attribution license CC BY 3.0. Under this license, others may share and adapt the work for any purpose, provided appropriate credit is given and changes (if any) are indicated.
Authors may deposit and share the submitted version, accepted manuscript, and published version, provided the original publication in Informatica is properly cited.







