Lecture12 - Initial Value Problem Runge Kutta Methods
Lecture12 - Initial Value Problem Runge Kutta Methods
Statistics
Lecture 12:
Initial Value Problem: Runge-Kutta Methods
Objectives
Introduction
Runge-Kutta Methods
Second-order Runge-Kutta
Heun Method
Midpoint Method
Ralston’s Method
Fourth-order Runge-Kutta
System of ODE
a2 is set to a2=1/2
a1 1 a2 1 / 2
p1 q11 1 / 2a 2
Substituting into equation (i)
1 1
yi 1 yi ( k1 k 2 ) h
Where 2 2
k1 f ( xi , yi )
k 2 f ( xi h, yi k1h)
k1 is the slope at the beginning of the interval and k2 is the
slope at the end of the interval.
a2 is set to a2=1
a1 0
1
p1 q11
2
Substituting into equation (i)
yi 1 yi k 2 h
Where
k1 f ( xi , yi )
1 1
k 2 f ( xi h, yi k1h)
2 2
Dr. M. Hrairi MTH2212 - Computational Methods and Statistics 11
Ralston’s Method
a2 is set to a2=2/3
a1 1 / 3
p1 q11 3 / 4
Use the this slope to compute the slope at the end of the
interval:
y (0.5) 2 3.071785(0.5) 3.723392
.
.
.
dy
n f n ( x, y1 , y2 ,..., yn )
dx
Solution requires that n initial conditions be known at the starting
value x.
dy1 dy1
dx 0.5 y dx 0.5 y f1 ( x, y1 , y 2 )
dy 2 4 0.3 y 0.1 y dy 2 4 0.3 y 0.1 y f ( x, y , y )
dx 2 1
dx 2 1 2 1 2
x y1 y2
0.0 4 6
0.5 3.115234 6.857670
1.0 2.426171 7.632106
1.5 1.889523 8.326886
2.0 1.471577 8.946865
Computational Methods
22.13, 25.4, 25.8, 25.9, 28.33
Statistics
Check with Dr Faiz