, 15 min read
Recursive Generation of Runge-Kutta Formulas
Original post is here eklausmeier.goip.de/blog/2024/08-13-recursive-generation-of-runge-kutta-formulas.
- 1. Notation
- 2. Example Runge-Kutta methods
- 3. Local discretization error
- 4. Order condition
- 5. Power series expansion for global error
- 6. Cauchy product formula
- 7. Recursive calculation of the order condition
Below text is based on the results in
- Peter Albrecht: "A New Theoretical Approach to Runge–Kutta Methods"
- Peter Albrecht: "The Runge–Kutta Theory in a Nutshell"
- Michael E. Hosea: "A New Recurrence for Computing Runge–Kutta Truncation Error Coefficients"
Bibliography:
- Peter Albrecht.
- Michael E. Hosea and LinkedIn.
- rktec.c computes the coefficients of Albrecht's expansion of the local truncation error of Runge-Kutta formulas.
1. Notation
Consider the ordinary differential value problem with initial condition:
Nomenclature and assumptions:
- Let
be our step-size, , with . - Let
be the order of our Runge-Kutta method, see below. - The constants
are between zero and one, i.e., . They are not necessarily sorted, and they can even repeat. - Let
be the exact solution of above initial value problem at point - Let
be the approximation according to below Runge-Kutta formula. - We assume
is times continously differentiable.
Runge-Kutta methods are written in their nonlinear form
with
Substituting
We have
and thus get the
In matrix notation this is
Using the matrix
we could write the whole process as
Here we use
and
This corresponds to the classical Runge-Kutta Butcher tableau:
1. Definition. Above method is called an s-stage Runge-Kutta method.
- It is an explicit method, if
for , i.e., is a lower triangular matrix. - It is implicit otherwise.
- It is called semi-implicit, or SIRK, if
for but for at least one index . - It is called diagonally implicit, or DIRK, if
and for .
In the following we use componentwise multiplications for the vector
2. Example Runge-Kutta methods
See the book Peter Albrecht, "Die numerische Behandlung gewöhnlicher Differentialgleichungen: Eine Einführung unter besonderer Berücksichtigung zyklischer Verfahren", 1979.
The classical Runge-Kutta method of order 4 with 4 stages.
Kutta's method or 3/8-method of order 4 with 4 stages.
Gill's method of order 4 with 4 stages.
Above examples show that order
Butcher method of order 5 with 6 stages.
Runge-Kutta-Fehlberg method of order 4 with 5 internal stages. Also called RKF45. The embedded 5-th order method is only used for step-size control.
Dormand-Prince method of order 4 with internal 5 stages, called DOPRI45.
Implicit Gauß-method of order 4 with 2 internal stages.
Implicit Gauß-method of order 6 with 3 internal stages.
Erwin Fehlberg (1911-1990), John C. Butcher (1933), Carl Runge (1856-1927), Martin Wilhelm Kutta (1867-1944).
3. Local discretization error
The local discretization error is when you insert the exact solution into the numerical formula and look at the error that ensues.
There are two local discretization errors
2. Definition. The
Using
and by Taylor expansion at
The other indexes
Using
the "error vectors"
The "internal" stages are consistent iff
the last stage of the method may furnish approximations of order
even if does not hold.
4. Order condition
Define the global error for
and for
2. Theorem. (General order condition.)
Assume that the local discretization errors
(a) The Runge-Kutta method then converges with order
(b) This happens iff for the global error
Proof: Use the fact that
Then
☐
Above theorem gives the general order condition for Runge-Kutta methods.
However, in this form it is not practical to find the parameters
Further outline:
By one-dimensional Tayler expansion the
are expressed by .
5. Power series expansion for global error
Let
Further
3. Theorem.
With above definitions the
Proof:
The
Taylor expansion at
Hence
☐
The following two nonlinear equations vanish:
The right side is analytical at
- the solution
exists and is unique, - the solution is itself analytical.
Once can see that the term with
The general order condition
6. Cauchy product formula
In below recap we are interested in the formula, not the convergence conditions, therefore skip these conditions.
4. Theorem. (Cauchy product formula for finitely many power series.)
Multiply
with the multiindex notation:
Similarly, when the power series start at some index
5. Theorem. (Cauchy product formula for finitely many power series.)
Multiply
with the multiindex notation:
6. Theorem. (Cauchy product formula for infinite many power series.) Multiply infinite many power series:
with the infinite multiindex notation:
For the special case
you can substitute the right power of
7. Recursive calculation of the order condition
7. Theorem. (Recursion 0.)
The
and using the infinite multiindex
Proof: The original proof by Albrecht is using induction. This proof is direct and uses the Cauchy product.
We omit
Now use (G) and Cauchy product formula:
Now group by common powers of
Recursion 0 is the basis of all further considerations. With the Ansatz
Hosea (1995) in his program rktec.c computes these
Main result: The condition
Thus the order condition becomes independent of the
Recursion 1:
8. Theorem. (Main result)
Let the
and if
Hosea (1995) notes that
Through order sixteen, for instance, ... implies a total of 1,296,666 terms (including the quadrature error coefficients) while there are "only" 376,464 distinct order conditions.