## `numeric::butcher` -- Butcher parameters of Runge-Kutta schemes

#### Introduction

`numeric::butcher``(method)` returns the Butcher parameters of the Runge-Kutta scheme named `method`.

#### Call(s)

`numeric::butcher(method)`

#### Parameters

`method` | - | name of the Runge-Kutta scheme, one of EULER1, RKF43, RK4, RKF34, RKF54a, RKF54b, DOPRI54, CK54, RKF45a, RKF45b, DOPRI45, CK45, BUTCHER6, RKF87, RKF78.

#### Returns

A list `[s,c,a,b1,b2,order1,order2]` is returned.

#### Related Functions

`numeric::odesolve`

#### Details

- An explicit s-stage Runge-Kutta method for the numerical integration of a dynamical system dy/dt = f(t,y) with stepsize h is a map

      (t,y) -> (t+h,y+h*b[1]*k[1]+ ... +h*b[s]*k[s])

  with ``intermediate stages'' k[1],...,k[s] given by

                k[1] = f(t,y),
                k[2] = f(t+c[2]*h, y + h*a[2,1]*k[1]),
                    ... ,
                k[s] = f(t+c[s]*h, y + h*a[s,1]*k[1] + ... + h*a[s,s-1]*k[s-1]).

  Various numerical schemes arise from different choices of the Butcher parameters: the (s x s)-matrix a[i,j], the weights b=[b[1],..,b[s]] and the abscissae c=[0,c[2],...,c[s]].

  Embedded pairs of Runge-Kutta methods consist of two methods that share the matrix a[i,j] and the abscissae c[i], but use different weights b[i].

- The returned list `[s,c,a,b1,b2,order1,order2]` are the Butcher data of the method: `s` is the number of stages, `c` is the list of abscissae, `a` is the (strictly lower) Butcher matrix, `b1` and `b2` are lists of weights. The integers `order1` and `order2` are the orders of the scheme when using the weights `b1` or `b2`, respectively, in conjunction with the matrix `a` and the abscissae `c`.
- The methods EULER1 (order 1), RK4 (order 4) and BUTCHER6 (order 6) are single methods with `b1=b2` and `order1=order2`. All other methods are embedded pairs of Runge-Kutta-Fehlberg (`RKFxx`), Dormand-Prince (`DOPRIxx`) or Cash-Karp (`CKxx`) type. The names indicate the orders of the subprocesses, e.g., CK45 is the Cash-Karp pair of orders 4 and 5. CK54 is the same pair with reversed ordering of the subprocesses.
- These Butcher data are called by the routines `numeric::odesolve` and `numeric::odesolveGeometric`.

#### Example 1

The Butcher data of the classical 4 stage, 4th order Runge-Kutta scheme are:

    >> numeric::butcher(RK4)

          --                        +-                -+
          |                         |   0,   0,  0, 0  |
          |                         |                  |
          |     +-              -+  |  1/2,  0,  0, 0  |
          |  4, | 0, 1/2, 1/2, 1 |, |                  |,
          |     +-              -+  |   0,  1/2, 0, 0  |
          |                         |                  |
          |                         |   0,   0,  1, 0  |
          --                        +-                -+

                                                                  --
                                                                   |
                                                                   |
             +-                  -+  +-                  -+        |
             | 1/6, 1/3, 1/3, 1/6 |, | 1/6, 1/3, 1/3, 1/6 |, 4, 4  |
             +-                  -+  +-                  -+        |
                                                                   |
                                                                   |
                                                                  --

Note that the weights `b1` and `b2` coincide: this classical method does not provide an embedded pair.

#### Example 2

The Butcher data of the embedded Runge-Kutta-Fehlberg pair RKF34 of orders 3 and 4 are:

    >> [s, c, a, b1, b2, order1, order2] := numeric::butcher(RKF34):

The number of stages `s` of the 4th order subprocess is 5, the abscissae `c` and the matrix `a` are given by:

    >> s, c, a

             +-                   -+
          5, | 0, 1/4, 4/9, 6/7, 1 |,
             +-                   -+

             +-                                      -+
             |    0,       0,        0,       0,   0  |
             |                                        |
             |   1/4,      0,        0,       0,   0  |
             |                                        |
             |   4/81,   32/81,      0,       0,   0  |
             |                                        |
             |  57/98, -432/343, 1053/686,    0,   0  |
             |                                        |
             |   1/6,      0,      27/52,  49/156, 0  |
             +-                                      -+

Using these parameters with the weights

    >> b1, b2

          +-                        -+
          | 1/6, 0, 27/52, 49/156, 0 |,
          +-                        -+

             +-                                  -+
             | 43/288, 0, 243/416, 343/1872, 1/12 |
             +-                                  -+

yields a numerical scheme of order 3 or 4, respectively:

    >> order1, order2

                                       3, 4

    >> delete s, c, a, b1, b2, order1, order2:

#### Background

- References:

  J.C. Butcher: The Numerical Analysis of Ordinary Differential Equations, Wiley, Chichester (1987).

  E. Hairer, S.P. Noersett and G. Wanner: Solving Ordinary Differential Equations I, Springer, Berlin (1993).

#### Changes

- The Cash-Karp pairs CK45 and CK54 were added.

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000