Tool
Python
Advanced
30 min
Perturbation theory with SymPy: the Duffing oscillator's frequency shift
Afterwards you can carry out a Lindstedt-Poincaré expansion to second order with SymPy, remove the secular terms, and check the frequency against solve_ivp.