Trees and Order Conditions - Construction of Runge-Kutta

Trees and Order Conditions
Construction of Runge-Kutta order conditions using Butcher trees and
series.
Paul Tranquilli1
1
Computational Science Laboratory (CSL)
Department of Computer Science
Virginia Tech
. Trees and Order Conditions. [1/14]
Differential Equations group.
[http://csl.cs.vt.edu]
The general process for constructing order conditions is to:
I
Construct a truncated Taylor expansion of the exact solution coming from
y 0 = f (y).
I
Construct a truncated Taylor expansion of the numerical solution coming
from the general form of the Runge-Kutta integrator.
I
Match terms in each expansion up to the specified order p.
. Order Conditions. [2/14]
Differential Equations group.
[http://csl.cs.vt.edu]
Start with
y 0 = f (y)
and
h2 00
y (tn ) + . . .
2!
Note that each term is comprised of a derivative of y (evaluated at t = tn , i.e.
when h = 0), a power of h, and a constant coefficient.
y(tn + h) = y(tn ) + hy 0 (tn ) +
Since the power of h and the constant coefficient are easy to generalize, we
will look at how to construct the terms which come from the derivatives of y.
. Order Conditions. Exact Solution [3/14]
Differential Equations group.
[http://csl.cs.vt.edu]
For the scalar case we have that
y
y0
y 00
y 000
=
=
=
=
y
f (y)
f 0 (y) · y 0 = f 0 f
f 00 (y) · y 0 · y 0 + f 0 (y) · f 0 (y) · y 0
however, in our case y is a vector. So we use the notation that capital
superscripts represent the index of the vector. Moreover, the appearance of a
subscript represents a derivative and the letter is the index of that derivative.
J
J
In this way fK
is the element (J, K) of the Jacobian matrix of f , and fKL
is
element (J, K, L) of the Hessian. We will also make use of einstein notation,
so that repeated indices are summed over the range of that index. So that
ci xi =
3
X
ci xi = c1 x1 + c2 x2 + c3 x3
i=1
. Order Conditions. Exact Solution [4/14]
Differential Equations group.
[http://csl.cs.vt.edu]
Now we can construct each of the terms appearing in the taylor expansion of
the exact solution y(tn + h) as
(0) yJ
= yJ
h=0
(1) (0) yJ
=
f J (y)
h=0
h=0
(1)
yJ
= fJ
(2) h=0
(1) yJ
=
f J (y)
h=0
h=0
(1) (2)
J
yJ
=
fK
(y) y K
h=0
h=0
J K
J (2) = fK f
y
(2) (3) h=0
f J (y)
yJ
=
h=0
h=0
(1)
(2) (1)
(3)
J
J
=
fKL
yK
yL
+ fK
yK
yJ
h=0
h=0
J (3) J
K L
J K L
y
= fKL f f + fK fL f
h=0
. Order Conditions. Exact Solution [5/14]
Differential Equations group.
[http://csl.cs.vt.edu]
Collecting only the final results we have that up to third order, we have that
(0) yJ
= yJ
h=0
(1) yJ
= fJ
h=0
(2) J K
yJ
= fK
f
h=0
J (3) J
J K L
y
= fKL f K f L + fK
fL f
h=0
are the terms, along with the corresponding power of h and Taylor coefficient,
comprising the Taylor series expansion of the exact solution.
. Order Conditions. Exact Solution [6/14]
Differential Equations group.
[http://csl.cs.vt.edu]
We can now represent the terms in the taylor series using labeled trees.
j
fJ
P
bj
=
1
J K
fK
f
P
bj ajk
=
1/2
J
fKL
fKfL
P
bj ajk ajl
=
1/3
J K L
fK
fL f
P
bj ajk akl
=
1/6
k
j
l
k
j
l
k
j
Where the rightmost column comes from matching the exact and numerical
(which we will derive later) expansions.
. Order Conditions. Exact Solution [7/14]
Differential Equations group.
[http://csl.cs.vt.edu]
I
For the elementary differentials superscripts represent component
indices, and subscripts represent indices of variables with respect to
which partial derivatives are taken.
example, f J is the J-th
P For
J K
J
component of f , and fK f = K ∂f /∂y K · f K .
I
A node represents a derivative of f .
I
The order of the f derivative equals the number of children the node has.
. Order Conditions. Exact Solution [8/14]
Differential Equations group.
[http://csl.cs.vt.edu]
Numerical Expansion
Recall that an s-stage Runge-Kutta method has the general form
X
ki = hf (yn +
aij kj )
j
yn+1
= yn +
X
bi ki
i
We will construct the individual terms in the expansion of the numerical
solution by expanding each stage value, ki , and then adding them together in
the end. We will make heavy use of the formula
(q−1) (q) = q (φ(h))
(hφ(h)) h=0
. Numerical Solution. [9/14]
Differential Equations group.
[http://csl.cs.vt.edu]
h=0
(0) h=0
J (1) ki
h=0
J (1) ki
h=0
(2) kiJ
h=0
(2)
kiJ
h=0
(2)
kiJ
h=0
(2)
kiJ
kiJ
h=0
. Numerical Solution. [10/14]
Differential Equations group.
=
=
0
J
hf (yn +
(1) j aij kj )
P
h=0
fJ
(2) P
=
hf J (yn + j aij kj )
h=0
(1)
P
=
2f J (yn + j aij kj )
h=0
P
(1) J
= 2fK
j aij kj
h=0
P
J K
= 2 j aij fK
f
=
[http://csl.cs.vt.edu]
(3) h=0
J (3) ki
=
(3) =
kiJ
=
h=0
kiJ
h=0
(2) P
3f J (yn + j aij kj )
P
(1) P h=0 J
K
L (1) 3fKL
j aij kj
k aik kk
h=0
(2) P
J
K
+3fK
j aij kj
h=0
P P
P P
J
J K L
3 j k aij aik fKL
f K f L + j k 6aij ajk fK
fL f
. Numerical Solution. [11/14]
Differential Equations group.
[http://csl.cs.vt.edu]
Note that each derivative of ki recurses onto the previous derivatives. We will
make use of this fact to generalize the construction of the coefficients from the
tree structure.
Collecting only the final results we have that
(0) kiJ
= 0
h=0
(1)
kiJ
= fJ
h=0
P
(2) J K
kiJ
= 2 j aij fK
f
h=0
P
P
P P
(3)
J
J K L
kiJ
= 3 j k aij aik fKL
f K f L + j k 6aij ajk fK
fL f
h=0
. Numerical Solution. [12/14]
Differential Equations group.
[http://csl.cs.vt.edu]
We have now constructed the general set of conditions up to order three.
j
fJ
P
bj
=
1
J K
fK
f
P
bj ajk
=
1/2
J
fKL
fKfL
P
bj ajk ajl
=
1/3
J K L
fK
fL f
P
bj ajk akl
=
1/6
k
j
l
k
j
l
k
j
Generalizing to a higher order requires some extra work, however.
. Numerical Solution. [13/14]
Differential Equations group.
[http://csl.cs.vt.edu]
We can now phrase the order conditions in the following way
Theorem
A Runge-Kutta method is of order p iff
s
X
bj φj (τ ) =
j=1
1
γ(τ )
with

if τ = [ ]
 1X
φj (τ ) =
aj,km φk1 (τ1 ) . . . φkm (τm ) if τ = [τ1 , . . . τm ]

k1 ,...,km
where [τ1 , . . . , τm ] is a tree with its root having children as the root of the
subtrees τ1 , . . . , τm , and γ(τ ) is defined fully in the text.
. Numerical Solution. [14/14]
Differential Equations group.
[http://csl.cs.vt.edu]