3.1. Deriving implicit Runge-Kutta methods#
Deriving Implicit Runge-Kutta (IRK) methods is done similarly to that for Explicit Runge-Kutta (ERK) methods where the values of the \(a_{ij}\), \(b_i\) and \(c_i\) coefficients are chosen to satisfy a set of order conditions. These order conditions were derived by Butcher [1964] based on the structure of rooted trees using a similar method we used to derive the order conditions for ERK methods
Definition 3.1 (The \(B(k)\), \(C(k)\) and \(D(k)\) order conditions)
3.1.1. Gauss-Legendre methods#
Gauss-Legendre methods are a family of methods that are derived using Gauss-Legendre quadrature. An \(s\)-stage Gauss-Legendre method has order \(2s\). They are derived using Legendre polynomials which are are a system of orthogonal polynomials.
For an order \(k\) Gauss-Legendre IRK method, the values of the \(c_i\) coefficients are chosen to be the roots of the Legendre polynomial
where \(\displaystyle{n \choose i} = \dfrac{n!}{i!(n - i)!}\) is the binomial coefficient. The values of \(a_{ij}\) and \(b_i\) are then chosen to satisfy the \(B(2k)\) and \(C(k)\) order conditions from equation (3.1).
Example 3.1
Derive a fourth-order Gauss-Legendre method.
Solution
A fourth-order Gauss-Legendre method requires 2 stages. The values of \(c_1\) and \(c_2\) are the roots of \(P_2(x) = 0\)
and the values of \(b_i\) and \(a_{ij}\) satisfy the \(B(4)\) and \(C(2)\) order conditions respectively which are
Solving the order conditions using Python or MATLAB:
import sympy as sp
# Define symbolic variables
a11, a12, a21, a22, b1, b2, c1, c2, x = sp.symbols("a11, a12, a21, a22, b1, b2, c1, c2, x")
# Calculate c values
c1, c2 = sp.solve(6 * x ** 2 - 6 * x + 1)
print(f"c1 = {c1}\nc2 = {c2}")
# Define order conditions
eq1 = b1 + b2 - 1
eq2 = b1 * c1 + b2 * c2 - sp.Rational(1,2)
eq3 = a11 + a12 - c1
eq4 = a21 + a22 - c2
eq5 = a11 * c1 + a12 * c2 - sp.Rational(1,2) * c1 ** 2
eq6 = a21 * c1 + a22 * c2 - sp.Rational(1,2) * c2 ** 2
# Solve order conditions
sp.solve((eq1, eq2, eq3, eq4, eq5, eq6))
syms a11 a12 a21 a22 b1 b2 x
% Calculate c coefficients
c = solve(6 * x ^ 2 - 6 * x + 1)
c1 = c(1);
c2 = c(2);
% Define order conditions
eq1 = b1 + b2 == 1;
eq2 = b1 * c1 + b2 * c2 == 1/2;
eq3 = a11 + a12 == c1;
eq4 = a21 + a22 == c2;
eq5 = a11 * c1 + a12 * c2 == 1/2 * c1^2;
eq6 = a21 * c1 + a22 * c2 == 1/2 * c2^2;
% Solve order conditions
solve(eq1, eq2, eq3, eq4, eq5, eq6)
Output
c1 = 1/2 - sqrt(3)/6
c2 = sqrt(3)/6 + 1/2
{b1: 1/2,
b2: 1/2,
a11: 1/4,
a12: 1/4 - sqrt(3)/6,
a21: 1/4 + sqrt(3)/6,
a22: 1/4}
So the fourth-order Gauss-Legendre method is
3.1.2. Radau methods#
Gauss-Legendre methods give us maximal order for the number of stages, however sometimes it is better the sacrifice order to gain better stability properties. An \(s\)-stage Radau method has order \(k=2s-1\) and is A-stable (see A-stability).
There are two types of Radau methods, Radau IA and Radau IIA:
Radau IA – the \(c_i\) coefficients are the roots of \(P_s(x) + P_{s-1}(x) = 0\) and the \(a_{ij}\) and \(b_i\) coefficients are chosen to satisfy \(B(2s)\) and \(D(s)\) order conditions respectively.
Radau IIA – the \(c_i\) coefficients are the roots of \(P_s(x) - P_{s-1}(x) = 0\) and the \(a_{ij}\) and \(b_i\) coefficients are chosen to satisfy \(B(2s)\) and \(C(s)\) order conditions respectively.
Example 3.2
Derive a third-order Radau IA method.
Solution
A third-order Radau IA method requires \(s=2\) stages. The values of \(c_i\) are the roots of \(0 = P_2(t) + P_1(t)\)
so \(c_1 = 0\) and \(c_2 = \frac{2}{3}\). The \(b_i\) and \(a_{ij}\) coefficients need to satisfy the \(B(3)\) and \(D(2)\) order conditions respectively which are
Solving the order conditions using Python or MATLAB
import sympy as sp
# Define symbolic variables
a11, a12, a21, a22, b1, b2, c1, c2 = sp.symbols("a11, a12, a21, a22, b1, b2, c1, c2")
c1, c2 = 0, sp.Rational(2, 3)
# Define order conditions
eq1 = b1 + b2 - 1
eq2 = b1 * c1 + b2 * c2 - sp.Rational(1,2)
eq3 = b1 * c1 ** 2 + b2 * c2 ** 2 - sp.Rational(1,3)
eq4 = b1 * a11 + b2 * a21 - b1 * (1 - c1)
eq5 = b1 * a12 + b2 * a22 - b2 * (1 - c2)
eq6 = b1 * c1 * a11 + b2 * c2 * a21 - sp.Rational(1,2) * b1 * (1 - c1 ** 2)
eq7 = b1 * c1 * a12 + b2 * c2 * a22 - sp.Rational(1,2) * b2 * (1 - c2 ** 2)
# Solve order conditions
sp.solve((eq1, eq2, eq3, eq4, eq5, eq6, eq7))
syms a11 a12 a21 a22 b1 b2 c1 c2
c1 = 0;
c2 = 2/3;
% Define order conditions
eq1 = b1 + b2 == 1;
eq2 = b2 * c2 == 1/2;
eq3 = b2 * c2 ^ 2 == 1/3;
eq4 = b1 * a11 + b2 * a21 == b1 * (1 - c1);
eq5 = b1 * a12 + b2 * a22 == b2 * (1 - c2);
eq6 = b1 * c1 * a11 + b2 * c2 * a21 == 1/2 * b1 * (1 - c1^2);
eq7 = b1 * c1 * a12 + b2 * c2 * a22 == 1/2 * b2 * (1 - c2^2);
% Solve order conditions
solve(eq1, eq2, eq3, eq4, eq5, eq6)
Output:
c1 = 0
c2 = 2/3
[{a11: 1/4, a12: -1/4, a21: 1/4, a22: 5/12, b1: 1/4, b2: 3/4}]
So the third-order Radau IA method is
3.1.3. DIRK methods#
Diagonally Implicit Runge-Kutta (DIRK) methods have an \(A\) matrix that is lower triangular with equal elements on the main diagonal.
Writing out the stage values for a DIRK method
We see that whilst these are still implicit equations, there is only one unknown in each one, i.e., the equation for \(k_i\) does not include \(k_{i+1} \dots k_s\). So the advantage of DIRK methods is that the solutions to these can be obtained sequentially and is more computationally efficient than non-DIRK methods.
Definition 3.2 (2-stage DIRK method)
For example, when \(c_2 = \frac{3}{4}\) the 2-stage DIRK method given above is
Definition 3.3 (3-stage DIRK method)
This DIRK method is A-stable where \(c_1\) satisfies \(0 = \frac{1}{6} - \frac{3}{2} c_1 + 3c_1^2 - c_1^3\) [Butcher, 2008].
3.1.4. Determining the order of an implicit Runge-Kutta method#
One of the differences between implicit and explicit methods is that an implicit method can achieve the same accuracy as an explicit method but using fewer stages. To determine the order of an implicit method we need to consider the order conditions that govern the values of the coefficients \(a_{ij}\), \(b_i\) and \(c_i\)
Let \(G(k)\) represent the fact that a given implicit method has order \(k\) then it can be shown that
In other words, to determine the order of an IRK method we need find the highest value of \(k\) for which \(B(k)\) and \(C(\left\lfloor \frac{1}{2}k \right\rfloor)\) and \(D(\left\lfloor \frac{1}{2}k \right\rfloor)\) are satisfied. If no value of \(k\) satisfies these conditions then it is not a valid implicit Runge-Kutta method.
Example 3.3
Determine the order of the following IRK method
Solution
First check the highest value of \(k\) that satisfies \(B(k)\)
So the highest value of \(k\) for which \(B(k)\) is satisfied is \(k=4\). We now need to check whether \(C(2)\) and \(D(2)\) are satisfied.
So the \(C(2)\) condition is satisfied. Checking the \(D(2)\) condition
So the \(D(2)\) condition is also satisfied, therefore this method is a fourth-order method.