4.3. Stability Functions for Implicit Runge-Kutta Methods#
To determine the stability function for an implicit Runge-Kutta method we consider the stability function of a general Runge-Kutta method given in equations (4.3) and (4.4) which are repeated below
where \(Y = (Y_1, Y_2, \ldots, Y_s)\). Rewriting these gives
We can write these as a matrix equation
Using Cramer’s rule to solve this system for \(y_{n+1}\) we have
Performing a row operation of subtracting the first row of matrix from all other rows gives
This provides the following definition of the stability function for an implicit Runge-Kutta method.
Definition 4.4 (Stability function of an implicit Runge-Kutta method)
The stability function of an implicit Runge-Kutta method is
where \(\mathbf{e}\mathbf{b}^\mathsf{T}\) is a diagonal matrix with the elements of \(\mathbf{b}\) on the main diagonal
Example 4.2
The Radau IA IRK method is defined by the following Butcher tableau
Determine the stability function of this method
Solution
Using equation (4.7)
4.3.1. Code#
The Python and MATLAB code used to determine the stability function for the IRK method from Example 4.2 is given below.
import sympy as sp
# Define IRK method
A = sp.Matrix([[sp.Rational(1,4), -sp.Rational(1,4)],
[sp.Rational(1,4), sp.Rational(5,12)]])
ebT = sp.Matrix([[sp.Rational(1,4), 0], [0, sp.Rational(3,4)]])
# Calculate R(z)
def P(z):
return (sp.eye(2) - z * A + z * ebT).det()
def Q(z):
return (sp.eye(2) - z * A).det()
z = sp.symbols('z')
sp.pprint(P(z) / Q(z))
% Define IRK method
A = [1/4, -1/4 ; 1/4, 5/12];
ebT = [1/4, 0 ; 0, 3/4];
% Calculate R(z)
P = @(z) det(eye(2) - z * A + z * ebT);
Q = @(z) det(eye(2) - z * A);
syms z
Rz = P(z) / Q(z)