Лагранжева динаміка

Інтегрує рівняння руху маятника методом Рунге-Кутти, рахує точний період через еліптичний інтеграл, порівнює з малокутовим наближенням, стежить за збереженням енергії та перевіряє гармонічний осцилятор за аналітичним розв’язком.

Integrates the pendulum equations of motion with Runge-Kutta, computes the exact period through the elliptic integral, compares it with the small-angle approximation, tracks energy conservation and checks a harmonic oscillator against its analytic solution.