- Runge–Kutta methods
In
numerical analysis , the Runge–Kutta methods (pronounced IPA|/ˌʀuŋgeˈkuta/) are an important family of implicit and explicit iterative methods for the approximation of solutions ofordinary differential equation s. These techniques were developed around 1900 by the German mathematicians C. Runge and M.W. Kutta.See the article on
numerical ordinary differential equations for more background and other methods. See alsoList of Runge-Kutta methods .The classical fourth-order Runge–Kutta method
One member of the family of Runge–Kutta methods is so commonly used that it is often referred to as "RK4" or simply as "the" Runge–Kutta method".
Let an
initial value problem be specified as follows.:
Then, the RK4 method for this problem is given by the following equations:
:
where is the RK4 approximation of , and
:
Thus, the next value ("y""n"+1) is determined by the present value ("y""n") plus the product of the size of the interval ("h") and an estimated
slope . The slope is aweighted average of slopes:*"k"1 is the slope at the beginning of the interval;
*"k"2 is the slope at the midpoint of the interval, using slope "k"1 to determine the value of "y" at the point "t""n" + "h"/2 usingEuler's method ;
*"k"3 is again the slope at the midpoint, but now using the slope "k"2 to determine the "y"-value;
*"k"4 is the slope at the end of the interval, with its "y"-value determined using "k"3.In averaging the four slopes, greater weight is given to the slopes at the midpoint:
:
The RK4 method is a fourth-order method, meaning that the error per step is on the order of "h"5, while the total accumulated error has order "h"4.
Note that the above formulas are valid for both scalar- and vector-valued functions (i.e., "y" can be a vector and an operator). For example one can integrate
Schrödinger's equation using the Hamiltonian operator as function .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::::::::"(Note: the above equations have different but equivalent definitions in different texts)."
To specify a particular method, one needs to provide the integer "s" (the number of stages), and the coefficients "a""ij" (for 1 ≤ "j" < "i" ≤ "s"), "b""i" (for "i" = 1, 2, ..., "s") and "c""i" (for "i" = 2, 3, ..., "s"). These data are usually arranged in a mnemonic device, known as a "Butcher tableau" (after
John C. Butcher ):An example of a second-order method with two stages is provided by the
midpoint method :The corresponding tableau is:The numerical solutions correspond to the underlined values. Note that has been calculated to avoid recalculation in the s.
Adaptive Runge-Kutta methods
The 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 in the tableau, one with order and one with order .
The lower-order step is given by:where the 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 error estimate is used to control the stepsize.
Other adaptive Runge–Kutta methods are the
Bogacki–Shampine method (orders 3 and 2), theCash–Karp method and theDormand–Prince method (both with orders 5 and 4).Implicit Runge-Kutta methods
The implicit methods are more general than the explicit ones. The distinction shows up in the Butcher Tableau: for an implicit method, the coefficient matrix is not necessarily lower triangular:
:
The approximate solution to the initial value problem reflects the greater number of coefficients:
:
:
Due to the fullness of the matrix , the evaluation of each is now considerably involved and dependent on the specific function . Despite the difficulties, implicit methods are of great importance due to their high (possibly unconditional) stability, which is especially important in the solution of partial differential equations. The simplest example of an implicit Runge-Kutta method is the backward Euler method:
:
The Butcher Tableau for this is simply:
:
It can be difficult to make sense of even this simple implicit method, as seen from the expression for :
:
In this case, the awkward expression above can be simplified by noting that
:
so that
:
from which
:
follows. Though simpler then the "raw" representation before manipulation, this is an implicit relation so that the actual solution is problem dependent. Multistep implicit methods have been used with success by some researchers. The combination of stability, higher order accuracy with fewer steps, and stepping that depends only on the previous value makes them attractive; however the complicated problem-specific implementation and the fact that must often be approximated iteratively means that they are not common.
References
*J. C. Butcher, "Numerical methods for ordinary differential equations", ISBN 0471967580
* George E. Forsythe, Michael A. Malcolm, and Cleve B. Moler. "Computer Methods for Mathematical Computations". Englewood Cliffs, NJ: Prentice-Hall, 1977. "(See Chapter 6.)"
* Ernst Hairer, Syvert Paul Nørsett, and Gerhard Wanner. "Solving ordinary differential equations I: Nonstiff problems", second edition. Berlin: Springer Verlag, 1993. ISBN 3-540-56670-8.
* William H. Press, Brian P. Flannery, Saul A. Teukolsky, William T. Vetterling. "Numerical Recipes in C". Cambridge, UK: Cambridge University Press, 1988. "(See Sections 16.1 and 16.2.)"
* [http://numericalmethods.eng.usf.edu/topics/runge_kutta_4th_method.html Runge-Kutta 4th-order method textbook notes, PPT, Matlab Mathematica Maple Mathcad] at [http://numericalmethods.eng.usf.edu Holistic Numerical Methods Institute]
* Kendall E. Atkinson. "An Introduction to Numerical Analysis". John Wiley & Sons - 1989
* F. Cellier, E. Kofman. "Continuous System Simulation". Springer Verlag, 2006. ISBN 0-387-26102-8.External links
* [http://www.krellinst.org/UCES/archive/modules/diffeq/node10.html Runge-Kutta]
* [http://numericalmethods.eng.usf.edu/ebooks/runge4th_08ode_ebook.pdf Runge-Kutta 4th Order Method]
* [http://math.fullerton.edu/mathews/n2003/RungeKuttaMod.html Runge Kutta Method for O.D.E.'s]
Wikimedia Foundation. 2010.