Runge–Kutta methods


In numerical analysis, the Runge–Kutta methods are a family of implicit and explicit iterative methods, which include the well-known routine called the Euler Method, used in temporal discretization for the approximate solutions of ordinary differential equations. These methods were developed around 1900 by the German mathematicians Carl Runge and Wilhelm Kutta.

The Runge–Kutta method

The most widely known member of the Runge–Kutta family is generally referred to as "RK4", the "classic Runge–Kutta method" or simply as "the Runge–Kutta method".
Let an initial value problem be specified as follows:
Here is an unknown function of time, which we would like to approximate; we are told that, the rate at which changes, is a function of and of itself. At the initial time the corresponding value is. The function and the initial conditions, are given.
Now pick a step-size h > 0 and define
for n = 0, 1, 2, 3,..., using
Here is the RK4 approximation of, and the next value is determined by the present value plus the weighted average of four increments, where each increment is the product of the size of the interval, h, and an estimated slope specified by function f on the right-hand side of the differential equation.
In averaging the four slopes, greater weight is given to the slopes at the midpoint. If is independent of, so that the differential equation is equivalent to a simple integral, then RK4 is Simpson's rule.
The RK4 method is a fourth-order method, meaning that the local truncation error is on the order of, while the total accumulated error is on the order of.
In many practical applications the function is independent of , and their increments are not computed at all and not passed to function, with only the final formula for used.

Explicit Runge–Kutta methods

The family of explicit Runge–Kutta methods is a generalization of the RK4 method mentioned above. It is given by
where
To specify a particular method, one needs to provide the integer s, and the coefficients aij, bi and ci. The matrix is called the Runge–Kutta matrix, while the bi and ci are known as the weights and the nodes. These data are usually arranged in a mnemonic device, known as a Butcher tableau :
A Taylor series expansion shows that the Runge–Kutta method is consistent if and only if
There are also accompanying requirements if one requires the method to have a certain order p, meaning that the local truncation error is O. These can be derived from the definition of the truncation error itself. For example, a two-stage method has order 2 if b1 + b2 = 1, b2c2 = 1/2, and b2a21 = 1/2. Note that a popular condition for determining coefficients is
This condition alone, however, is neither sufficient, nor necessary for consistency.
In general, if an explicit -stage Runge–Kutta method has order, then it can be proven that the number of stages must satisfy, and if, then.
However, it is not known whether these bounds are sharp in all cases; for example, all known methods of order 8 have at least 11 stages, though it is possible that there are methods with fewer stages. Indeed, it is an open problem
what the precise minimum number of stages is for an explicit Runge–Kutta method to have order in those cases where no methods have yet been discovered that satisfy the bounds above with equality. Some values which are known are:
The provable bounds above then imply that we can not find methods of orders that require fewer stages than the methods we already know for these orders. However, it is conceivable that we might find a method of order that has only 8 stages, whereas the only ones known today have at least 9 stages as shown in the table.

Examples

The RK4 method falls in this framework. Its tableau is
A slight variation of "the" Runge–Kutta method is also due to Kutta in 1901 and is called the 3/8-rule. The primary advantage this method has is that almost all of the error coefficients are smaller than in the popular method, but it requires slightly more FLOPs per time step. Its Butcher tableau is
However, the simplest Runge–Kutta method is the Euler method, given by the formula. This is the only consistent explicit Runge–Kutta method with one stage. The corresponding tableau is

Second-order methods with two stages

An example of a second-order method with two stages is provided by the midpoint method:
The corresponding tableau is
The midpoint method is not the only second-order Runge–Kutta method with two stages; there is a family of such methods, parameterized by α and given by the formula
Its Butcher tableau is
In this family, gives the midpoint method, and is Heun's method.

Use

As an example, consider the two-stage second-order Runge–Kutta method with α = 2/3, also known as Ralston method. It is given by the tableau
with the corresponding equations
This method is used to solve the initial-value problem
with step size h = 0.025, so the method needs to take four steps.
The method proceeds as follows:
The numerical solutions correspond to the underlined values.

Adaptive Runge–Kutta methods

Adaptive methods are designed to produce an estimate of the local truncation error of a single Runge–Kutta step. This is done by having two methods, one with order and one with order. These methods are interwoven, i.e., they have common intermediate steps. Thanks to this, estimating the error has little or negligible computational cost compared to a step with the higher-order method.
During the integration, the step size is adapted such that the estimated error stays below a user-defined threshold: If the error is too high, a step is repeated with a lower step size; if the error is much smaller, the step size is increased to save time. This results in an optimal step size, which saves computation time. Moreover, the user does not have to spend time on finding an appropriate step size.
The lower-order step is given by
where are the same as for the higher-order method. Then the error is
which is.
The Butcher tableau for this kind of method is extended to give the values of :
The Runge–Kutta–Fehlberg method has two methods of orders 5 and 4. Its extended Butcher tableau is:
However, the simplest adaptive Runge–Kutta method involves combining Heun's method, which is order 2, with the Euler method, which is order 1. Its extended Butcher tableau is:
Other adaptive Runge–Kutta methods are the Bogacki–Shampine method, the Cash–Karp method and the Dormand–Prince method.

Nonconfluent Runge–Kutta methods

A Runge–Kutta method is said to be nonconfluent if all the are distinct.

Runge–Kutta-Nyström methods

Runge-Kutta Nyström methods are specialized Runge-Kutta methods that are optimized for second-order differential equations of the form:
On the other hand, a general Runge-Kutta Nyström method is optimized for second-order differential equations of the form:

Implicit Runge–Kutta methods

All Runge–Kutta methods mentioned up to now are explicit methods. Explicit Runge–Kutta methods are generally unsuitable for the solution of stiff equations because their region of absolute stability is small; in particular, it is bounded.
This issue is especially important in the solution of partial differential equations.
The instability of explicit Runge–Kutta methods motivates the development of implicit methods. An implicit Runge–Kutta method has the form
where
The difference with an explicit method is that in an explicit method, the sum over j only goes up to i − 1. This also shows up in the Butcher tableau: the coefficient matrix of an explicit method is lower triangular. In an implicit method, the sum over j goes up to s and the coefficient matrix is not triangular, yielding a Butcher tableau of the form
See Adaptive Runge-Kutta methods above for the explanation of the row.
The consequence of this difference is that at every step, a system of algebraic equations has to be solved. This increases the computational cost considerably. If a method with s stages is used to solve a differential equation with m components, then the system of algebraic equations has ms components. This can be contrasted with implicit linear multistep methods : an implicit s-step linear multistep method needs to solve a system of algebraic equations with only m components, so the size of the system does not increase as the number of steps increases.

Examples

The simplest example of an implicit Runge–Kutta method is the backward Euler method:
The Butcher tableau for this is simply:
This Butcher tableau corresponds to the formulae
which can be re-arranged to get the formula for the backward Euler method listed above.
Another example for an implicit Runge–Kutta method is the trapezoidal rule. Its Butcher tableau is:
The trapezoidal rule is a collocation method. All collocation methods are implicit Runge–Kutta methods, but not all implicit Runge–Kutta methods are collocation methods.
The Gauss–Legendre methods form a family of collocation methods based on Gauss quadrature. A Gauss–Legendre method with s stages has order 2s. The method with two stages has Butcher tableau:

Stability

The advantage of implicit Runge–Kutta methods over explicit ones is their greater stability, especially when applied to stiff equations. Consider the linear test equation y' = λy. A Runge–Kutta method applied to this equation reduces to the iteration, with r given by
where e stands for the vector of ones. The function r is called the stability function. It follows from the formula that r is the quotient of two polynomials of degree s if the method has s stages. Explicit methods have a strictly lower triangular matrix A, which implies that det = 1 and that the stability function is a polynomial.
The numerical solution to the linear test equation decays to zero if | r | < 1 with z = hλ. The set of such z is called the domain of absolute stability. In particular, the method is said to be absolute stable if all z with Re < 0 are in the domain of absolute stability. The stability function of an explicit Runge–Kutta method is a polynomial, so explicit Runge–Kutta methods can never be A-stable.
If the method has order p, then the stability function satisfies as. Thus, it is of interest to study quotients of polynomials of given degrees that approximate the exponential function the best. These are known as Padé approximants. A Padé approximant with numerator of degree m and denominator of degree n is A-stable if and only if mnm + 2.
The Gauss–Legendre method with s stages has order 2s, so its stability function is the Padé approximant with m = n = s. It follows that the method is A-stable. This shows that A-stable Runge–Kutta can have arbitrarily high order. In contrast, the order of A-stable linear multistep methods cannot exceed two.

B-stability

The A-stability concept for the solution of differential equations is related to the linear autonomous equation. Dahlquist proposed the investigation of stability of numerical schemes when applied to nonlinear systems that satisfy a monotonicity condition. The corresponding concepts were defined as G-stability for multistep methods and B-stability for Runge–Kutta methods. A Runge–Kutta method applied to the non-linear system, which verifies, is called B-stable, if this condition implies for two numerical solutions.
Let, and be three matrices defined by
A Runge–Kutta method is said to be algebraically stable if the matrices and are both non-negative definite. A sufficient condition for B-stability is: and are non-negative definite.

Derivation of the Runge–Kutta fourth-order method

In general a Runge–Kutta method of order can be written as:
where:
are increments obtained evaluating the derivatives of at the -th order.
We develop the derivation for the Runge–Kutta fourth-order method using the general formula with evaluated, as explained above, at the starting point, the midpoint and the end point of any interval ; thus, we choose:
and otherwise. We begin by defining the following quantities:
where and.
If we define:
and for the previous relations we can show that the following equalities hold up to :
where:
is the total derivative of with respect to time.
If we now express the general formula using what we just derived we obtain:
and comparing this with the Taylor series of around :
we obtain a system of constraints on the coefficients:
which when solved gives as stated above.