Discrete and Continuous Models and Applied Computational ScienceDiscrete and Continuous Models and Applied Computational Science2658-46702658-7149Peoples' Friendship University of Russia named after Patrice Lumumba (RUDN University)2518010.22363/2658-4670-2020-28-4-327-345Research ArticleOn the realization of explicit Runge-Kutta schemes preserving quadratic invariants of dynamical systemsYingYu<p>Assistant Professor of Department of Algebra and Geometry</p>yingy6165@gmail.comMalykhMikhail D.<p>doctor of Physical and Mathematical Sciences, Assistant Professor of Department of Applied Probability and Informatics</p>malykh_md@pfur.ruKaili UniversityPeoples’ Friendship University of Russia (RUDN University)1512202028432734509122020Copyright © 2020, Ying Y., Malykh M.D.2020<p>We implement several explicit Runge-Kutta schemes that preserve quadratic invariants of autonomous dynamical systems in Sage. In this paper, we want to present our package ex.sage and the results of our numerical experiments. In the package, the functions rrk_solve, idt_solve and project_1 are constructed for the case when only one given quadratic invariant will be exactly preserved. The function phi_solve_1 allows us to preserve two specified quadratic invariants simultaneously. To solve the equations with respect to parameters determined by the conservation law we use the elimination technique based on Grbner basis implemented in Sage. An elliptic oscillator is used as a test example of the presented package. This dynamical system has two quadratic invariants. Numerical results of the comparing of standard explicit Runge-Kutta method RK(4,4) with rrk_solve are presented. In addition, for the functions rrk_solve and idt_solve, that preserve only one given invariant, we investigated the change of the second quadratic invariant of the elliptic oscillator. In conclusion, the drawbacks of using these schemes are discussed.</p>Explicit Runge-Kutta methodquadratic invariantdynamical systemSageSageявный метод Рунге-Куттыквадратичный инвариантдинамическая система[A. Goriely, Integrability and nonintegrability of dynamical systems. Singapore; River Edge, NJ: World Scientific, 2001. DOI: 10.1142/3846.][J. C. Butcher, “On Runge-Kutta processes of high order,” Journal of the Australian Mathematical Society, vol. 4, no. 2, pp. 179-194, 1964. DOI: 10.1017/S1446788700023387.][E. Hairer, G. Wanner, and S. P. Nørsett, Solving ordinary differential equations I: Nonstiff Problems, 3rd ed. New York: Springer, 1993, vol. 1. DOI: 10.1007/978-3-540-78862-1.][K. Burrage and J. C. Butcher, “Stability criteria for implicit Runge- Kutta methods,” SIAM Journal on Numerical Analysis, vol. 16, no. 1, pp. 46-57, 1979. DOI: 10.1137/0716004.][G. Cooper, “Stability of Runge-Kutta methods for trajectory problems,” IMA journal of numerical analysis, vol. 7, no. 1, pp. 1-13, 1987. DOI: 10.1093/imanum/7.1.1.][E. Hairer, G. Wanner, and C. Lubich, Geometric numerical integration. Structure-preserving algorithms for ordinary differential equations. Berlin Heidelberg New York: Springer, 2000.][J.-M. Sanz-Serna and M.-P. Calvo, Numerical hamiltonian problems. Courier Dover Publications, 2018.][H. Zhang, X. Qian, J. Yan, and S. Song, “Highly efficient invariantconserving explicit Runge-Kutta schemes for nonlinear Hamiltonian differential equations,” Journal of Computational Physics, p. 109 598, 2020.][W. H. Press, B. P. Flannery, S. A. Teukolsky, W. T. Vetterling, et al., Numerical recipes. Cambridge University Press Cambridge, 1989.][N. Del Buono and C. Mastroserio, “Explicit methods based on a class of four stage fourth order Runge-Kutta methods for preserving quadratic laws,” Journal of Computational and Applied Mathematics, vol. 140, pp. 231-243, 2002. DOI: 10.1016/S0377-0427(01)00398-3.][M. Calvo, D. Hernández-Abreu, J. I. Montijano, and L. Rández, “On the preservation of invariants by explicit Runge-Kutta methods,” SIAM Journal on Scientific Computing, vol. 28, no. 3, pp. 868-885, 2006. DOI: 10.1137/04061979X.][Y. Ying. (2020). “Package ex.sage,” [Online]. Available: https://malykhmd.neocities.org.][Y. S. Sikorsky, Elements of the theory of elliptic functions with applications to mechanics [Elementy teoriy ellipticheskikh funktsiy s prilozheniyami v mekhanike]. Moscow-Leningrad: ONTI, 1936, In Russian.][D. Cox, J. Little, D. O’Shea, and M. Sweedler, “Ideals, varieties, and algorithms,” American Mathematical Monthly, vol. 101, no. 6, pp. 582- 586, 1994.][The Sage Developers, Sagemath, the Sage Mathematics Software System (Version 7.4), https://www.sagemath.org, 2016.]