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).[1] 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
[edit | edit source]Any Runge–Kutta method is uniquely identified by its Butcher tableau. The embedded pair proposed by Fehlberg:[2]
| κ | ακ | βκλ | cκ (4th order) | ĉκ (5th order) | ||||
|---|---|---|---|---|---|---|---|---|
| λ=0 | λ=1 | λ=2 | λ=3 | λ=4 | ||||
| 0 | 0 | 0 | 25/216 | 16/135 | ||||
| 1 | 1/4 | 1/4 | 0 | 0 | ||||
| 2 | 3/8 | 3/32 | 9/32 | 1408/2565 | 6656/12825 | |||
| 3 | 12/13 | 1932/2197 | −7200/2197 | 7296/2197 | 2197/4104 | 28561/56430 | ||
| 4 | 1 | 439/216 | −8 | 3680/513 | −845/4104 | −1/5 | −9/50 | |
| 5 | 1/2 | −8/27 | 2 | −3544/2565 | 1859/4104 | −11/40 | 2/55 | |

Implementing an RK4(5) Algorithm
[edit | edit source]The coefficients found by Fehlberg for Formula 1 (derivation with his parameter α2=1/3) are given in the table below. Note that while Fehlberg's original tables begin indexing at 0, the standard mathematical convention for Runge–Kutta methods established by Butcher uses coefficients denoted as with and . Therefore, when implementing these methods in programming languages that use 0-based array indexing, there is a shift between the mathematical notation and array indices: what appears as in the mathematical formulation corresponds to index 0 in the implementation arrays.[3]
| κ | ακ | βκλ | cκ (4th order) | ĉκ (5th order) | ||||
|---|---|---|---|---|---|---|---|---|
| λ=0 | λ=1 | λ=2 | λ=3 | λ=4 | ||||
| 0 | 0 | 0 | 1/9 | 47/450 | ||||
| 1 | 2/9 | 2/9 | 0 | 0 | ||||
| 2 | 1/3 | 1/12 | 1/4 | 9/20 | 12/25 | |||
| 3 | 3/4 | 69/128 | −243/128 | 135/64 | 16/45 | 32/225 | ||
| 4 | 1 | -17/12 | 27/4 | -27/5 | 16/15 | 1/12 | 1/30 | |
| 5 | 5/6 | 65/432 | -5/16 | 13/16 | 4/27 | 5/144 | 6/25 | |
Fehlberg[4] 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:[2]
The estimate of the truncation error is:[2]
where and are the 4th- and 5th-order weights from the embedded Runge–Kutta pair, and are the stage derivatives.
At the completion of the step, a new stepsize is calculated:[5]
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:
| κ | ακ | βκλ | cκ (4th order) | ĉκ (5th order) | ||||
|---|---|---|---|---|---|---|---|---|
| λ=0 | λ=1 | λ=2 | λ=3 | λ=4 | ||||
| 0 | 0 | 0 | 25/216 | 16/135 | ||||
| 1 | 1/4 | 1/4 | 0 | 0 | ||||
| 2 | 3/8 | 3/32 | 9/32 | 1408/2565 | 6656/12825 | |||
| 3 | 12/13 | 1932/2197 | -7200/2197 | 7296/2197 | 2197/4104 | 28561/56430 | ||
| 4 | 1 | 439/216 | -8 | 3680/513 | -845/4104 | -1/5 | -9/50 | |
| 5 | 1/2 | -8/27 | 2 | -3544/2565 | 1859/4104 | -11/40 | 2/55 | |
In another table in Fehlberg,[2] coefficients for an RKF4(5) derived by D. Sarafyan are given:
| κ | ακ | βκλ | cκ (4th order) | ĉκ (5th order) | ||||
|---|---|---|---|---|---|---|---|---|
| λ=0 | λ=1 | λ=2 | λ=3 | λ=4 | ||||
| 0 | 0 | 0 | 1/6 | 1/24 | ||||
| 1 | 1/2 | 1/2 | 0 | 0 | ||||
| 2 | 1/2 | 1/4 | 1/4 | 2/3 | 0 | |||
| 3 | 1 | 0 | -1 | 2 | 1/6 | 5/48 | ||
| 4 | 2/3 | 7/27 | 10/27 | 0 | 1/27 | 27/56 | ||
| 5 | 1/5 | 28/625 | -1/5 | 546/625 | 54/625 | -378/625 | 125/336 | |
See also
[edit | edit source]- List of Runge–Kutta methods
- Numerical methods for ordinary differential equations
- Runge–Kutta methods
Notes
[edit | edit source]- ^ According to Hairer et al. (1993, §II.4), the method was originally proposed in Fehlberg (1969); Fehlberg (1970) is an extract of the latter publication.
- ^ a b c d e f g h Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- ^ Hairer, Nørsett & Wanner (1993, p. 177) refer to Fehlberg (1969)
- ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
References
[edit | edit source]- 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.
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- 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. Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- 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
[edit | edit source]- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value)..
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value)..
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value)..
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
- Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).