If you are searching examples or an application online
on Runge-Kutta methods you have here at our
RungeKutta Calculator
The Runge-Kutta methods are a series of numerical methods for solving differential equations and systems of differential equations.
We will see the Runge-Kutta methods in detail and its main variants in the following sections.
One-step Linear methods
Are numerical methods whose to forward a step, only the previous step information is needed, ie step n+1 only depends on the step n.
Or with more precision, are methods of the form
x
n+1 = x
n + F(x
n, t
n, h)
x
0 = x(0)
where x
n is a R
n vector, t
n is the independent Real variable, h the size-step, and F is a vectorial function of var x
n, t
n, h, ie
F : R
n+2 → R
n
Note that this problem, is really an equations system.
There are other methods called multi-step, which for to forward a step is required two or more previous steps and there are not linear methods, we will not discuss them here.
Runge-Kutta methods are a specialization of one-step numerical methods . Essentially, what characterizes Runge-Kutta methods is that the error is of the form
E
i = Ch
k
Where C is a positive real constant, the number k is called the
order of the method
The Runge-Kutta method number of stages of is the number of times the function
is evaluated at each one step i, this concept is important because evaluating the
function requires a computational cost (sometimes higher) and so are preferred
methods with ao minimum number of stages as possible.
Runge Kutta Methods examples
The Euler Method (Runge-Kutta method with order 1)
xn+1 = xn + h f(xn, tn)
The error is in the form e ≤ Ch and so this method has order 1
Note: The function is one-tme evaluation at each step, so the number of stages is 1.
The middle point rule (Runge-Kutta method with order two)
xn+1 = xn + h f ( xn + h/2 f (xn, tn), tn + h/2)
The error is in the form e ≤ Ch2 and so this method has order 2
Note: function are evaluated two times at each step, so stage-number is 2.
Standar fourth-order Runge kutta (Runge-Kutta method with order four)
xn+1 = xn + h/6 (k1 +2 k2 +2 k3 + k4)
where
k1 = f(xn, tn)
k2 = f(xn + hk1/2, tn + h/2)
k3 = f(xn + hk2/2, tn + h/2)
k4 = f(xn + hk3, tn + h)
Now the error is in the form e ≤ Ch4so the method has order 4
Observation: Stage-number: 4.
Error grahp size-step h function
|
|
Error/size-step Graph in logarithmic scale of the tree methods seen here:
- In red, the Euler Method
- In green color the middle point with order 2
- In black, the Runge fourth order Kutta classic
Note the difference in slope, which increases with the order of the method.
|
We adopt the following definition as Runge-Kutta Methods:
A Runge-Kutta method with s-stages and order p is a method in the form
xn+1 = xn + h(∑si=1 biki)
with
ki = f( xn + ∑sj=1aijkk, tn + hci)
and the error holds the condition
Max | X( tt) - xi| ≤ Ch tp
So, to give a Runge-Kutta Method is necessarily give the s
2 + 2s numbers
b
i, c
i,a
ij,
An interesting feature of the R/K -methods is not needed calculating derivatives of f to forward. The price to pay for it is to evaluate more times the function f with the consequent
operational cost.
Convergence Theorem for Runge-Kutta methods
Lets F
Lipschitz at x
Then
Max | x(t
i) - x
i | ≤ K (e
Lb - 1) / L
where L is the
Lipschitz constant of F and k is the truncation local method error.
One method is more efficient if has a reduced number of stages, maintaining order, for example between a 3-stage method with order 3 and one 4-stages of order 3, is much more interesting first one because if we take a step h, the number of calculations to be done will be lower for it.
Butcher Boards
Given a Runge-Kutta, we construct a board as
Also it is possible to write as board Butcher
Where A ∈ M
sxs, b ∈ R
s, C ∈ R
s
For example, the board Butcher for the Euler method is
For the midpoint rule of order 2
And for the standard Runge-Kutta of order 4
A Runge-Kutta method is said to be consistent if the truncation error tends to zero when Gloval the step size tends to zero.
It can be shown that a necessary and sufficient condition for the consistency of a Runge-Kutta is the sum of bi's equal to 1, ie if it satisfies
1 = ∑
si=1 b
i
In addition, the method is of order 2 if it satisfies that
1 = 2 ∑
sj=1∑
si=1 a
i b
j
Similar conditions can be given for methods with orderers 3, 4, ...
Explicit Runge-KuttaMethods
In a Runge-Kutta explicit, given in the ki
the definition does not appear as a function of them
themselves are clear The matrix a in the Butcher board is "almost inferior triangular" because it is inferior triangular and the diagonal elements are zero too.
Theorem
A Runge-Kutta explicit method with s-stages may nor have order higher than s.
It is known that there are not Runge-Kutta explicit methods with s stages with order s for s greater than or equal to 5
And it is known that there are not Runge-Kutta explicit methods with s-stages and order s for s greater than or equal to 5.
It is also known that there aren't Runge-Kutta explicit s-stage order s-1, for s greater than or equal that 7.
More generally we have the following table
That step size is necessary? The answer to this question is that
depends on the specific problem and the desired degree of accuracy.
One thing to consider is that Runge-Kutta methods lose some precision when the derivative of the function analysis is very large or frequently changing sign, such cases requires a very small step size to obtain an acceptable degree of accuracy
At next section we will see the
Fehlberg Pairs embebbed , are methods in which the step size
will vary automatically depending on (among other things) of changes in the derivative of the function
If you want to see now an example of how these methods works, access to
RungeKutta Calculator
where you will see the default problem
y' = f(x, y)
y(x
0)=y
0
Whose exact solution is obviously y(x)=e
x