If you are searching examples or an application online
on RungeKutta methods you have here at our
RungeKutta Calculator
The RungeKutta methods are a series of numerical methods for solving differential equations and systems of differential equations.
We will see the RungeKutta methods in detail and its main variants in the following sections.
Onestep 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 sizestep, 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 multistep, 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.
RungeKutta methods are a specialization of onestep numerical methods . Essentially, what characterizes RungeKutta 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 RungeKutta 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 (RungeKutta 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 onetme evaluation at each step, so the number of stages is 1.
The middle point rule (RungeKutta 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 stagenumber is 2.
Standar fourthorder Runge kutta (RungeKutta 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: Stagenumber: 4.
Error grahp sizestep h function


Error/sizestep 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 RungeKutta Methods:
A RungeKutta method with sstages 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 RungeKutta 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 RungeKutta 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 3stage method with order 3 and one 4stages 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 RungeKutta, 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 RungeKutta of order 4
A RungeKutta 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 RungeKutta 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 RungeKuttaMethods
In a RungeKutta 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 RungeKutta explicit method with sstages may nor have order higher than s.
It is known that there are not RungeKutta explicit methods with s stages with order s for s greater than or equal to 5
And it is known that there are not RungeKutta explicit methods with sstages and order s for s greater than or equal to 5.
It is also known that there aren't RungeKutta explicit sstage order s1, 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 RungeKutta 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