← Back to Labs

Runge-Kutta Integrator Comparison

ODE System

Active Methods

Controls

Energy Error

Euler
Midpoint
RK4
Leapfrog

About

Runge-Kutta methods approximate ODEs by evaluating derivatives at intermediate points. Order p means global error O(hᵖ). RK4 uses 4 evaluations per step for O(h⁴) accuracy. Crucially, only symplectic integrators (Leapfrog/Störmer-Verlet) preserve the Hamiltonian structure — their energy error stays bounded for all time, while Euler accumulates drift.