Runge–Kutta–Fehlberg method

In mathematics, the Runge–Kutta–Fehlberg method (or Fehlberg method) is an algorithm in numerical analysis for the numerical solution of ordinary differential equations. It was developed by the German mathematician Erwin Fehlberg and is based on the large class of Runge–Kutta methods.

The novelty of Fehlberg's method is that it is an embedded method from the Runge–Kutta family, meaning that it reuses the same intermediate calculations to produce two estimates of different accuracy, allowing for automatic error estimation. The method presented in Fehlberg's 1969 paper has been dubbed the RKF45 method, and is a method of order O(h4) with an error estimator of order O(h5). By performing one extra calculation, the error in the solution can be estimated and controlled by using the higher-order embedded method that allows for an adaptive stepsize to be determined automatically.

Butcher tableau for Fehlberg's 4(5) method

Any Runge–Kutta method is uniquely identified by its Butcher tableau. The embedded pair proposed by Fehlberg

0
1/41/4
3/83/329/32
12/131932/2197−7200/21977296/2197
1439/216−83680/513−845/4104
1/2−8/272−3544/25651859/4104−11/40
16/13506656/1282528561/56430−9/502/55
25/21601408/25652197/4104−1/50

The first row of coefficients at the bottom of the table gives the fifth-order accurate method, and the second row gives the fourth-order accurate method.

This shows the computational time in real time used during a 3-body simulation evolved with the Runge-Kutta-Fehlberg method. Most of the computer time is spent when the bodies pass close by and are susceptible to numerical error.

Implementing an RK4(5) Algorithm

The coefficients found by Fehlberg for Formula 1 (derivation with his parameter α2=1/3) are given in the table below:

Fehlberg outlines a solution to solving a system of n differential equations of the form: to iterative solve for where h is an adaptive stepsize to be determined algorithmically:

The solution is the weighted average of six increments, where each increment is the product of the size of the interval, , and an estimated slope specified by function f on the right-hand side of the differential equation.

Then the weighted average is:

The estimate of the truncation error is:

At the completion of the step, a new stepsize is calculated:

If , then replace with and repeat the step. If , then the step is completed. Replace with for the next step.

The coefficients found by Fehlberg for Formula 2 (derivation with his parameter α2 = 3/8) are given in the table below, using array indexing of base 1 instead of base 0 to be compatible with most computer languages:

In another table in Fehlberg, coefficients for an RKF4(5) derived by D. Sarafyan are given:

See also

Notes

References

  • Fehlberg, Erwin (1968) Classical fifth-, sixth-, seventh-, and eighth-order Runge-Kutta formulas with stepsize control. NASA Technical Report 287. https://ntrs.nasa.gov/api/citations/19680027281/downloads/19680027281.pdf
  • Fehlberg, Erwin (1969) Low-order classical Runge-Kutta formulas with stepsize control and their application to some heat transfer problems. Vol. 315. National aeronautics and space administration.
  • Fehlberg, Erwin (1969). "Klassische Runge-Kutta-Nystrom-Formeln funfter und siebenter Ordnung mit Schrittweiten-Kontrolle". Computing. 4: 93–106. doi:10.1007/BF02234758. S2CID 38715401.
  • Fehlberg, Erwin (1970) Some experimental results concerning the error propagation in Runge-Kutta type integration formulas. NASA Technical Report R-352. https://ntrs.nasa.gov/api/citations/19700031412/downloads/19700031412.pdf
  • Fehlberg, Erwin (1970). "Klassische Runge-Kutta-Formeln vierter und niedrigerer Ordnung mit Schrittweiten-Kontrolle und ihre Anwendung auf Wärmeleitungsprobleme," Computing (Arch. Elektron. Rechnen), vol. 6, pp. 61–71.doi:10.1007/BF02241732
  • Hairer, Ernst; Nørsett, Syvert; Wanner, Gerhard (1993). Solving Ordinary Differential Equations I: Nonstiff Problems (Second ed.). Berlin: Springer-Verlag. ISBN 3-540-56670-8.
  • Sarafyan, Diran (1966) Error Estimation for Runge-Kutta Methods Through Pseudo-Iterative Formulas. Technical Report No. 14, Louisiana State University in New Orleans, May 1966.

Further reading

Uses material from the Wikipedia article Runge–Kutta–Fehlberg method, released under the CC BY-SA 4.0 license.