Adding Symplectic ODE solvers

Hello

Hope you are doing well. I wish to add an extension to the current tools for solving ODEs. More specifically I would li ke to ad Symplectic integrators, since they are based on hamiltonian systems and are essential for physics/engineering.

Here is an example as to how the Symplextic integrators can ensure energy conservation in a system as opposed to RK45.

These were the results for 2000 steps

I plan on adding:

  1. Verlet (with both forms of finding position and velocities)
  2. Leapfrog

In the future I could scale up and add higher order integrators like Forest and Ruth or Yoshida or Boris’ Algorithm

I would be grateful if someone could reach out and let me know how viable/useful this feature will be. This would be my first open source contribution so would be grateful if you could also provide feedback.

Hi @arnav5011 Please have a look at ENH: integrate: The case for Symplectic Solvers in ODE Solver · Issue #12690 · scipy/scipy · GitHub too.