Professional Documents
Culture Documents
Runge-Kutta Method (May 2020) : Santiago Rojas Alfonso COD 69637 Jhon Alejandro Cardona Giraldo COD 70390
Runge-Kutta Method (May 2020) : Santiago Rojas Alfonso COD 69637 Jhon Alejandro Cardona Giraldo COD 70390
(May 2020)
Santiago Rojas Alfonso COD 69637
Jhon Alejandro Cardona Giraldo COD 70390
santiatgo.rojasal@ecci.edi.co
jhona.cardonag@ecci.edu.co
𝑘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
𝑘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
𝑘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 = 𝑡1 + ℎ = 1 + 1 = 2
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