Trees and Numerical Methods for Ordinary Differential Equations John Butcher The University of Auckland New Zealand Università degli Studi di Salerno 9 September 2008 Trees and numerical methods for ordinary differential equations – p. 1/41 Contents What are trees? What are differential equations? What are Runge–Kutta methods? Trees and numerical methods for ordinary differential equations – p. 2/41 Contents What are trees? What are differential equations? What are Runge–Kutta methods? Order of methods: First approach Order of methods: Second approach Trees and numerical methods for ordinary differential equations – p. 2/41 Contents What are trees? What are differential equations? What are Runge–Kutta methods? Order of methods: First approach Order of methods: Second approach Taylor expansion of exact solution Taylor expansion for numerical approximation Order conditions Trees and numerical methods for ordinary differential equations – p. 2/41 Contents What are trees? What are differential equations? What are Runge–Kutta methods? Order of methods: First approach Order of methods: Second approach Taylor expansion of exact solution Taylor expansion for numerical approximation Order conditions Fourth order methods A method of order 4 or 5 Algebraic interpretation Trees and numerical methods for ordinary differential equations – p. 2/41 Contents What are trees? What are differential equations? What are Runge–Kutta methods? Order of methods: First approach Order of methods: Second approach Taylor expansion of exact solution Taylor expansion for numerical approximation Order conditions Fourth order methods A method of order 4 or 5 Algebraic interpretation Appendix Trees and numerical methods for ordinary differential equations – p. 2/41 What are trees? In this talk Trees means Rooted Trees. I will just give diagrams for the first few (rooted) trees and hope this is enough of an explanation. Trees and numerical methods for ordinary differential equations – p. 3/41 What are trees? In this talk Trees means Rooted Trees. I will just give diagrams for the first few (rooted) trees and hope this is enough of an explanation. Trees and numerical methods for ordinary differential equations – p. 3/41 What are trees? In this talk Trees means Rooted Trees. I will just give diagrams for the first few (rooted) trees and hope this is enough of an explanation. In each case the root is at the bottom of the diagram. Trees and numerical methods for ordinary differential equations – p. 3/41 What are trees? In this talk Trees means Rooted Trees. I will just give diagrams for the first few (rooted) trees and hope this is enough of an explanation. In each case the root is at the bottom of the diagram. There are applications in genealogies and the representation of nested arithmetic operations Trees and numerical methods for ordinary differential equations – p. 3/41 What are trees? In this talk Trees means Rooted Trees. I will just give diagrams for the first few (rooted) trees and hope this is enough of an explanation. In each case the root is at the bottom of the diagram. There are applications in genealogies and the representation of nested arithmetic operations rah Zoë a Z rg Ma ie ald la h r n p e El Fin So Em ael h c Mi ite r e u J oh rew d An n Trees and numerical methods for ordinary differential equations – p. 3/41 What are trees? In this talk Trees means Rooted Trees. I will just give diagrams for the first few (rooted) trees and hope this is enough of an explanation. In each case the root is at the bottom of the diagram. There are applications in genealogies and the representation of nested arithmetic operations rah Zoë a Z rg Ma ie ald la h r n p e El Fin So Em ael h c Mi ite r e u J oh n An w dre y x z + ∗ (x+y)∗z Trees and numerical methods for ordinary differential equations – p. 3/41 What are differential equations? In this talk, differential equations are initial value problems such as y ′ (x) = f (y(x)), y(x0 ) = y0 , f : RN → RN (1) or y ′ (x) = f (x, y(x)), y(x0 ) = y0 , f : R×RN → RN (2) Trees and numerical methods for ordinary differential equations – p. 4/41 What are differential equations? In this talk, differential equations are initial value problems such as y ′ (x) = f (y(x)), y(x0 ) = y0 , f : RN → RN (1) or y ′ (x) = f (x, y(x)), y(x0 ) = y0 , f : R×RN → RN (2) It looks deceptively easy to assume that N = 1 but this doesn’t capture all the flavour of the problem, even for problem (2). Trees and numerical methods for ordinary differential equations – p. 4/41 What are differential equations? In this talk, differential equations are initial value problems such as y ′ (x) = f (y(x)), y(x0 ) = y0 , f : RN → RN (1) or y ′ (x) = f (x, y(x)), y(x0 ) = y0 , f : R×RN → RN (2) It looks deceptively easy to assume that N = 1 but this doesn’t capture all the flavour of the problem, even for problem (2). If we make no such assumption, then (1) is simpler than (2) and really just as general, because we can always add an additional differential equation whose solution is x. Trees and numerical methods for ordinary differential equations – p. 4/41 What are Runge–Kutta methods? In terms of the autonomous initial value system y ′ (x) = f (y(x)), y(x0 ) = y0 , the aim of a Runge–Kutta method is to calculate approximations: y1 ≈ y(x1 ), y2 ≈ y(x2 ), .... The basic example is the simple Euler method yn = yn−1 + hf (yn−1 ), h = xn − xn−1 Trees and numerical methods for ordinary differential equations – p. 5/41 What are Runge–Kutta methods? In terms of the autonomous initial value system y ′ (x) = f (y(x)), y(x0 ) = y0 , the aim of a Runge–Kutta method is to calculate approximations: y1 ≈ y(x1 ), y2 ≈ y(x2 ), .... The basic example is the simple Euler method yn = yn−1 + hf (yn−1 ), h = xn − xn−1 This can be made more accurate by using the mid-point quadrature formula: 1 yn = yn−1 + hf yn−1 + 2 hf (yn−1 ) . Trees and numerical methods for ordinary differential equations – p. 5/41 What are Runge–Kutta methods? In terms of the autonomous initial value system y ′ (x) = f (y(x)), y(x0 ) = y0 , the aim of a Runge–Kutta method is to calculate approximations: y1 ≈ y(x1 ), y2 ≈ y(x2 ), .... The basic example is the simple Euler method yn = yn−1 + hf (yn−1 ), h = xn − xn−1 This can be made more accurate by using either the mid-point or the trapezoidal rule quadrature formula: 1 yn = yn−1 + hf yn−1 + 2 hf (yn−1 ) . yn = yn−1 + 21 hf (yn−1 ) + 12 hf yn−1 + hf (yn−1 ) . Trees and numerical methods for ordinary differential equations – p. 5/41 These methods from Runge’s 1895 paper are “second order” because the error in a single step behaves like O(h3 ). At a specific output point the error is O(h2 ). Trees and numerical methods for ordinary differential equations – p. 6/41 These methods from Runge’s 1895 paper are “second order” because the error in a single step behaves like O(h3 ). At a specific output point the error is O(h2 ). It is recognised that for accurate calculations, high order is better than low order and Runge’s work was followed by contributions by Heun, Kutta, Nyström and others, pushing the available order up to 3, 4, 5 and higher. Trees and numerical methods for ordinary differential equations – p. 6/41 These methods from Runge’s 1895 paper are “second order” because the error in a single step behaves like O(h3 ). At a specific output point the error is O(h2 ). It is recognised that for accurate calculations, high order is better than low order and Runge’s work was followed by contributions by Heun, Kutta, Nyström and others, pushing the available order up to 3, 4, 5 and higher. Our aim now will be to formulate a typical step in an “s stage method” and then find criteria for this method to have a specific order. Trees and numerical methods for ordinary differential equations – p. 6/41 In carrying out a step we evaluate s stage values Y1 , Y2 , ..., Ys and s stage derivatives F1 , F2 , ..., Fs , using the formula Fi = f (Yi ). Trees and numerical methods for ordinary differential equations – p. 7/41 In carrying out a step we evaluate s stage values Y1 , Y2 , ..., Ys and s stage derivatives F1 , F2 , ..., Fs , using the formula Fi = f (Yi ). Each Yi is found as a linear combination of the Fj added on to y0 : s X Yi = y0 + h aij Fj j=1 Trees and numerical methods for ordinary differential equations – p. 7/41 In carrying out a step we evaluate s stage values Y1 , Y2 , ..., Ys and s stage derivatives F1 , F2 , ..., Fs , using the formula Fi = f (Yi ). Each Yi is found as a linear combination of the Fj added on to y0 : s X Yi = y0 + h aij Fj ≈ y(x0 + ci h) j=1 Trees and numerical methods for ordinary differential equations – p. 7/41 In carrying out a step we evaluate s stage values Y1 , Y2 , ..., Ys and s stage derivatives F1 , F2 , ..., Fs , using the formula Fi = f (Yi ). Each Yi is found as a linear combination of the Fj added on to y0 : s X Yi = y0 + h aij Fj ≈ y(x0 + ci h) j=1 and the approximation at x1 = x0 + h is found from s X bi Fi y1 = y0 + h i=1 Trees and numerical methods for ordinary differential equations – p. 7/41 In carrying out a step we evaluate s stage values Y1 , Y2 , ..., Ys and s stage derivatives F1 , F2 , ..., Fs , using the formula Fi = f (Yi ). Each Yi is found as a linear combination of the Fj added on to y0 : s X Yi = y0 + h aij Fj ≈ y(x0 + ci h) j=1 and the approximation at x1 = x0 + h is found from s X bi Fi ≈ y(x0 + h). y1 = y0 + h i=1 Trees and numerical methods for ordinary differential equations – p. 7/41 We represent the method by a tableau: c1 a11 c2 a21 .. .. . . cs as1 b1 a12 a22 .. . as2 b2 · · · a1s · · · a2s .. . · · · ass · · · bs Trees and numerical methods for ordinary differential equations – p. 8/41 We represent the method by a tableau: c1 a11 a12 · · · a1s c2 a21 a22 · · · a2s .. .. .. .. . . . . cs as1 as2 · · · ass b1 b2 · · · bs or, if the method is explicit, by the simplified tableau 0 c2 a21 .. . . . .. .. . . . cs as1 as2 · · · as,s−1 b1 b2 · · · bs−1 bs Trees and numerical methods for ordinary differential equations – p. 8/41 Examples: 1 y1 = y0 + 0hf (y0 ) + 1hf y0 + 2 hf (y0 ) 0 1 2 1 2 0 1 Trees and numerical methods for ordinary differential equations – p. 9/41 Examples: 1 y1 = y0 + 0hf (y0 ) + 1hf y0 + 2 hf (y0 ) Y1 0 1 2 1 2 Y2 0 1 Trees and numerical methods for ordinary differential equations – p. 9/41 Examples: 1 y1 = y0 + 0hf (y0 ) + 1hf y0 + 2 hf (y0 ) 0 Y1 1 2 Y2 1 2 0 1 y1 = y0 + 1 hf (y0 ) 2 + 1 hf 2 y0 + 1hf (y0 ) 0 1 1 1 2 1 2 Trees and numerical methods for ordinary differential equations – p. 9/41 Examples: 1 y1 = y0 + 0hf (y0 ) + 1hf y0 + 2 hf (y0 ) 0 Y1 1 2 Y2 1 2 0 1 y1 = y0 + Y1 1 hf (y0 ) 2 + 1 hf 2 y0 + 1hf (y0 ) 0 1 1 1 2 Y2 1 2 Trees and numerical methods for ordinary differential equations – p. 9/41 Order of methods: First approach This approach has a proud history andv has been used by Runge, Heun, Kutta, Nyström and Huta to obtain methods up to order 6. Trees and numerical methods for ordinary differential equations – p. 10/41 Order of methods: First approach This approach has a proud history andv has been used by Runge, Heun, Kutta, Nyström and Huta to obtain methods up to order 6. We start with the differential equation Trees and numerical methods for ordinary differential equations – p. 10/41 Order of methods: First approach This approach has a proud history andv has been used by Runge, Heun, Kutta, Nyström and Huta to obtain methods up to order 6. We start with the differential equation dy y(x0 ) = y0 dx = f (x, y), Trees and numerical methods for ordinary differential equations – p. 10/41 Order of methods: First approach This approach has a proud history andv has been used by Runge, Heun, Kutta, Nyström and Huta to obtain methods up to order 6. We start with the differential equation dy y(x0 ) = y0 dx = f (x, y), We want the first few terms in the formal Taylor series about x0 : so we calculate the next few derivatives y ′′ = fx + f fy , ′′′ 2 y = fxx + 2f fxy + f fyy + 2 f fy Trees and numerical methods for ordinary differential equations – p. 10/41 Order of methods: First approach This approach has a proud history andv has been used by Runge, Heun, Kutta, Nyström and Huta to obtain methods up to order 6. We start with the differential equation dy y(x0 ) = y0 dx = f (x, y), We want the first few terms in the formal Taylor series about x0 : so we calculate the next few derivatives y ′′ = fx + f fy , ′′′ 2 y = fxx + 2f fxy + f fyy + 2 f fy Once we have the Taylor series for y(x0 + h) we find also the series for a numerical approximation and we get a number of “order conditions”. Trees and numerical methods for ordinary differential equations – p. 10/41 Order of methods: First approach This approach has a proud history andv has been used by Runge, Heun, Kutta, Nyström and Huta to obtain methods up to order 6. We start with the differential equation dy y(x0 ) = y0 dx = f (x, y), We want the first few terms in the formal Taylor series about x0 : so we calculate the next few derivatives y ′′ = fx + f fy , ′′′ 2 y = fxx + 2f fxy + f fyy + 2 f fy Once we have the Taylor series for y(x0 + h) we find also the series for a numerical approximation and we get a number of “order conditions”. For order p call the number of conditions Cp . Trees and numerical methods for ordinary differential equations – p. 10/41 The number of parameters in an explicit Runge–Kutta method with s stages is s(s + 1)/2. It might be expected that s should be chosen so that there are more parameters than conditions, as in the table p 1 2 3 4 Cp 1 2 4 8 s 1 2 3 4 s(s+1) 2 5 16 6 21 6 31 8 36 1 3 6 10 Trees and numerical methods for ordinary differential equations – p. 11/41 The number of parameters in an explicit Runge–Kutta method with s stages is s(s + 1)/2. It might be expected that s should be chosen so that there are more parameters than conditions, as in the table p 1 2 3 4 Cp 1 2 4 8 s 1 2 3 4 s(s+1) 2 5 6 16 31 6 7 8 21 28 36 1 3 6 10 Surprisingly, order 6 can be achieved with s = 7 Trees and numerical methods for ordinary differential equations – p. 11/41 Order of methods: Second approach We make two changes; these are 1. Remove x from f (x, y) — in other words make the problem autonomous Trees and numerical methods for ordinary differential equations – p. 12/41 Order of methods: Second approach We make two changes; these are 1. Remove x from f (x, y) — in other words make the problem autonomous 2. Regard y as a vector-valued function Trees and numerical methods for ordinary differential equations – p. 12/41 Order of methods: Second approach We make two changes; these are 1. Remove x from f (x, y) — in other words make the problem autonomous 2. Regard y as a vector-valued function The first change seems to make everything simpler because all terms involving fx , fxy etc just disappear. Trees and numerical methods for ordinary differential equations – p. 12/41 Order of methods: Second approach We make two changes; these are 1. Remove x from f (x, y) — in other words make the problem autonomous 2. Regard y as a vector-valued function The first change seems to make everything simpler because all terms involving fx , fxy etc just disappear. The second change seems to make everything more complicated, because terms like f 2 fy fyy , which are identical in one dimension, have to be distinguished from each other in N dimensions. Trees and numerical methods for ordinary differential equations – p. 12/41 How are we going to write these complicated terms involving compositions of what will be linear and multilinear operators? Trees and numerical methods for ordinary differential equations – p. 13/41 How are we going to write these complicated terms involving compositions of what will be linear and multilinear operators? It is possible to work in terms of tensors but I prefer to use Frechet derivatives. Trees and numerical methods for ordinary differential equations – p. 13/41 How are we going to write these complicated terms involving compositions of what will be linear and multilinear operators? It is possible to work in terms of tensors but I prefer to use Frechet derivatives. I will now write the first, second and third derivatives in this way with the one-dimensional formulae written beside them for comparison. y ′ = f, y′ = f y ′′ = fx + f fy , y ′′ = f ′ f y ′′′ = fxx + 2f fxy + f 2 fyy + f fy2 , y ′′′ = f ′′ (f, f) + f ′ f ′ f where f = f (y(x)), f ′ = f ′ (y(x)) etc. Trees and numerical methods for ordinary differential equations – p. 13/41 If we count the number of order conditions in this second formulation — call this number Dp for the moment — and include Cp for comparison, we get this table Trees and numerical methods for ordinary differential equations – p. 14/41 If we count the number of order conditions in this second formulation — call this number Dp for the moment — and include Cp for comparison, we get this table p Cp D p 1 2 3 4 5 6 7 8 1 2 4 8 16 31 1 2 4 8 17 37 85 200 Trees and numerical methods for ordinary differential equations – p. 14/41 If we count the number of order conditions in this second formulation — call this number Dp for the moment — and include Cp for comparison, we get this table p Cp D p 1 1 1 2 2 2 3 4 4 4 8 8 5 16 17 6 31 37 7 85 8 200 I don’t know if C7 , C8 , . . . are known Trees and numerical methods for ordinary differential equations – p. 14/41 If we count the number of order conditions in this second formulation — call this number Dp for the moment — and include Cp for comparison, we get this table p Cp D p 1 1 1 2 2 2 3 4 4 4 8 8 5 16 17 6 31 37 7 85 8 200 I don’t know if C7 , C8 , . . . are known but I don’t think we should really care what their values are. Trees and numerical methods for ordinary differential equations – p. 14/41 In the second approach, we again list the formulae for the derivatives; but this time go as far as order 4. Note the tree-like structures: Trees and numerical methods for ordinary differential equations – p. 15/41 In the second approach, we again list the formulae for the derivatives; but this time go as far as order 4. Note the tree-like structures: y ′ = f, f Trees and numerical methods for ordinary differential equations – p. 15/41 In the second approach, we again list the formulae for the derivatives; but this time go as far as order 4. Note the tree-like structures: y ′ = f, f y ′′ = f ′ f, f′ f Trees and numerical methods for ordinary differential equations – p. 15/41 In the second approach, we again list the formulae for the derivatives; but this time go as far as order 4. Note the tree-like structures: y ′ = f, f y ′′ = f ′ f, y ′′′ = f ′′ (f, f) + f ′ f ′ f, f′ f f f′′ f f′ f′ f Trees and numerical methods for ordinary differential equations – p. 15/41 In the second approach, we again list the formulae for the derivatives; but this time go as far as order 4. Note the tree-like structures: y ′ = f, f f′ f f f′′ f y ′′ = f ′ f, y ′′′ = f ′′ (f, f) f′ f′ f + f ′ f ′ f, y (4) f f f f ′′′ ′′′ = f (f, f, f) + 3f ′′ (f, f ′ f) f f + f ′ f ′′ (f, f) ′ ′ ′ +f f f f f′ f′′ f f′′ f′ f f′ f′ f′ f Trees and numerical methods for ordinary differential equations – p. 15/41 The plan now is to formulate Runge–Kutta methods in a systematic way and to explore the order conditions. Trees and numerical methods for ordinary differential equations – p. 16/41 The plan now is to formulate Runge–Kutta methods in a systematic way and to explore the order conditions. This will all be done using what I am calling the second approach. Trees and numerical methods for ordinary differential equations – p. 16/41 The plan now is to formulate Runge–Kutta methods in a systematic way and to explore the order conditions. This will all be done using what I am calling the second approach. Later, right at the end, I plan to come back to the first approach and show why I don’t think it is completely satisfactory. Trees and numerical methods for ordinary differential equations – p. 16/41 The plan now is to formulate Runge–Kutta methods in a systematic way and to explore the order conditions. This will all be done using what I am calling the second approach. Later, right at the end, I plan to come back to the first approach and show why I don’t think it is completely satisfactory. Before we go on, note that the numbers Dp , is just the number of rooted trees with no more than p vertices. Trees and numerical methods for ordinary differential equations – p. 16/41 Taylor expansion of exact solution Recalculate formulae for the second, third, . . . , derivatives. Trees and numerical methods for ordinary differential equations – p. 17/41 Taylor expansion of exact solution Recalculate formulae for the second, third, . . . , derivatives. y ′ (x) = f (y(x)) Trees and numerical methods for ordinary differential equations – p. 17/41 Taylor expansion of exact solution Recalculate formulae for the second, third, . . . , derivatives. y ′ (x) = f (y(x)) y ′′ (x) = f ′ (y(x))y ′ (x) = f ′ (y(x))f (y(x))) Trees and numerical methods for ordinary differential equations – p. 17/41 Taylor expansion of exact solution Recalculate formulae for the second, third, . . . , derivatives. y ′ (x) = f (y(x)) y ′′ (x) = f ′ (y(x))y ′ (x) = f ′ (y(x))f (y(x))) ′′′ ′′ ′ ′ ′ ′ y (x) = f (y(x))(f (y(x)), y (x)) + f (y(x))f (y(x))y (x) =f ′′ (y(x))(f (y(x)), f (y(x)))+f ′ (y(x))f ′ (y(x))f (y(x)) Trees and numerical methods for ordinary differential equations – p. 17/41 Taylor expansion of exact solution Recalculate formulae for the second, third, . . . , derivatives. y ′ (x) = f (y(x)) y ′′ (x) = f ′ (y(x))y ′ (x) = f ′ (y(x))f (y(x))) ′′′ ′′ ′ ′ ′ ′ y (x) = f (y(x))(f (y(x)), y (x)) + f (y(x))f (y(x))y (x) =f ′′ (y(x))(f (y(x)), f (y(x)))+f ′ (y(x))f ′ (y(x))f (y(x)) As we have found out, this becomes increasingly complicated as we evaluate higher derivatives. Trees and numerical methods for ordinary differential equations – p. 17/41 Taylor expansion of exact solution Recalculate formulae for the second, third, . . . , derivatives. y ′ (x) = f (y(x)) y ′′ (x) = f ′ (y(x))y ′ (x) = f ′ (y(x))f (y(x))) ′′′ ′′ ′ ′ ′ ′ y (x) = f (y(x))(f (y(x)), y (x)) + f (y(x))f (y(x))y (x) =f ′′ (y(x))(f (y(x)), f (y(x)))+f ′ (y(x))f ′ (y(x))f (y(x)) As we have found out, this becomes increasingly complicated as we evaluate higher derivatives. Hence we return to the known systematic pattern: Trees and numerical methods for ordinary differential equations – p. 17/41 Taylor expansion of exact solution Recalculate formulae for the second, third, . . . , derivatives. y ′ (x) = f (y(x)) y ′′ (x) = f ′ (y(x))y ′ (x) = f ′ (y(x))f (y(x))) ′′′ ′′ ′ ′ ′ ′ y (x) = f (y(x))(f (y(x)), y (x)) + f (y(x))f (y(x))y (x) =f ′′ (y(x))(f (y(x)), f (y(x)))+f ′ (y(x))f ′ (y(x))f (y(x)) As we have found out, this becomes increasingly complicated as we evaluate higher derivatives. Hence we return to the known systematic pattern: Recall the notation f = f (y(x)), f′ = f ′ (y(x)), f′′ = f ′′ (y(x)), . . . . Trees and numerical methods for ordinary differential equations – p. 17/41 ′ y (x) = f f ′′ ′ f f′ ′′′ ′′ y (x) = f f y (x) = f (f, f) + f′ f′ f f f f′′ f f′ f′ Trees and numerical methods for ordinary differential equations – p. 18/41 ′ y (x) = f f ′′ ′ f f′ ′′′ ′′ y (x) = f f y (x) = f (f, f) + f′ f′ f f f f′′ f f′ f′ The various terms have a structure related to rooted-trees. Trees and numerical methods for ordinary differential equations – p. 18/41 ′ y (x) = f f ′′ ′ f f′ ′′′ ′′ y (x) = f f y (x) = f (f, f) + f′ f′ f f f f′′ f f′ f′ The various terms have a structure related to rooted-trees. Hence, we introduce the set of all rooted trees and some functions on this set. Trees and numerical methods for ordinary differential equations – p. 18/41 Let T denote the set of rooted trees: n T = , , , , , , , , ... o We identify the following functions on T . Trees and numerical methods for ordinary differential equations – p. 19/41 Let T denote the set of rooted trees: n T = , , , , , , , , ... o We identify the following functions on T . In this table, t will denote a typical tree Trees and numerical methods for ordinary differential equations – p. 19/41 Let T denote the set of rooted trees: n T = , , , , , , , , ... o We identify the following functions on T . In this table, t will denote a typical tree r(t) order of t = number of vertices Trees and numerical methods for ordinary differential equations – p. 19/41 Let T denote the set of rooted trees: n T = , , , , , , , , ... o We identify the following functions on T . In this table, t will denote a typical tree r(t) order of t = number of vertices σ(t) symmetry of t = order of automorphism group Trees and numerical methods for ordinary differential equations – p. 19/41 Let T denote the set of rooted trees: n T = , , , , , , , , ... o We identify the following functions on T . In this table, t will denote a typical tree r(t) order of t = number of vertices σ(t) symmetry of t = order of automorphism group γ(t) density of t Trees and numerical methods for ordinary differential equations – p. 19/41 Let T denote the set of rooted trees: n T = , , , , , , , , ... o We identify the following functions on T . In this table, t will denote a typical tree r(t) order of t = number of vertices σ(t) symmetry of t = order of automorphism group γ(t) density of t α(t) number of ways of labelling with an ordered set Trees and numerical methods for ordinary differential equations – p. 19/41 Let T denote the set of rooted trees: n T = , , , , , , , , ... o We identify the following functions on T . In this table, t will denote a typical tree r(t) order of t = number of vertices σ(t) symmetry of t = order of automorphism group γ(t) density of t α(t) number of ways of labelling with an ordered set β(t) number of ways of labelling with an unordered set Trees and numerical methods for ordinary differential equations – p. 19/41 Let T denote the set of rooted trees: n T = , , , , , , , , ... o We identify the following functions on T . In this table, t will denote a typical tree r(t) order of t = number of vertices σ(t) symmetry of t = order of automorphism group γ(t) density of t α(t) number of ways of labelling with an ordered set β(t) number of ways of labelling with an unordered set F (t)(y0 ) elementary differential Trees and numerical methods for ordinary differential equations – p. 19/41 Let T denote the set of rooted trees: n T = , , , , , , , , ... o We identify the following functions on T . In this table, t will denote a typical tree r(t) order of t = number of vertices σ(t) symmetry of t = order of automorphism group γ(t) density of t α(t) number of ways of labelling with an ordered set β(t) number of ways of labelling with an unordered set F (t)(y0 ) elementary differential We will give examples of these functions based on t = Trees and numerical methods for ordinary differential equations – p. 19/41 t = Trees and numerical methods for ordinary differential equations – p. 20/41 t = 1 23 4 r(t) = 7 5 6 7 Trees and numerical methods for ordinary differential equations – p. 20/41 t = 1 23 4 r(t) = 7 5 6 7 σ(t) = 8 Trees and numerical methods for ordinary differential equations – p. 20/41 t = 1 23 4 r(t) = 7 5 6 7 σ(t) = 8 1 11 1 γ(t) = 63 3 3 7 Trees and numerical methods for ordinary differential equations – p. 20/41 t = 1 23 4 5 r(t) = 7 6 7 σ(t) = 8 1 11 1 3 γ(t) = 63 α(t) = r(t)! σ(t)γ(t) 3 7 = 10 Trees and numerical methods for ordinary differential equations – p. 20/41 t = 1 23 4 5 r(t) = 7 6 7 σ(t) = 8 1 11 1 3 γ(t) = 63 3 7 α(t) = r(t)! σ(t)γ(t) = 10 β(t) = r(t)! σ(t) = 630 Trees and numerical methods for ordinary differential equations – p. 20/41 t = 1 23 4 5 r(t) = 7 6 7 σ(t) = 8 1 11 1 3 γ(t) = 63 3 7 α(t) = r(t)! σ(t)γ(t) = 10 β(t) = r(t)! σ(t) = 630 f f f f ′′ ′′ ′′ F (t) = f f (f, f), f (f, f) f′′ f′′ f′′ Trees and numerical methods for ordinary differential equations – p. 20/41 These functions are easy to compute up to order 4 trees: t r(t) 1 2 3 3 4 4 4 4 σ(t) 1 1 2 1 6 1 2 1 γ(t) 1 2 3 6 4 8 12 24 α(t) 1 1 1 1 1 3 1 1 β(t) 1 2 3 6 4 24 12 24 ′ ′′ ′ ′ ′′′ ′′ ′ ′ ′′ ′ ′ ′ F (t) f f f f (f, f) f f f f (f, f, f) f (f, f f) f f (f, f) f f f f Trees and numerical methods for ordinary differential equations – p. 21/41 The formal Taylor expansion of the solution at x0 + h is y(x0 + h) = y0 + X α(t)hr(t) t∈T r(t)! F (t)(y0 ) Trees and numerical methods for ordinary differential equations – p. 22/41 The formal Taylor expansion of the solution at x0 + h is y(x0 + h) = y0 + X α(t)hr(t) t∈T r(t)! F (t)(y0 ) Using the known formula for α(t), we can write this as y(x0 + h) = y0 + X t∈T hr(t) F (t)(y0 ) σ(t)γ(t) Trees and numerical methods for ordinary differential equations – p. 22/41 The formal Taylor expansion of the solution at x0 + h is y(x0 + h) = y0 + X α(t)hr(t) t∈T r(t)! F (t)(y0 ) Using the known formula for α(t), we can write this as y(x0 + h) = y0 + X t∈T hr(t) F (t)(y0 ) σ(t)γ(t) Our aim will now be to find a corresponding formula for the result computed by one step of a Runge-Kutta method. Trees and numerical methods for ordinary differential equations – p. 22/41 The formal Taylor expansion of the solution at x0 + h is y(x0 + h) = y0 + X α(t)hr(t) t∈T r(t)! F (t)(y0 ) Using the known formula for α(t), we can write this as y(x0 + h) = y0 + X t∈T hr(t) F (t)(y0 ) σ(t)γ(t) Our aim will now be to find a corresponding formula for the result computed by one step of a Runge-Kutta method. By comparing these formulae term by term, we will obtain conditions for a specific order of accuracy. Trees and numerical methods for ordinary differential equations – p. 22/41 Taylor expansion for numerical approximation We need to evaluate various expressions which depend on the tableau for a particular method. Trees and numerical methods for ordinary differential equations – p. 23/41 Taylor expansion for numerical approximation We need to evaluate various expressions which depend on the tableau for a particular method. These are known as “elementary weights”. Trees and numerical methods for ordinary differential equations – p. 23/41 Taylor expansion for numerical approximation We need to evaluate various expressions which depend on the tableau for a particular method. These are known as “elementary weights”. We use the example tree we have already considered to illustrate the construction of the elementary weight Φ(t). l t= m n j o k i Trees and numerical methods for ordinary differential equations – p. 23/41 Taylor expansion for numerical approximation We need to evaluate various expressions which depend on the tableau for a particular method. These are known as “elementary weights”. We use the example tree we have already considered to illustrate the construction of the elementary weight Φ(t). l t= Φ(t) = s X m n j o k i bi aij ajl ajmaik aknako i,j,k,l,m,n,o=1 Trees and numerical methods for ordinary differential equations – p. 23/41 Taylor expansion for numerical approximation We need to evaluate various expressions which depend on the tableau for a particular method. These are known as “elementary weights”. We use the example tree we have already considered to illustrate the construction of the elementary weight Φ(t). l t= Φ(t) = m n j s X o k i bi aij ajl ajmaik aknako i,j,k,l,m,n,o=1 Simplify by summing over l, m, n, o: Φ(t) = s X 2 2 biaij cj aik ck i,j,k=1 Trees and numerical methods for ordinary differential equations – p. 23/41 Now add Φ(t) to the table of functions: t r(t) α(t) β(t) Φ(t) 1 1 1 P bi 2 1 2 P bi ci 3 1 3 P 2 bi ci 3 1 6 P bi aij cj t r(t) 4 4 4 4 1 3 1 1 α(t) β(t) 4 24 12 24 P P P 3 P 2 Φ(t) bi aij cj bi aij ajk ck bi ci bi ci aij cj Trees and numerical methods for ordinary differential equations – p. 24/41 The formal Taylor expansion of the computed solution at x0 + h is y1 = y0 + X β(t)hr(t) t∈T r(t)! Φ(t)F (t)(y0 ) Trees and numerical methods for ordinary differential equations – p. 25/41 The formal Taylor expansion of the computed solution at x0 + h is y1 = y0 + X β(t)hr(t) t∈T r(t)! Φ(t)F (t)(y0 ) Using the known formula for β(t), we can write this as y1 = y0 + X hr(t) t∈T σ(t) Φ(t)F (t)(y0 ) Trees and numerical methods for ordinary differential equations – p. 25/41 Order conditions To match the Taylor series y(x0 + h) = y0 + X t∈T y1 = y0 + hr(t) F (t)(y0 ) σ(t)γ(t) X hr(t) t∈T σ(t) Φ(t)F (t)(y0 ) up to hp terms we need to ensure that 1 Φ(t) = , γ(t) Trees and numerical methods for ordinary differential equations – p. 26/41 Order conditions To match the Taylor series y(x0 + h) = y0 + X t∈T y1 = y0 + hr(t) F (t)(y0 ) σ(t)γ(t) X hr(t) t∈T σ(t) Φ(t)F (t)(y0 ) up to hp terms we need to ensure that for all trees such that 1 Φ(t) = , γ(t) r(t) ≤ p. Trees and numerical methods for ordinary differential equations – p. 26/41 Order conditions To match the Taylor series y(x0 + h) = y0 + X t∈T y1 = y0 + hr(t) F (t)(y0 ) σ(t)γ(t) X hr(t) t∈T σ(t) Φ(t)F (t)(y0 ) up to hp terms we need to ensure that for all trees such that 1 Φ(t) = , γ(t) r(t) ≤ p. These are the “order conditions”. Trees and numerical methods for ordinary differential equations – p. 26/41 Fourth order methods The definitive work on fourth order methods is Kutta’s 1901 paper. Trees and numerical methods for ordinary differential equations – p. 27/41 Fourth order methods The definitive work on fourth order methods is Kutta’s 1901 paper. Kutta found several families of methods; today I will review only methods based on Simpson’s rule: 0 1 2 1 2 1 2 1 2 − a32 1 1 − a42 − a43 1 6 a32 a42 a43 2 3 − b3 b3 1 6 Trees and numerical methods for ordinary differential equations – p. 27/41 Fourth order methods The definitive work on fourth order methods is Kutta’s 1901 paper. Kutta found several families of methods; today I will review only methods based on Simpson’s rule: 0 1 2 1 2 1 2 1 2 − a32 1 1 − a42 − a43 a32 a42 a43 1 2 1 − b b 3 3 6 6 3 Because the underlying quadrature formula has order 4, some order conditions are automatically satisfied: Trees and numerical methods for ordinary differential equations – p. 27/41 It is necessary in fourth order methods with 4 stages that P −1 a4j = b4 (bj (1 − cj ) − i<4 bi aij ) Trees and numerical methods for ordinary differential equations – p. 28/41 It is necessary in fourth order methods with 4 stages that P −1 a4j = b4 (bj (1 − cj ) − i<4 bi aij ) and it also implies that three further trees become automatically satisfied: 0 1 2 1 2 1 2 1 2 − a32 a32 1 6b3 a32 −1 2−3b3 −6b3 a32 3b3 1 2 b3 6 3 − b3 1 6 Trees and numerical methods for ordinary differential equations – p. 28/41 It is necessary in fourth order methods with 4 stages that P −1 a4j = b4 (bj (1 − cj ) − i<4 bi aij ) and it also implies that three further trees become automatically satisfied: 0 1 2 1 2 1 2 1 2 − a32 a32 1 6b3 a32 −1 2−3b3 −6b3 a32 3b3 1 2 b3 6 3 − b3 1 6 Trees and numerical methods for ordinary differential equations – p. 28/41 The remaining order condition is X bi aij cj = which reduces to 1 8 b3 (1 − a32 ) = 1 6 Trees and numerical methods for ordinary differential equations – p. 29/41 The remaining order condition is X bi aij cj = which reduces to 1 8 b3 (1 − a32 ) = 1 6 Substitute a32 = 1 − 1/6b3 and the method becomes 0 1 2 1 2 1 2 − 12 1 − 6b13 1 6b3 − 2 3 − 9b3 3b3 1 2 b3 6 3 − b3 1 6b3 1 6 Trees and numerical methods for ordinary differential equations – p. 29/41 What about the value of b3 ? Trees and numerical methods for ordinary differential equations – p. 30/41 What about the value of b3 ? √ In 1951, S. Gill proposed a new value b3 = 31 + 62 , because this was more efficient in terms of memory than the classical choice proposed by Kutta 50 years earlier. Trees and numerical methods for ordinary differential equations – p. 30/41 What about the value of b3 ? √ In 1951, S. Gill proposed a new value b3 = 31 + 62 , because this was more efficient in terms of memory than the classical choice proposed by Kutta 50 years earlier. But everyone seems to like the classical method of Kutta with b3 = 31 . Trees and numerical methods for ordinary differential equations – p. 30/41 What about the value of b3 ? √ In 1951, S. Gill proposed a new value b3 = 31 + 62 , because this was more efficient in terms of memory than the classical choice proposed by Kutta 50 years earlier. But everyone seems to like the classical method of Kutta with b3 = 31 . It is simple, easy to remember and works well: Trees and numerical methods for ordinary differential equations – p. 30/41 What about the value of b3 ? √ In 1951, S. Gill proposed a new value b3 = 31 + 62 , because this was more efficient in terms of memory than the classical choice proposed by Kutta 50 years earlier. But everyone seems to like the classical method of Kutta with b3 = 31 . It is simple, easy to remember and works well: 0 1 2 1 2 1 2 1 2 0 1 0 0 1 1 6 1 3 1 3 1 6 Trees and numerical methods for ordinary differential equations – p. 30/41 A method of order 4 or 5 When we were counting order conditions, we saw that in the “First approach”, there were 16 conditions for order 5 but in the “Second approach” there were 17 conditions. Trees and numerical methods for ordinary differential equations – p. 31/41 A method of order 4 or 5 When we were counting order conditions, we saw that in the “First approach”, there were 16 conditions for order 5 but in the “Second approach” there were 17 conditions. The reason is quite simple: the two elementary differentials f ′′ (f, f ′ f ′ f) and correspond to identical terms f ′ f ′′ (f, f ′ f) (f fyy + fxy )fy (f fy + fx ) in the “First approach” formulation. Trees and numerical methods for ordinary differential equations – p. 31/41 A method of order 4 or 5 When we were counting order conditions, we saw that in the “First approach”, there were 16 conditions for order 5 but in the “Second approach” there were 17 conditions. The reason is quite simple: the two elementary differentials f ′′ (f, f ′ f ′ f) and correspond to identical terms f ′ f ′′ (f, f ′ f) (f fyy + fxy )fy (f fy + fx ) in the “First approach” formulation. The consequence is a confusion of two order conditions P P 1 1 bi ci aij ajk ck + bi aij cj ajk ck = 30 + 40 Trees and numerical methods for ordinary differential equations – p. 31/41 In a short 1995 paper, I showed how to construct a method which satisfies all the equations for order 5 in the first approach but not for the second approach. I tried this method out for two closely related problems dy y−x = , y(0) = 1 (1) dx y + x d y 1 y−x y(1) 1 , = (2) =p x(1) 0 dt x x2 + y 2 y + x For (1), order 5 was observed numerically but for (2) only order 4 seems to be achieved. Trees and numerical methods for ordinary differential equations – p. 32/41 Algebraic interpretation We will introduce an algebraic system which represents individual Runge-Kutta methods and also compositions of methods. Trees and numerical methods for ordinary differential equations – p. 33/41 Algebraic interpretation We will introduce an algebraic system which represents individual Runge-Kutta methods and also compositions of methods. This centres on the meaning of order for Runge-Kutta methods and leads to a possible generalisation to “effective order”. Trees and numerical methods for ordinary differential equations – p. 33/41 Algebraic interpretation We will introduce an algebraic system which represents individual Runge-Kutta methods and also compositions of methods. This centres on the meaning of order for Runge-Kutta methods and leads to a possible generalisation to “effective order”. Denote by G the group consisting of mappings of (rooted) trees to real numbers where the group operation is defined according to the algebraic theory of Runge-Kutta methods or to the (equivalent) theory of B-series. Trees and numerical methods for ordinary differential equations – p. 33/41 Algebraic interpretation We will introduce an algebraic system which represents individual Runge-Kutta methods and also compositions of methods. This centres on the meaning of order for Runge-Kutta methods and leads to a possible generalisation to “effective order”. Denote by G the group consisting of mappings of (rooted) trees to real numbers where the group operation is defined according to the algebraic theory of Runge-Kutta methods or to the (equivalent) theory of B-series. We will illustrate this operation in a table Trees and numerical methods for ordinary differential equations – p. 33/41 Algebraic interpretation We will introduce an algebraic system which represents individual Runge-Kutta methods and also compositions of methods. This centres on the meaning of order for Runge-Kutta methods and leads to a possible generalisation to “effective order”. Denote by G the group consisting of mappings of (rooted) trees to real numbers where the group operation is defined according to the algebraic theory of Runge-Kutta methods or to the (equivalent) theory of B-series. We will illustrate this operation in a table, where we also introduce the special member E ∈ G. Trees and numerical methods for ordinary differential equations – p. 33/41 i ti 1 2 3 4 5 6 7 8 Trees and numerical methods for ordinary differential equations – p. 34/41 r(ti ) 1 2 3 i ti 1 2 3 3 4 4 5 4 6 4 7 4 8 Trees and numerical methods for ordinary differential equations – p. 34/41 r(ti ) 1 2 3 i ti α(ti ) β(ti ) 1 α1 β1 2 α2 β2 α3 β3 3 3 4 4 5 α4 α5 β4 β5 4 6 α6 β6 4 7 α7 β7 4 8 α8 β8 Trees and numerical methods for ordinary differential equations – p. 34/41 r(ti ) 1 2 3 i ti α(ti ) β(ti ) 1 α1 β1 2 α2 β2 α3 β3 3 (αβ)(ti ) α1 + β1 α2 + α1 β1 + β2 α3 + α12 β1 + 2α1 β2 + β3 3 4 4 5 α4 α5 4 6 α6 4 7 α7 β4 α4 + α2 β1 + α1 β2 + β4 β5 α5 + α13 β1 + 3α12 β2 + 3α1 β3 + β5 2 α + α α β + (α 6 1 2 1 1 + α2 )β2 β6 + α1 (β3 + β4 ) + β6 β7 α7 + α3 β1 + α12 β2 + 2α1 β4 + β7 4 8 α8 β8 α8 + α4 β1 + α2 β2 + α1 β4 + β8 Trees and numerical methods for ordinary differential equations – p. 34/41 r(ti ) 1 2 3 i ti α(ti ) β(ti ) 1 α1 β1 2 α2 β2 α3 β3 3 3 4 4 5 α4 α5 β4 β5 4 6 α6 β6 4 7 α7 β7 4 8 α8 β8 (αβ)(ti ) α1 + β1 α2 + α1 β1 + β2 α3 + α12 β1 + 2α1 β2 + β3 E(ti ) 1 α8 + α4 β1 + α2 β2 + α1 β4 + β8 1 24 1 2 1 3 1 α4 + α2 β1 + α1 β2 + β4 6 α5 + α13 β1 + 3α12 β2 + 3α1 β3 + β5 14 1 α6 + α1 α2 β1 + (α12 + α2 )β2 8 + α1 (β3 + β4 ) + β6 1 α7 + α3 β1 + α12 β2 + 2α1 β4 + β7 12 Trees and numerical methods for ordinary differential equations – p. 34/41 Gp will denote the normal subgroup defined by t 7→ 0 for r(t) ≤ p. Trees and numerical methods for ordinary differential equations – p. 35/41 Gp will denote the normal subgroup defined by t 7→ 0 for r(t) ≤ p. If α ∈ G then this maps canonically to αGp ∈ G/Gp. Trees and numerical methods for ordinary differential equations – p. 35/41 Gp will denote the normal subgroup defined by t 7→ 0 for r(t) ≤ p. If α ∈ G then this maps canonically to αGp ∈ G/Gp. If α is defined from the elementary weights for a Runge-Kutta method then order p can be written as αGp = EGp. Trees and numerical methods for ordinary differential equations – p. 35/41 Gp will denote the normal subgroup defined by t 7→ 0 for r(t) ≤ p. If α ∈ G then this maps canonically to αGp ∈ G/Gp. If α is defined from the elementary weights for a Runge-Kutta method then order p can be written as αGp = EGp. Effective order p is defined by the existence of β such that βαGp = EβGp. Trees and numerical methods for ordinary differential equations – p. 35/41 The computational interpretation of this idea is that we carry out a starting step corresponding to β Trees and numerical methods for ordinary differential equations – p. 36/41 The computational interpretation of this idea is that we carry out a starting step corresponding to β and a finishing step corresponding to β −1 Trees and numerical methods for ordinary differential equations – p. 36/41 The computational interpretation of this idea is that we carry out a starting step corresponding to β and a finishing step corresponding to β −1 , with many steps in between corresponding to α. Trees and numerical methods for ordinary differential equations – p. 36/41 The computational interpretation of this idea is that we carry out a starting step corresponding to β and a finishing step corresponding to β −1 , with many steps in between corresponding to α. This is equivalent to many steps all corresponding to βαβ −1 . Trees and numerical methods for ordinary differential equations – p. 36/41 The computational interpretation of this idea is that we carry out a starting step corresponding to β and a finishing step corresponding to β −1 , with many steps in between corresponding to α. This is equivalent to many steps all corresponding to βαβ −1 . Thus, the benefits of high order can be enjoyed by high effective order. Trees and numerical methods for ordinary differential equations – p. 36/41 We analyse the conditions for effective order 4. Without loss of generality assume β(t1 ) = 0. i (βα)(ti ) (Eβ)(ti ) 1 α1 1 1 2 β2 + α2 2 + β2 1 3 β3 + α3 3 + 2β2 + β3 1 4 β4 + β2 α1 + α4 6 + β2 + β4 1 5 β5 + α5 4 + 3β2 + 3β3 + β5 1 3 6 β6 + β2 α2 + α6 + 8 2 β2 + β3 + β4 + β6 1 7 β7 + β3 α1 + α7 12 + β2 + 2β4 + β7 1 1 + 8 β8 + β4 α1 + β2 α2 + α8 24 2 β2 + β4 + β8 Trees and numerical methods for ordinary differential equations – p. 37/41 Of these 8 conditions, only 5 are conditions on α. Trees and numerical methods for ordinary differential equations – p. 38/41 Of these 8 conditions, only 5 are conditions on α. Once α is known, there remain 3 conditions on β. Trees and numerical methods for ordinary differential equations – p. 38/41 Of these 8 conditions, only 5 are conditions on α. Once α is known, there remain 3 conditions on β. The 5 order conditions, written in terms of the Runge-Kutta tableau, are X bi = 1 X bi ci = 21 X bi aij cj = 61 X 1 bi aij ajk ck = 24 X X bi c2i (1 − ci ) + bi aij cj (2ci − cj ) = 41 Trees and numerical methods for ordinary differential equations – p. 38/41 Appendix M ES S S SM O(hp+1 ) E Trees and numerical methods for ordinary differential equations – p. 39/41 hF A U Y = [n] y [n−1] B V y η A U ηD = B V ξ Eξ E(t) = 1/γ(t) D(τ ) = 1 otherwise D(t) = 0 Trees and numerical methods for ordinary differential equations – p. 40/41 Application to TSRK (n) Yi = ui yn−2 + (1 − ui )yn−1 s s X X (n) (n−1) Bij f (Yj ) )+h +h Aij f (Yj j=1 j=1 yn = θyn−2 + (1 − θ)yn−1 s s X X (n) (n−1) bj f (Yj ) )+h aj f (Yj +h j=1 j=1 Trees and numerical methods for ordinary differential equations – p. 41/41 Application to TSRK (n) Yi = ui yn−2 + (1 − ui )yn−1 s s X X (n) (n−1) Bij f (Yj ) )+h +h Aij f (Yj j=1 j=1 yn = θyn−2 + (1 − θ)yn−1 s s X X (n) (n−1) bj f (Yj ) )+h aj f (Yj +h j=1 j=1 η = uE −1 + (1 − u) + AE −1 ηD + BηD E = θE −1 + (1 − θ) + aT E −1 ηD + bT ηD Trees and numerical methods for ordinary differential equations – p. 41/41 Application to TSRK (n) Yi = ui yn−2 + (1 − ui )yn−1 s s X X (n) (n−1) Bij f (Yj ) )+h +h Aij f (Yj j=1 j=1 yn = θyn−2 + (1 − θ)yn−1 s s X X (n) (n−1) bj f (Yj ) )+h aj f (Yj +h j=1 j=1 η = uE −1 + (1 − u) + AE −1 ηD + BηD E = θE −1 + (1 − θ) + aT E −1 ηD + bT ηD I welcome further discussion about this appendix. Trees and numerical methods for ordinary differential equations – p. 41/41
© Copyright 2026 Paperzz