Trees, Stumps, and Applications

: The traditional derivation of Runge–Kutta methods is based on the use of the scalar test problem y (cid:48) ( x ) = f ( x , y ( x )) . However, above order 4, this gives less restrictive order conditions than those obtained from a vector test problem using a tree-based theory. In this paper, stumps, or incomplete trees, are introduced to explain the discrepancy between the two alternative theories. Atomic stumps can be combined multiplicatively to generate all trees. For the scalar test problem, these quantities commute, and certain sets of trees form isomeric classes. There is a single order condition for each class, whereas for the general vector-based problem, for which commutation of atomic stumps does not occur, there is exactly one order condition for each tree. In the case of order 5, the only nontrivial isomeric class contains two trees, and the number of order conditions reduces from 17 to 16 for scalar problems. A method is derived that satisﬁes the 16 conditions for scalar problems but not the complete set based on 17 trees. Hence, as a practical numerical method, it has order 4 for a general initial value problem, but this increases to order 5 for a scalar problem.


Introduction
Trees have a well-established role in the analysis of numerical methods for ordinary differential equations.In this paper, the more general concept of a stump is introduced and applied to the analysis of B-series and the composition rule.It is also shown how stumps can be used to analyse the order of nonautonomous scalar problems for which the order conditions for Runge-Kutta methods are slightly different.A new explanation is given for this discrepancy.
In Section 2, a brief survey is given of the theory of Runge-Kutta methods, showing the structure of the elementary differentials on which B-series are based and the relationship of elementary differentials to trees.This is followed by Section 3, in which stumps are introduced.These are a generalisation of trees, but, by restricting to "atomic stumps", they also provide a means of generating all trees.Isomeric classes of trees generated in this way provide a framework for the analysis of order conditions in the scalar case, as shown in Section 4. The paper concludes with the derivation of a method of "ambiguous order".That is, the method has order 4 in general, but this increases to 5 for a scalar problem.
The theory of stumps, isomeric trees, and applications to scalar differential equations appear in greater detail in [1].The theory of trees and applications to vector-based numerical methods can be found, for example, in [2].The order of the method in [3] was studied in [4].

Trees, Elementary Differentials, and B-Series
Trees are graphs such as , , , , , , , .The "root" of a tree is the lowest point in the diagram, and all vertices, except for the root, have a single parent.For a given tree t, the "order of t", written as |t|, is the number of vertices in t.If a vertex v is the parent of v , then v is a child of v.If there exists a path (v 0 , v 1 , v 2 , . . ., v n ), where v i is a child of v i−1 , i = 1, 2, . . ., n, then v n is a "descendant" of v 0 .The product of the number of descendants for every vertex in a tree t is defined to be the "factorial of t" and is written as t!.
For the first eight trees, the order and factorial are the following:

Notation and Recursions
In this paper, τ := , and we recall two recursions to build other trees in terms of τ.There are two convenient constructions for building complicated trees in terms of simpler trees.They are the following: m is used to show repetitions of t 1 , . . .Assuming the t i are distinct, then the "symmetry" σ(t) is defined recursively by 2. Given trees t 1 and t 2 , define t = t 1 * t 2 from the diagram

Polish Notation Tree Construction
Polish notation or prefix (as distinct from infix or postfix) notation is credited to Lukasiewicz.A famous reference to his work is [5].We generalise the notation so that τ m acts as a prefix operator on m operands and thus This gives a third and bracketless scheme for writing trees.In Table 1, the various notations are given side by side.It is noted that the notation based on t * t does not always give a unique factorisation.

Elementary Differentials
Given an autonomous initial value problem, we write f = f (y 0 ) and also write the sequence of Fréchet derivatives of f , evaluated at y 0 , as f , f , f (3) , . . .It is noted that, in linear algebra terms, these are linear, bilinear, and multilinear operators.In this paper, we always use Polish notation so that f (m) acting on the m vectors v 1 , v 2 , . . ., v m is written as Definition 1.The elementary differential F(t) associated with the tree t is defined by It is noted that the recursion formula can also be written as This makes it possible, in the Polish form of tree notation, to perform a simple substitution.That is, every τ is replaced by f, and every τ m is replaced by f (m) .

Application to B-Series
Given a function a : T → R, the corresponding B-series is a formal Taylor series: Two special cases are the following: 1. t → 1/t!, which gives the Taylor series for the solution to Equation (1) at x = x 0 + h.The series is 2. t → Φ(t), where Φ(t) is the corresponding elementary weight for a specific Runge-Kutta method.This gives the Taylor series for the approximation computed by this Runge-Kutta method: By comparing Equations ( 2) and (3), we recover the conditions for a Runge-Kutta method to have order p:

Trees, Forests, and Stumps
A sequence of items built from τ, τ 1 , τ 2 , . . ., can be contracted by the rules of Polish operations to form a sequence of trees, together with a final subsequence that might not be a tree but would become one if further operands are appended on the right.The sequence of trees on the left is usually referred to as a forest and can be converted into a single tree by a suitable operator to the left of this subsequence.
Incomplete "trees" are referred to as stumps.Examples are The "valency" of a stump is the number of copies of τ, appended to the right, that would be required to convert it into a tree.It is convenient to refer to a tree as a stump with zero valency.
The word "forestump" is introduced to refer to a sequence of items made up from factors τ and τ m , m = 1, 2, . . .When a particular forestump is contracted to form as many trees as possible, then the final form will be the formal product of a forest of trees followed by a single stump (possibly the empty stump).

Bicolour Diagrams to Represent Stumps
We now introduce a generalisation of the way trees are represented diagrammatically to include stumps.We regard stumps as modified trees with some leaves removed but with the edges from these missing leaves to their parents retained.
In the examples given here, a white disc represents the absence of a vertex.The number of white discs is the valency, with the remark that trees are stumps with zero valency.It is noted that the third and fourth examples of valency 2 stumps are mirror images.This is significant in determining the precedence of the operands.

Products of Stumps
Given two stumps s and s , the product ss has a nontrivial product if s is not the trivial stump and s has valency of at least 1; that is, if s is not a tree, the product is formed by grafting the root of s to the rightmost open valency in s.
Two examples of grafting illustrate the significance of stump orientations: = = If s is a tree or s is the trivial stump, no contraction takes place.

Atomic Stumps
An atomic stump is a graph of the following form: It is noted that no more than two generations can be present.
If m of the children of the root are represented by black discs and n are represented by white discs, then the atomic stump is denoted by s mn .The reason for the designation "atomic" is that every tree can be written as the product of atoms.This is illustrated for trees of up to order 4: = s 00 In the factorisation of trees into products of atoms, the factors are written in a specific order, with each factor operating on later factors.However, if we interpret the atoms just as symbols that can commute with each other, we obtain a new equivalence relation, written as ∼.Nothing interesting happens up to order 4, but for order 5, we find that = s 11 s 01 s 10 ∼ s 01 s 11 s 10 = It is a simple exercise to find all isomeric classes of any particular order, but, as far as the author knows, this has not been done above order 6.
For orders 5 and 6, the isomers are, line by line, the following:

Scalar Differential Equations
Early studies of Runge-Kutta methods derived order conditions for the scalar initial value problem instead of using the autonomous test problem (Equation ( 1)).
The full set of conditions up to some specified order becomes the starting point for finding accurate Runge-Kutta methods.The derivations of these conditions to order 5 were the pioneering contributions of Runge, Heun, and then Kutta [6][7][8].We follow their arguments for the same model problem (Equation ( 5)).In this derivation, ∂ x f := ∂ f /∂x and ∂ y f := ∂ f /∂y, with similar notations for higher partial derivatives.First, we find the second derivative of y by the chain rule: Similarly, we find the third derivative: and carry on to find fourth and higher derivatives.By evaluating y (n) at x = x 0 , we can find the Taylor expansions to use in Equation (5).A more complicated calculation leads to the detailed series of Equation ( 8) in the case of any particular Runge-Kutta method and hence to the determination of its order.We pursue this line of enquiry below.The greatest achievement in this line of work was given in [3], where sixth order methods involving eight stages were derived.In all the derivations of new methods, up to the publication of this tour de force, a tacit assumption was made.This was that a method derived to have a specific order for a general scalar problem will have this same order for a coupled system of scalar problems; that is, it will have this order for a problem with N > 1.This bald assumption is untrue, and it becomes necessary to carry out the order analysis in a multidimensional setting.

Nonautonomous Vector-Valued Problems
This analysis was carried out in a scalar context, in contrast to later work, for which the application was always to vector-valued problems.To cater for problems that are both nonautonomous and, at the same time, vector-valued, we can use the terminology of the present section but with a multidimensional interpretation.This is done by regarding factors such as ∂ y f and ∂ 2 y f as linear operators and bilinear operators, respectively, that operate on vector-valued terms to the right, using Polish notation.To maintain this interpretation, when a problem is nonscalar, this requires the strict order of factors to be observed.Of course, in the traditional scalar interpretation, all factors commute, and the order of factors could have been altered.

Systematic Derivation of Taylor Series
The evaluation of y (n) , n = 1, 2, . . ., 5, is now carried out in a systematic manner.We let We also let D mn denote D mn evaluated at (x 0 , y 0 ).
Using Lemma 1, we find in turn that To find the order conditions for a Runge-Kutta method, up to order 5, we need to systematically find the Taylor series for the stages and finally for the output.In this analysis, we assume that ∑ s j=1 a ij = c i for all stages.For the stages, it is sufficient to work only to order 4, so that the scaled stage derivatives include h 5 terms.
As a step towards finding the Taylor expansions of the stages and the output, we need to find the series for h f (Y) for a given series Y = y 0 + • • • .In the following result, we use an arbitrary weighted series using the terms in Equation ( 8). where Proof.Throughout this proof, an expression of the form ∂ k x ∂ m y f is assumed to have been evaluated at (x 0 , y 0 ).Evaluate T 1 , T 2 , T 3 , and T 4 : Axioms 2018, 00, 0 9 of 13 where The evaluation of T 5 is similar but more complicated and is omitted.
For the stage values of a Runge-Kutta method, we have and then, to one further order, A similar expression can be written down for the output from a step: A comparison with the exact solution, y 0 + hy (x 0 ) + 1 2 h 2 y (x 0 ) + O(h 3 ), evaluated using Equation (8), gives, under second order conditions, This analysis can be taken further in a straightforward and systematic way and is summarised, as far as order 5, in Theorem 1.This theorem, for which the detailed proof is omitted, has to be read together with Table 3. Theorem 1.In the statement of this result, the quantities p, T, σ, and φ are given in Table 3.
1.The Taylor expansion for the exact solution to the initial value problem y (x) = f (x, y), y(x 0 ) = y 0 (9) to within O(h 6 ) is y 0 plus the sum of terms of the form 2. The Taylor expansion for the numerical solution y 1 to Equation (9), using a Runge-Kutta method (A, b T , c), to within O(h 6 ) is y 0 plus the sum of terms of the form φh p σ −1 T.
3. The conditions to order 5, for the solution of Equation ( 5) using (A, b T , c), are the equations of the form φ = e.

Order Conditions for Vector Problems
The order conditions for the autonomous vector problem, given by Equation ( 4) for p = 5, are identical to (O1)-(O11) and (O14)-(O17) together with the two cases of (4) missing from Table 3: (11).Although these do not occur in Table 3, the sum of (O12) and (O13) is equal to which does occur as an un-numbered entry in Table 3. Apart from this discrepancy, the order conditions for the scalar and vector problems exactly agree as far as order 5.

Derivation of Ambiguous Method
We now construct a method that has order 5 for a scalar problem but only order 4 for a vector-based problem.This means that all the conditions Φ(t) = 1/t!need to be satisfied for the 17 trees such that |t| ≤ 5, except for (O12) and (O13), which can be replaced by Equation (10).In constructing this method, it is convenient to introduce a vector d T defined as This satisfies the property In the method to be constructed, some assumptions are made.These are From Equations ( 13) and ( 14) and some of the order conditions, it follows that where θ is a parameter, assumed to be nonzero.The third row of A can be found from because, from several order conditions, From Equation (15), it is found that a 32 = 13 4 .The values of a 42 and a 52 can be written in terms of the other elements of rows 4 and 5 of A, and row 6 can be found in terms of the other rows.There are now four free parameters remaining (a 43 , a 53 , a 54 , and θ) and four conditions that are not automatically satisfied.These are (O11), (O16), (O17), and Equation (10).The solutions are given in the complete tableau.(16)

Numerical Test
A suitable single differential equation to test the order of convergence of this method, together with a closely related autonomous system, is The solution of Equation ( 17), in parametric coordinates, is x = ξ(t) := t sin(ln(t)), y = η(t) := t cos(ln(t)), and this is also the solution to Equation (18).Two experiments were carried out: 1.The scalar problem (Equation ( 17)) was solved using the method of Equation (16) on the interval [ξ(π/6), ξ(5π 12)].2. The two-dimensional problem of Equation (18), using the same method, was solved on the interval [π/6, 5π 12].
In each case, n = 10 × 2 i for i = 0, 1, 2, 3, 4. The errors for the two methods and the various numbers of steps are shown in Table 4. Also shown are the errors for n steps divided by the error for 2n steps.As expected, the numerical behaviour for experiment 1 was consistent with order 5.In contrast, for experiment 2, the numerical behaviour was consistent only with order 4.

Discussion
There is little scientific interest in the solution of scalar initial value problems, and there is no advantage in constructing numerical methods that are suitable only for this special class of problems.Hence, in the search for useful numerical methods, it is an advantage to use tree-based theory.The results presented here emphasise the danger of using scalar theory to derive methods of order higher than 4 because they could be incorrect.
one or more additional stumps implies grafting to open valency positions.

Definition 2 .
Two trees are isomeric if their atomic factors are the same.

1 D 2 D 02 D 2 10∑ 1 20
11 D 01 D 10 ∑ b i (c i + c j )a ij a jk c k = 7 120 5 b i a ij c j a ik c k = ∑ b i a ij a jk a k c = 1 120 (O17) 20 .We choose the convenient values c 4 = 1 4 and c 5 = 7 10 together with c 2 = 1 2 and c 3 = 1.The value of b is found from (O1), (O2), (O3), (O5), and (O9), and d is found from Equation (11) with the requirement that d 6 = 0.The results are b
s 11 s 01 s 10 = s 01 s 11 s 10 = s 02 s 10 s 01 s 10 = s 01 s 02 s 10 s 10 = s 11 s 01 s 20 = s 01 s 11 s 20 = s 21 s 01 s 10 = s 01 s 21 s 10 = s 11 s 01 s 01 s 10 = s 01 s 11 s 01 s 10 = s 01 s 01 s 11 s 10We see in Section 4 that isomeric classes for scalar differential equations have a similar role to individual trees in the case of differential systems of arbitrarily high dimension.We let a n denote the number of trees with order n and A n denote the accumulated total a 1 + a 2 + • • • + a n .Similarly, we let b n denote the number of isomeric classes with order n and B n denote the accumulated total for this quantity.These are shown in Table2up to order 6.

Table 2 .
Trees and isomeric classes for various orders.

Table 4 .
Variation of global errors for a range of step sizes.