We present a Physics-Informed Neural Network (PINN) approach to solving the Lane–Emden equation, a model used to describe polytropic stars’ behavior in astrophysics. The equation is reformulated as a two-dimensional problem; we treat both the radial coordinate and polytropic index as inputs for the neural network. In order to improve stability and accuracy, we introduced coordinate embedding via Random Fourier Features, residual blocks, and gating mechanisms. Experiments show that our neural networks outperform other traditional numerical methods, including Monte Carlo simulations and standard fully connected PINNs. We achieve accurate predictions for both trained and extrapolated polytropic indices. The code used to implement our method is publicly available providing researchers with the resources to replicate and extend our work.
Mohuț et al. (Sun,) studied this question.