Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

RUNGE-KUTTA METHOD

(May 2020)
Santiago Rojas Alfonso COD 69637
Jhon Alejandro Cardona Giraldo COD 70390
santiatgo.rojasal@ecci.edi.co

jhona.cardonag@ecci.edu.co

Method. k3 is again the slope at the midpoint, but now using k2 to


determine the y-value; k4 is the slope at the end of the interval, with
SUMMARY the y-value determined by k3. By averaging the four slopes, the slopes
at the midpoint are assigned greater weight: 𝑃𝑒𝑛𝑑𝑖𝑛𝑔 = 𝑘1 + 2𝑘2 +
In numerical analysis, Runge-Kutta's methods are a set of generic 2𝑘3 + 𝑘46
iterative explicit and implicit methods of numerical differential
equation solving. This form of the Runge-Kutta method is a fourth order method, which
means that the step error is of the order of O(h5), while the total
The Runge-Kutta method of order 4 is the form of the most accumulated error is of the order of O(h4). Therefore, the convergence
commonly used Runge-Kutta methods and also the most accurate of the method is of the order of O(h4) which is why it is used in the
for obtaining approximate solutions of differential equations. The computational methods. [1]
solution offered by this method is a table of the solution function,
with values of "y" corresponding to specific values of "x". [3] II. FOURTH ORDER METHOD
KEY WORDS: Runge-Kutta, Method, Applications, Numerical The fourth-order Runge-Kutta Methods are deduced in a similar way
analysis to that discussed in the previous section for the third-order case. A new
intermediate step is now introduced in the evaluation of the derivative.
I. INTRODUCTION Again, several options are presented in the evaluation and it is possible
to adjust in such a way that the local error is guaranteed to be

T he general idea of the Runge-Kutta methods is to replace the


proportional to ℎ5 (i.e. guaranteeing accuracy in the fourth order in the
Taylor polynomial), which leads to an overall error proportional to ℎ4 .
The most common Fourth Order Method is determined by the
problem of the initial value 𝑦 ′ = 𝑓(𝑥. 𝑦) 𝑦(𝑦0 ) = 𝑦0 by the equivalent
equation: following formulas:

𝑘1 = ℎ𝑓(𝑥𝑛 , 𝑦𝑛
𝑦0 𝑦𝑑𝑦 = 𝑥0 𝑥𝑓(𝑥𝑦𝑥(𝑥))𝑑𝑥 → 𝑦 = 𝑦0 + 𝑥0 𝑥𝑓(𝑥, 𝑦(𝑥))𝑑𝑥
ℎ 𝑘1
to proceed to approximate this last integral by an appropriate numerical 𝑘2 = ℎ𝑓 (𝑥𝑛 + , 𝑦𝑛 )
method (remember that y(x) is unknown). If we pose again the problem 2 2
"step by step" we will have: ℎ 𝑘2
𝑦𝑚 + 1 = 𝑦𝑛 + 𝑥𝑛 𝑥𝑛 + 1𝑓(𝑥, 𝑦(𝑥))𝑑𝑥 𝑘3 = ℎ𝑓 (𝑥𝑛 + , 𝑦𝑛 )
2 2
A member of the widely used Runge-Kutta family of methods is the 𝑘4 = ℎ𝑓(𝑥𝑛 + ℎ, 𝑦𝑛 + 𝑘3 )
fourth order, often referred to as "RK4". Given the above definition,
the RK4 method for this problem is given by the following equation. 1
𝑦𝑛 + 1 = 𝑦𝑛 + (𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4
6
𝑦𝑛 + 1 = 𝑦𝑛 + 16(𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 )
which, like the third-order method, is based on the Simpson interaction
Where: 𝑘1 = 𝑓(𝑥𝑛 , 𝑦𝑛 ) method. The local and global errors are in this case proportional to
ℎ5 and ℎ4 respectively. [2]
𝑘2 = 𝑓(𝑥𝑛 + 12ℎ, 𝑦𝑛 + 12𝑘1ℎ
Runge-Kutta methods are a particular case (or specialization) of the
𝑘3 = 𝑓(𝑥𝑛 + 12ℎ, 𝑦𝑛 + 12𝑘2ℎ one-step numerical methods. What characterizes a Runge-Kutta
method is that the error has the form 𝐸𝑖 = 𝐶ℎ𝑘 , Where C is a real
𝑘4 = 𝑓(𝑥𝑛 + ℎ, 𝑦𝑛 + 𝑘3ℎ
positive constant, the number k is called the order of the
Thus, the following value yn+1 is determined by the present value yn
plus the product of the size of the interval h by an estimated slope. The The number of stages of the Runge-Kutta method is the number of
slope is a weighted average of slopes, where k1 is the slope at the times the function is evaluated in each step i, this concept is important
beginning of the interval, k2 is the slope at the midpoint of the interval, because the evaluation of the function requires a computational cost
using k1 to determine the y-value at the xn+ point h2 using Euler's
(sometimes more) so, methods with as few stages as possible are [3] G, Maria del Carmen. Runge-Kutta orden 4.
preferred. [Online]. Available at:
http://test.cua.uam.mx/MN/Methods/EcDiferencia
III. EXAMPLE les/Runge-Kutta/RungeKutta.php

Using the classical RK4 method, with h=1, estimate y(2) in the P.V.I: [4] Metodos de Runge Kutta. [Online]. Available
y’ = 2 t y + t, con y(0) = 0.5, en el intervalo [0,2] at:
https://tarwi.lamolina.edu.pe/~duenas/rk4_2009
SOLUTION: Identifying: II_pp2.pdf
𝑓(𝑡, 𝑦) = 2𝑡𝑦 + 𝑡; 𝑡0 = 0; 𝑦0 = 0.5; ℎ = 1
ℎ(𝑘1 +2𝑘2 +2𝑘3 +𝑘4 )
Iteration 1: 𝑦1 = 𝑦0 +
6

𝑘1 = 𝑓(𝑡0 ; 𝑦0 ) = 𝑓(0; 0.5) = 2 ∗ 0 ∗ 0.5 + 0 = 0 + 1 − 1 = 0

ℎ ℎ𝑘1
𝑘2 = 𝑓(𝑡0 + ; 𝑦0 + = 𝑓(0.5; 0.5) = 2 ∗ 0.5 ∗ 0.5 + 0.5 = 1
2 2
ℎ ℎ𝑘1
𝑘3 = 𝑓(𝑡0 + ; 𝑦0 + = 𝑓(0.5; 1) = 2 ∗ 0.5 ∗ 01 + 0.5 = 1.5
2 2
𝑘4 = 𝑓(𝑡0 + ℎ; 𝑦0 + ℎ𝑘3 ) = 𝑓(1; 2) = 2 ∗ 1 ∗ 2 + 1 = 5

ℎ(𝑘1 + 𝑘2 + 𝑘3 + 𝑘4 )
𝑦1 = 𝑦0 +
6
1(0 + 2 ∗ 1 + 2 ∗ 1.5 + 5)
= 0.5 + = 2.16667
6

𝑡1 = 𝑡0 + ℎ = 0 + 1 = 1

Iteration 2: 𝑦2 = 𝑦1 + (𝑘1 + 2𝑘2 + 2𝑘3 + 𝑘4 )
6

𝑘1 = 𝑓(𝑡1 , 𝑦1 ) = 𝑓(1; 2.16667) = 5.33333

ℎ ℎ𝑘1
𝑘2 = 𝑓 (𝑡 + , 𝑦1 + ) = 𝑓(1.5; 4.8333) = 16
2 2
ℎ ℎ𝑘2
𝑘3 = 𝑓 (𝑡 + , 𝑦1 + ) = 𝑓(1.5; 10.1667) = 32
2 2
𝑘4 = 𝑓(𝑡1 + ℎ, +ℎ𝑘3 ) = 𝑓(2; 34.1667) = 138.667

𝑦2 = 2.16667 + (5.33333 + 2 ∗ 16 + 2 ∗ 32 + 138.667)


= 42.1667

𝑡2 = 𝑡1 + ℎ = 1 + 1 = 2

Henceforth, 𝑦2 ≈ 𝑦(𝑡2 ) = 42.1667 [4]

REFERENCES:
[1] Método de Runge-Kutta de orden 4. [Online].
Available at:
https://sites.google.com/site/analisisnumerico
eafit2017/metodos-investigacin/mtodo-de-runge-
kutta-de-orden-4

[2] Tema 4: Métodos numéricos en Ecuaciones


diferenciales ordinarias. [Online]. Available
at:
http://campus.usal.es/~mpg/Personales/Personal
MAGL/Docencia/MetNumTema4Teo(09-10).pdf

You might also like