arXiv.itsnick.co

an independent field guide to 23 million papers from arXiv & OpenAlex — not affiliated with arXiv.org

Mathematics · Numerical Analysis

Calculation of modified Hamiltonian in Sage

Mikhail D. Malykh, Marina Konyaeva

· DOAJ (DOAJ: Directory of Open Access Journals)

See on the map

Abstract

The algebraic properties of difference approximations of Hamiltonian systems are investigated. Symplectic schemes exactly preserve linear and quadratic integrals by virtue of Cooper's theorem, but not the total mechanical energy of nonlinear systems. However, it is known that instead of energy, symplectic difference schemes preserve with a given order of approximation a quantity that goes over into the Hamiltonian as the time step tends to zero. The paper presents an algorithm for calculating such a modified Hamiltonian and its implementation in the Sage computer algebra system for a given symplectic difference scheme, the required order of energy conservation, and the Hamiltonian of the original mechanical system. The program successfully reproduces formulas previously derived manually, which confirms its consistency. Numerical experiments show that solutions obtained using symplectic schemes closely coincide with the level lines of the modified Hamiltonian, which emphasizes its role in preserving the qualitative behavior of the system during numerical integration over large time intervals

More like this