From Fermat's Principle to Physics-Informed Neural Networks: A Unified Computational Approach to Variational Physics

Read full text
Authors: Aman Razdan, Aditya Mazumdar, Amit Tanwar, P. Ashdhir
Cited by: 0

Abstract

Variational principles are a unifying mathematical framework across many areas of physics, yet their instruction at the undergraduate level remains primarily analytical. This work presents a pedagogically oriented and computationally enhanced approach to variational modeling that integrates contemporary tools including gradient descent, automatic differentiation, and Physics-Informed Neural Networks (PINNs). Classical variational problems are reformulated as optimization tasks and implemented using open-source Python libraries such as NumPy, Matplotlib, PyTorch, and JAX. The proposed approach is demonstrated through a progression of problems drawn from standard undergraduate curricula, including the derivation of Snell's law from Fermat's principle, projectile motion with and without viscous drag, simple harmonic motion, nonlinear pendulum with damping, steady-state heat conduction governed by the Laplace and Poisson equations with nonlinear temperature-dependent internal heat generation, the double pendulum via the principle of least action, and variational treatments of vibrating strings. In addition, quantum mechanical applications are presented through variational solutions of the hydrogen atom, helium atom, and a schematic nuclear model of the silicon nucleus, illustrating the breadth of the framework across classical, quantum, and nuclear physics. The approach aims to enhance conceptual understanding while simultaneously introducing students to modern computational research methodologies.

Fields of Study & Subjects

Machine Learning in Materials Science Model Reduction and Neural Networks Computational Physics and Python Applications

Publication details

Journal / source
arXiv (Cornell University)
Publication date
3 January 2026
Document type
Preprint