A method of numerically integrating ordinary differential equations by using a trial step at the midpoint of an interval to
cancel out lower-order error terms. The second-order formula is
(1)
(2)
(3)
(where
is a Landau symbol), sometimes known as RK2, and
the fourth-order formula is
(4)
(5)
(6)
(7)
(8)
(Press et al. 1992), sometimes known as RK4. This method is reasonably simple and robust and is a good general candidate for numerical solution of differential
equations when combined with an intelligent adaptive step-size routine.