- Open Access
Symbolic rediscovery of amplitude-frequency relations in nonlinear Duffing oscillators via machine learning
APS Open Sci. 1, 000169 – Published 13 October, 2026
DOI: https://doi.org/10.1103/4vc6-mhnh
Abstract
Nonlinear oscillators are ubiquitous in physics and engineering, yet finding explicit analytical expressions for their amplitude-dependent frequency remains a fundamental challenge. The Duffing equation is the paradigmatic model for this class of problems, and despite decades of progress through perturbative, variational, and homotopic methods, general closed-form frequency relations are unavailable for most of its configurations. In this work, we investigate whether symbolic regression (SR)—a machine-learning technique that searches for interpretable mathematical expressions directly from data—can recover the closed-form amplitude-frequency relations produced by classical methods, and approximate them where no closed form is available. We generate reference datasets using four classical approaches: the Lindstedt-Poincaré method, first-harmonic balance, multiharmonic balance, and numerical integration via a Runge-Kutta 4–5 scheme. We stress at the outset that, for the analytical and semianalytical methods, the training labels are obtained by evaluating the corresponding closed-form expressions; recovering those expressions therefore constitutes symbolic rediscovery of a known formula from sampled data, rather than discovery of new physics. The only genuinely dynamics-based case is the quintic oscillator labeled with Runge-Kutta integration followed by spectral analysis. SR, implemented through PySR, is then trained on these datasets for six configurations spanning cubic, quartic, and quintic nonlinearities under both free and forced conditions. In all free-oscillator datasets the oscillation amplitude is fixed (normalized to ), so the learned relations are parameter-frequency relations at fixed amplitude. For free oscillators with known analytical solutions, SR reproduces the reference expressions to machine-level numerical precision (, mean squared error (MSE) ), returning the Lindstedt-Poincaré, harmonic-balance, and first-harmonic-balance expressions used to generate the labels. For forced oscillators, where the response amplitude is defined implicitly as the root of a cubic (or quintic) polynomial in , SR captures the dominant resonance structure but cannot fully resolve the implicit-root behavior with the present algebraic operator set (). These results position SR as a practical complement to classical analytical approaches to nonlinear dynamics, with particular value in contexts where specialized perturbative methods are inaccessible or their validity is restricted to narrow parameter regimes. We are explicit about the limits of the present scope: amplitude dependence, robustness to noise, extrapolation beyond the training box, and run-to-run variability of the stochastic search are identified as the validation steps required before any claim of genuine discovery can be made.
Physics Subject Headings (PhySH)
Article Text
References (33)
- G. Duffing, Erzwungene Schwingungen bei veränderlicher Eigenfrequenz und ihre technische Bedeutung (Vieweg, Braunschweig, 1918).
- J. Guckenheimer and P. Holmes, Nonlinear Oscillations, Dynamical Systems, and Bifurcations of Vector Fields, Applied Mathematical Sciences (Springer-Verlag, New York, 1983), Vol. 42.
- P. Kumi, S. A. Martin, V. V. Yakovlev, M. S. Hilario, B. W. Hoff, and I. M. Rittersdorf, Analytical solution of the Duffing equation, COMPEL 39, 481 (2020).
- S. Nagarajaiah, A. M. Reinhorn, and M. C. Constantinou, Nonlinear dynamic analysis of three-dimensional base isolated structures, J. Struct. Eng. 117, 2035 (1991).
- R. Rana and T. T. Soong, Parametric study and simplified design of tuned mass dampers, Eng. Struct. 20, 193 (1998).
- R. A. Ibrahim, Friction-induced vibration, chatter, squeal, and chaos. Part II: Dynamics and modeling, Appl. Mech. Rev. 47, 227 (1994).
- A. Lindstedt, Ueber die integration einer für die störungstheorie wichtigen differentialgleichung, Astron. Nachr. 103, 211 (1882).
- H. Poincaré, New Methods of Celestial Mechanics, History of Modern Physics and Astronomy (American Institute of Physics, New York, 1993), Vol. 2.
- E. J. Hinch, Perturbation Methods (Cambridge University Press, Cambridge, 1991).
- C. M. Bender, K. A. Milton, S. S. Pinsky, and L. M. Simmons, Jr., A new perturbative approach to nonlinear problems, J. Math. Phys. 30, 1447 (1989).
- A. H. Nayfeh and D. T. Mook, Nonlinear Oscillations (Wiley-VCH, New York, 1995).
- J.-H. He, Preliminary report on the energy balance for nonlinear oscillations, Mech. Res. Commun. 29, 107 (2002).
- P. Amore and A. Aranda, Presenting a new method for the solution of nonlinear problems, Phys. Lett. A 316, 218 (2003).
- P. Amore and A. Aranda, Improved Lindstedt–Poincaré method for the solution of nonlinear problems, J. Sound Vib. 283, 1115 (2005).
- C.-S. Liu and Y.-W. Chen, A simplified Lindstedt-Poincaré method for saving computational cost to determine higher order nonlinear free vibrations, Mathematics 9, 3070 (2021).
- R. E. Mickens, Harmonic balance and iteration calculations of periodic solutions to , J. Sound Vib. 306, 968 (2007).
- A. Beléndez, D. I. Méndez, E. Fernández, S. Marini, and I. Pascual, Exact solution for the unforced Duffing oscillator with cubic and quintic nonlinearities, Phys. Lett. A 373, 2805 (2009).
- J.-H. He, Variational principles for some nonlinear partial differential equations with variable coefficients, Chaos Solitons Fractals 19, 847 (2004).
- J.-H. He, Linearized perturbation technique and its applications to strongly nonlinear oscillators, Comput. Math. Appl. 45, 1 (2003).
- J.-H. He, The homotopy perturbation method for nonlinear oscillators with discontinuities, Appl. Math. Comput. 151, 287 (2004).
- P. Amore and F. M. Fernandez, He's amazing calculations with the Ritz method, arXiv:0901.4660.
- F. M. Fernandez, Homotopy perturbation method: When infinity equals five, arXiv:0810.3318.
- F. M. Fernandez, On the application of homotopy perturbation method to differential equations, arXiv:0808.2078.
- B. R. Brum, L. Lober, I. Previdelli, and F. A. Rodrigues, Discovering equations from data: Symbolic regression in dynamical systems, J. Phys. Complex. 7, 012001 (2026).
- Y. Matsubara, N. Chiba, R. Igarashi, T. Taniai, and Y. Ushiku, Rethinking symbolic regression datasets and benchmarks for scientific discovery, J. Data-centric Mach. Learn. Res. (2024).
- D. J. Bartlett, H. Desmond, P. G. Ferreira, and G. Kronberger, Introduction to the special issue on symbolic regression in the physical sciences, Phil. Trans. R. Soc. A 384, 20240600 (2026).
- S. Kim, P. Y. Lu, S. Mukherjee, M. Gilbert, L. Jing, V. Ceperic, and M. Soljačić, Integration of neural network-based symbolic regression in deep learning for scientific discovery, IEEE Trans. Neural Networks Learn. Syst. 32, 4166 (2021).
- T. Pirbodaghi, S. H. Hoseini, M. T. Ahmadian, and G. H. Farrahi, Duffing equations with cubic and quintic nonlinearities, Comput. Math. Appl. 59, 3095 (2010).
- O. M. Al-Habahbeh, M. Al-Saqqa, M. Safi, and T. A. Khater, An analytical approximate technique for solving cubic–quintic Duffing oscillator, Alexandria Eng. J. 55, 1347 (2016).
- M. S. Al-Amry, A. Maher, and H. M. El-Hawary, A semi-analytical iterative technique for solving Duffing equations, Int. J. Pure Appl. Math. 108, 751 (2016).
- E. Hairer, S. P. Nørsett, and G. Wanner, Solving Ordinary Differential Equations I: Nonstiff Problems, 3rd ed. (Springer, Berlin, 2008).
- M. Cranmer, PySR: Fast & parallelized symbolic regression in Python and Julia, GitHub, 2023, https://github.com/MilesCranmer/PySR.
- I. Luviano-Soto, J. P. Pérez Aguilar, and A. Raya, Duffing_SR: Data and code for symbolic rediscovery of amplitude-frequency relations in Duffing oscillators, GitHub, 2026, https://github.com/Itzel-LS/Duffing_SR.