Runge–Kutta–Fehlberg method

{{Short description|Algorithm in numerical analysis}}

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).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. 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{{harvtxt|Hairer|Nørsett|Wanner|1993|p=177}} refer to {{harvtxt|Fehlberg|1969}}

cellpadding=3px cellspacing=0px

|width="20px"|

style="border-right:1px solid;" | 0
style="border-right:1px solid;" | 1/41/4
style="border-right:1px solid;" | 3/83/329/32
style="border-right:1px solid;" | 12/131932/2197−7200/21977296/2197
style="border-right:1px solid;" | 1439/216−83680/513−845/4104
style="border-right:1px solid; border-bottom:1px solid;" | 1/2style="border-bottom:1px solid;" | −8/27style="border-bottom:1px solid;" | 2style="border-bottom:1px solid;" | −3544/2565style="border-bottom:1px solid;" | 1859/4104style="border-bottom:1px solid;" | −11/40style="border-bottom:1px solid;" |
style="border-right:1px solid;" |16/13506656/1282528561/56430−9/502/55
style="border-right:1px solid;" |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.

File:Periodic 3-body RKF Integration.gif 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:

class="wikitable"

|+COEFFICIENTS FOR RK4(5), FORMULA 1 Table II in Fehlberg{{Failed verification|date=January 2025|reason=Someone reported that the coefficients in the below table do not work. You can help by correcting them, or by removing this "failed verification" template if they are correct.}}

! rowspan="2" |K

! rowspan="2" |A(K)

! colspan="5" |B(K,L)

! rowspan="2" |C(K)

! rowspan="2" |CH(K)

! rowspan="2" |CT(K)

L=1

|L=2

|L=3

|L=4

|L=5

1

|0

|

| rowspan="2" |

| rowspan="3" |

| rowspan="4" |

| rowspan="5" |

|1/9

|47/450

| 1/150

2

|2/9

|2/9

|0

|0

|0

3

|1/3

|1/12

|1/4

|9/20

|12/25

| -3/100

4

|3/4

|69/128

| -243/128

|135/64

|16/45

|32/225

| 16/75

5

|1

| -17/12

|27/4

| -27/5

|16/15

|1/12

|1/30

| 1/20

6

|5/6

|65/432

| -5/16

|13/16

|4/27

|5/144

|

|6/25

| -6/25

Fehlberg outlines a solution to solving a system of n differential equations of the form:

\frac{dy_i}{dx} = f_i(x,y_1,y_2, \ldots, y_n), i=1,2,\ldots,n

to iterative solve for

y_i(x+h), i=1,2,\ldots,n

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, h, and an estimated slope specified by function f on the right-hand side of the differential equation.

\begin{align}

k_1&=h\cdot f(x+A(1) \cdot h,y) \\

k_2&=h\cdot f(x+A(2)\cdot h,y+B(2,1)\cdot k_1) \\

k_3&=h\cdot f(x+A(3)\cdot h, y+B(3,1)\cdot k_1+B(3,2)\cdot k_2 ) \\

k_4&=h\cdot f(x+A(4)\cdot h, y+B(4,1)\cdot k_1+B(4,2)\cdot k_2+B(4,3)\cdot k_3 ) \\

k_5&=h\cdot f(x+A(5)\cdot h, y+B(5,1)\cdot k_1+B(5,2)\cdot k_2+B(5,3)\cdot k_3+B(5,4)\cdot k_4 ) \\

k_6&=h\cdot f(x+A(6)\cdot h, y+B(6,1)\cdot k_1+B(6,2)\cdot k_2+B(6,3)\cdot k_3+B(6,4)\cdot k_4+B(6,5) \cdot k_5)

\end{align}

Then the weighted average is:

y(x+h)=y(x) + CH(1) \cdot k_1 + CH(2) \cdot k_2 + CH(3) \cdot k_3 + CH(4) \cdot k_4 + CH(5) \cdot k_5 + CH(6) \cdot k_6

The estimate of the truncation error is:

\mathrm{TE} = \left|\mathrm{CT}(1) \cdot k_1 + \mathrm{CT}(2) \cdot k_2 + \mathrm{CT}(3) \cdot k_3 + \mathrm{CT}(4) \cdot k_4 + \mathrm{CT}(5) \cdot k_5 + \mathrm{CT}(6) \cdot k_6\right|

At the completion of the step, a new stepsize is calculated:{{cite web |last1=Gurevich |first1=Svetlana |title=Appendix A Runge-Kutta Methods |url=https://www.uni-muenster.de/imperia/md/content/physik_tp/lectures/ss2017/numerische_Methoden_fuer_komplexe_Systeme_II/rkm-1.pdf |website=Munster Institute for Theoretical Physics |access-date=4 March 2022 |pages=8–11 |date=2017}}

h_{\text{new}} = 0.9 \cdot h \cdot \left ( \frac {\varepsilon} {TE} \right )^{1/5}

If \mathrm{TE} > \varepsilon, then replace h with h_{\text{new}} and repeat the step. If TE\leqslant\varepsilon, then the step is completed. Replace h with h_{\text{new}} 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:

class="wikitable"

|+COEFFICIENTS FOR RK4(5), FORMULA 2 Table III in Fehlberg

! rowspan="2" |K

! rowspan="2" |A(K)

! colspan="5" |B(K,L)

! rowspan="2" |C(K)

! rowspan="2" |CH(K)

! rowspan="2" |CT(K)

L=1

|L=2

|L=3

|L=4

|L=5

1

|0

|

| rowspan="2" |

| rowspan="3" |

| rowspan="4" |

| rowspan="5" |

|25/216

|16/135

| -1/360

2

|1/4

|1/4

|0

|0

|0

3

|3/8

|3/32

|9/32

|1408/2565

|6656/12825

| 128/4275

4

|12/13

|1932/2197

| -7200/2197

|7296/2197

|2197/4104

|28561/56430

| 2197/75240

5

|1

|439/216

| -8

|3680/513

| -845/4104

| -1/5

| -9/50

| -1/50

6

|1/2

| -8/27

|2

| -3544/2565

|1859/4104

| -11/40

|

|2/55

| -2/55

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

class="wikitable"

|+COEFFICIENTS FOR Sarafyan's RK4(5), Table IV in Fehlberg

! rowspan="2" |K

! rowspan="2" |A(K)

! colspan="5" |B(K,L)

! rowspan="2" |C(K)

! rowspan="2" |CH(K)

! rowspan="2" |CT(K)

L=1

|L=2

|L=3

|L=4

|L=5

1

|0

|0

| rowspan="2" |

| rowspan="3" |

| rowspan="4" |

| rowspan="5" |

|1/6

|1/24

| 1/8

2

|1/2

|1/2

|0

|0

|0

3

|1/2

|1/4

|1/4

|2/3

|0

| 2/3

4

|1

|0

| -1

|2

|1/6

|5/48

| 1/16

5

|2/3

|7/27

|10/27

|0

|1/27

|

|27/56

| -27/56

6

|1/5

|28/625

| -1/5

|546/625

|54/625

| -378/625

|

|125/336

| -125/336

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.
  • {{cite journal|last1=Fehlberg|first1=Erwin |year=1969|title=Klassische Runge-Kutta-Nystrom-Formeln funfter und siebenter Ordnung mit Schrittweiten-Kontrolle |journal=Computing |volume=4 |pages=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}}
  • {{cite book |first1=Ernst |last1=Hairer |first2=Syvert |last2=Nørsett |first3=Gerhard |last3=Wanner |date=1993 |title=Solving Ordinary Differential Equations I: Nonstiff Problems |edition=Second |publisher=Springer-Verlag |location=Berlin |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

  • {{cite journal|last1=Fehlberg|first1=E|year=1958|title=Eine Methode zur Fehlerverkleinerung beim Runge-Kutta-Verfahren|journal=Zeitschrift für Angewandte Mathematik und Mechanik|volume=38|number=11/12|pages=421–426|doi=10.1002/zamm.19580381102|bibcode=1958ZaMM...38..421F}}
  • {{cite journal|last1=Fehlberg|first1=E|year=1964|title=New high-order Runge-Kutta formulas with step size control for systems of first and second-order differential equations|journal=Zeitschrift für Angewandte Mathematik und Mechanik|volume=44|number=S1|pages=T17–T29|doi=10.1002/zamm.19640441310}}
  • {{cite journal|last1=Fehlberg|first1=E|year=1972|title=Klassische Runge-Kutta-Nystrom-Formeln mit Schrittweiten-Kontrolle fur Differentialgleichungen x.. = f(t,x)|journal=Computing|volume=10|pages=305–315|doi=10.1007/BF02242243|s2cid=37369149}}
  • {{cite journal|last1=Fehlberg|first1=E|year=1975|title=Klassische Runge-Kutta-Nystrom-Formeln mit Schrittweiten-Kontrolle fur Differentialgleichungen x.. = f(t,x,x.)|journal=Computing|volume=14|pages=371–387|doi=10.1007/BF02253548|s2cid=30533090}}
  • {{cite journal|last1=Simos|first1=T. E.|year=1993|title=A Runge-Kutta Fehlberg method with phase-lag of order infinity for initial-value problems with oscillating solution|journal=Computers & Mathematics with Applications|volume=25|number=6|pages=95–101|doi=10.1016/0898-1221(93)90303-D|doi-access=free}}.
  • {{cite journal|last1=Handapangoda|first1=C. C.|last2=Premaratne |first2=M.|last3=Yeo|first3=L.|last4=Friend|first4=J.|year=2008|title=Laguerre Runge-Kutta-Fehlberg Method for Simulating Laser Pulse Propagation in Biological Tissue|journal= IEEE Journal of Selected Topics in Quantum Electronics|number=14|volume=1|pages=105–112|doi=10.1109/JSTQE.2007.913971|bibcode=2008IJSTQ..14..105H |s2cid=13069335 }}.
  • {{cite journal|last1=Simos|first1=T. E.|year=1995|title=Modified Runge–Kutta–Fehlberg methods for periodic initial-value problems|journal=Japan Journal of Industrial and Applied Mathematics|volume=12|number=1|page=109|doi=10.1007/BF03167384|s2cid=120146558 }}.
  • {{cite journal|last1=Sarafyan|first1=D.|year=1994|title=Approximate Solution of Ordinary Differential Equations and Their Systems Through Discrete and Continuous Embedded Runge-Kutta Formulae and Upgrading Their Order|journal= Computers & Mathematics with Applications|volume=28|number=10–12|pages=353–384|doi=10.1016/0898-1221(94)00201-0|doi-access=free}}
  • {{cite journal|last1=Paul|first1=S.|last2=Mondal|first2=S. P.|last3=Bhattacharya|first3=P.|year=2016|title=Numerical solution of Lotka Volterra prey predator model by using Runge–Kutta–Fehlberg method and Laplace Adomian decomposition method|journal=Alexandria Engineering Journal|volume=55|number=1|pages=613–617|doi=10.1016/j.aej.2015.12.026|doi-access=free}}

{{DEFAULTSORT:Runge-Kutta-Fehlberg method}}

Category:Numerical differential equations

Category:Runge–Kutta methods

Category:Numerical analysis