Explicit Runge-Kutta Methods
Overview
Introducing the Runge-Kutta method, an Ordinary Differential Equation (ODE) solver. A separate article is published for a detailed explanation of the commonly used 4th Order Runge-Kutta method RK4.
Buildup
Consider the following ordinary differential equation. $y$ is a function of $t$, and $^{\prime}$ means the derivative with respect to $t$. $$ y^{\prime} = f(t,y),\quad t \ge t_{0},\quad y(t_{0}) = y_{0} $$ Integrating this from $t_{n}$ to $t_{n+1} = t_{n} + h$ (to avoid confusion let’s use $\tau$ instead of $t$ as the integration variable), $$ \int_{t_{n}}^{t_{n+1}}y^{\prime}d\tau = \int_{t_{n}}^{t_{n+1}} f(\tau,y)d\tau $$ Rearranging the left side and replacing it with $\tau \equiv t_{n} + h\tau$, we obtain the following equation: $$ \big[y(\tau)\big]_{t_{n}}^{t_{n+1}} = \int_{t_{n}}^{t_{n+1}} f(\tau,y)d\tau $$ $$ \Downarrow \\ y(t_{n+1}) = y(t_{n}) + \int_{t_{n}}^{t_{n+1}} f(\tau,y)d\tau = y(t_{n}) + h\int_{0}^{1} f\big(t_{n} + h\tau,y(t_{n} + h\tau)\big)d\tau $$
Now, by approximating the latter integral as a sum, we obtain the following equation:
$$ y(t_{n+1}) = y(t_{n}) + h\sum_{j=1}^{\nu} b_{j} f\big(t_{n} + c_{j}h,y(t_{n} + c_{j}h)\big),\quad n=0,1,2,\cdots \tag{1} $$
This is an approximation where, knowing $y_{n} = y(t_{n})$, we can know $y_{n+1} = y(t_{n+1})$. Of course, since the right side includes an unknown value $y(t_{n} + c_{j}h)$, this must also be approximated. Since the formula is complex, let’s denote $j = 1,2,\dots,\nu$ as follows:
$$ \xi_{j} = y(t_{n} + c_{j}h) $$
First, let’s set it as $c_{1} = 0$. Then $\xi_{1} = y_{n}$ is known. Now, let’s approximate $\xi_{j}$ sequentially as follows by applying the multistep method.
$$ \begin{align*} \xi_{2} &= y(t_{n} + c_{2}h) \\ &= y_{n} + h a_{2,1}f(t_{n} + c_{1}h, y_{n} + c_{1}h) \\ &= y_{n} + h a_{2,1}f(t_{n}, y_{n}) & (\because c_{1} = 0)\\ &= y_{n} + h a_{2,1}f(t_{n}, \xi_{1}) & (\because \xi_{1}=y_{n}) \\[2em] \xi_{3} &= y(t_{n} + c_{3}h) \\ &= y_{n} + h a_{3,1}f(t_{n} + c_{1}h, y_{n} + c_{1}h) + h a_{3,2}f(t_{n} + c_{2}h, y_{n} + c_{2}h) \\ &= y_{n} + h a_{3,1}f(t_{n}, \xi_{1}) + h a_{3,2}f(t_{n} + c_{2}h, \xi_{2}) \\ &\vdots \\ \xi_{\nu} &= y_{n} + h\sum_{j=1}^{n-1}a_{\nu,j} f(t_{n} + c_{j}h, \xi_{j}) \end{align*} $$
Now, we have obtained all values on the right side of $(1)$, $y_{n}$, $f(t_{n}, \xi_{1})$, $f(t_{n} + c_{2}h, \xi_{2})$, $\dots$, $f(t_{n} + c_{j-1}h, \xi_{j-1})$. The Explicit Runge-Kutta method is a method to approximate the value of $y_{n+1}$ as a linear combination of $y_{n}$, $f(t_{n}, \xi_{1})$, $f(t_{n} + c_{2}h, \xi_{2})$, $\dots$, $f(t_{n} + c_{j-1}h, \xi_{j-1})$.
Definition
The explicit Runge-Kutta method is a method that approximates $y_{n+1}$ for a given $y_{n}$ as follows.
$$ y_{n+1} = y_{n} + h\sum_{j=1}^{\nu} b_{j} f(t_{n} + c_{j}h, \xi_{j}),\quad n=0,1,2,\cdots \tag{2} $$
Here, each of the $\xi_{j}$ is,
$$ \begin{align*} \xi_{1} &= y_{n} \\ \xi_{2} &= y_{n} + ha_{2,1}f(t_{n}, \xi_{1}) \\ \xi_{3} &= y_{n} + ha_{3,1}f(t_{n}, \xi_{1}) + ha_{3,2}f(t_{n} + c_{2}h, \xi_{2}) \\ \vdots & \\ \xi_{\nu} &= y_{n} + h\sum_{i=1}^{\nu-1}a_{\nu, i}f(t_{n} + c_{i}h, \xi_{i}) \end{align*} $$
Here, the $\nu \times \nu$ matrix $A = [a_{j,i}]$ is called the Runge-Kutta matrix. Empty components in the formula are $0$.
$$ A = [a_{j,i}] = \begin{bmatrix} \\ a_{2,1} & \\ a_{3,1} & a_{3,2} \\ \vdots & \\ a_{\nu,1} & a_{\nu,2} & \cdots & a_{\nu,\nu-1} & \end{bmatrix} $$
Also, the below $\mathbf{b}$ and $\mathbf{c}$ are called the RK weights and RK nodes, respectively.
$$ \mathbf{b} = \begin{bmatrix} b_{1} \\ b_{2} \\ \vdots \\ b_{\nu} \end{bmatrix} \quad \text{and} \quad \mathbf{c} = \begin{bmatrix} c_{1} \\ c_{2} \\ \vdots \\ c_{\nu} \end{bmatrix} $$
Also, it is said to have $\nu$ stages, and such a method is called a $\nu$ stage (or $\nu$ order) Runge-Kutta method.
Explanation
As defined, the RK matrix is obviously a lower triangular matrix.
Following the above method, $\xi_{j}$ can be calculated sequentially from $\xi_{1}$ to $\xi_{\nu}$. Consequently, $(2)$ can be calculated, and $y_{n+1}$ is obtained. By repeating this, values of $y$ for the next step, $y_{n+2}$, $y_{n+3}$, $\dots$ can be determined.
In the RK method, the coefficients $a_{j,i}$, $b_{j}$, $c_{j}$ are not solved for, but chosen to use. The coefficients are represented as in $\begin{array}{c|c} \mathbf{c} & A \\ \hline & \mathbf{b}^{t} \end{array}$, which is called the RK tableaux. The RK table of the commonly used RK4 is as follows.
$$ \begin{array}{c|cccc} 0 & \\[0.5em] \frac{1}{2} & \frac{1}{2} \\[0.5em] \frac{1}{2} & 0 & \frac{1}{2} \\[0.5em] 1 & 0 & 0 & 1 \\[0.5em] \hline {\displaystyle {\color{white}\dfrac{0}{0}}} & \frac{1}{6} & \frac{1}{3} & \frac{1}{3} & \frac{1}{6} \end{array} $$