rk4


rk4, an Octave code which implements a simple Runge-Kutta (RK) solver of order 4 for a system of ordinary differential equations (ODEs).

Licensing:

The computer code and data files described and made available on this web page are distributed under the MIT license

Languages:

rk4 is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and an Octave version and a Python version.

Related Data and Programs:

euler, an Octave code which solves one or more ordinary differential equations (ODE) using the forward Euler method.

midpoint, an Octave code which solves one or more ordinary differential equations (ODE) using the midpoint method.

rk12, an Octave code which implements Runge-Kutta ODE solvers of orders 1 and 2.

rk23, an Octave code which implements Runge-Kutta ODE solvers of orders 2 and 3.

rk34, an Octave code which implements Runge-Kutta ODE solvers of orders 3 and 4.

rk4_test

rk45, an Octave code which implements Runge-Kutta ODE solvers of orders 4 and 5.

rkf45, an Octave code which implements the Runge-Kutta-Fehlberg ODE solver.

Reference:

  1. Erwin Fehlberg,
    Low-order Classical Runge-Kutta Formulas with Stepsize Control,
    NASA Technical Report R-315, 1969.
  2. Lawrence Shampine, Herman Watts, S Davenport,
    Solving Non-stiff Ordinary Differential Equations - The State of the Art,
    SIAM Review,
    Volume 18, pages 376-411, 1976.

Source Code:


Last revised on 12 October 2020.