# notes on runge–kutta methods

## Table of Contents

> index / notes : runge–kutta methods

## Introduction

*Runge–Kutta methods* (RK) are a class of numerical methods to solve
initial value problems, commonly used for time integration of ordinary
differential equations.

The general idea is to provide better estimates of the temporal gradients by evaluating them at intermediate points. The more intermediate gradients we compute, the higher the accuracy of the approximation gets. The derivation of these methods is based on a Taylor series expansion around the initial step \(t_0\). The expansion results in an underdetermined system of equations, which means that the weights of each intermediate gradient can be chosen more or less freely. Consequently, there exist a variety of RK methods, usually represented through a Butcher tableau.

## General form of Runge–Kutta methods

We are interested in numerically solving ordinary differential equations (ODEs) in the (vector) form

\begin{equation*} d_t y = f(t,y), \end{equation*}subject to an appropriate initial condition \(f_0 = f(t_0, y_0)\), where \(y\) is a Lipschitz continuous function of the coordinate \(t\).

Explicit RK methods approximate this equation through

\begin{equation*} \left\{ \begin{aligned} y_{n+1} = y_n + h \sum_{i=0}^{N_i} b_i f_i + O(h^{N_i+1}), \\ f_i = f(t_n + c_i h, y_n + \sum_{j=0}^{i-1} a_{ij} f_j). \end{aligned} \right. \end{equation*}Here, \(h\) is the step size and \(b_i\), \(c_i\), and \(a_{ij}\) are appropriate weights. Note that \(N_i\) determines the order of accuracy.

Typically, one enforces

\begin{equation*} \left\{ \begin{aligned} \sum_{i=1}^{N_i} b_i = 1,\\ \sum_{j=1}^{i-1} a_{ij} = c_i, \text{ for } i \in [2, N_i] \subset \mathbb{N}, \end{aligned} \right. \end{equation*}whereby the first constraint enforces consistency but the second one does not.

## Runge–Kutta–Fehlberg method

The common Runge–Kutta–Fehlberg (RKF also known as RK45) method (Fehlberg, 1969) is an \(O(h^4/h^5)\) adaptive RK-type method. The error estimate responsible for adapting the step size is based on the difference between the fourth-order result and the fifth-order results. The RKF method's Butcher tableau is given below.

0 | ||||||

1/4 | 1/4 | |||||

3/8 | 3/32 | 9/32 | ||||

12/13 | 1932/2197 | -7200/2197 | 7296/2197 | |||

1 | 439/216 | -8 | 3680/213 | -845/4104 | ||

1/2 | -8/27 | 2 | -3544/2565 | 1859/4104 | -11/40 | |

16/135 | 0 | 6656/12825 | 28561/56430 | -9/50 | 2/55 | |

25/216 | 0 | 1408/2565 | 2197/4104 | -1/5 | 0 |

The step size \(h\) can be determined by

\begin{equation*} h \leftarrow 0.9 h \left[ \delta / | e | \right]^{1/(1+p)}, \end{equation*}with \(e\) being the aforementioned difference (estimated local truncation error) and \(\delta\) being a prescribed error tolerance. \(p\) is the lower order of accuracy in the RK pair.

The RKF method works quite well. See also, devlog: https://emacs.ch/@ioezg/110318134814429698

## References `[4/4]`

`[X]`

Bärwolff, G. (2017).*Numerik für Ingenieure, Physiker und Informatiker*, Springer Verlag, Berlin Heidelberg, Germany.`[X]`

Fehlberg, E. (1968) Classical fifth-, sixth-, seventh-, and eighth-order Runge-Kutta formulas with stepsize control. NASA Technical Report 287.`[X]`

Fehlberg, E. (1969). Klassische Runge-Kutta-Nystrom-Formeln fünfter und siebenter Ordnung mit Schrittweiten-Kontrolle.*Computing*, 4, pp. 93–106.`[X]`

Kincaid, D. & Cheney, W. (2009).*Numerical analysis*, American Mathematical Society, Providence, RI, USA.