Numerical methods lecture slides on the Runge-Kutta method for solving 1st order ODEs.
Some parts of this presentation are based on resources at http://nm.MathForCollege.com, primarily http://mathforcollege.com/nm/topics/runge_kutta_2nd_method.html
APM Welcome, APM North West Network Conference, Synergies Across Sectors
MAT210/DiffEq/Runge-Kutta 2nd Order 2013-14
1. St. John's University of Tanzania
MAT210 NUMERICAL ANALYSIS
2013/14 Semester II
DIFFERENTIAL EQUATIONS
Runge-Kutta Method
Kaw, Chapter 8.03-8.04
Some parts of this presentation are based on resources at
http://nm.MathForCollege.com, primarily
http://mathforcollege.com/nm/topics/runge_kutta_2nd_method.html
2. MAT210 2013/14 Sem II 2 of 14
Ordinary Differential Equations
● Topics
●
1st order ODE
– Euler's Method
– Runge-Kutta Methods
● Higher order Initial Value
● Higher order Boundary Value
– Shooting Method
– Finite Differences
3. MAT210 2013/14 Sem II 3 of 14
Taylor Series perspective
yi+1
=yi
+
dy
dx
|xi
h+
1
2
d
2
y
dx2
|xi
h2
+
1
6
d
3
y
dx3
|xi
h3
+O(h4
)
Euler's Method
●
What about the other terms?
● The challenge is finding the 2nd derivative
●
That's where Runge and Kutta were clever
4. MAT210 2013/14 Sem II 4 of 14
The challenge
d2
y
d x2
= f '(x , y) =
∂ f (x , y)
∂x
+
∂ f (x , y)
∂ y
dy
dx
●
What to do about those partial derivates?
●
Brute force approach
– Derive them for each specific problem
– Evaluate the result
●
Runge-Kutta approach – 2nd order
– “Correct” the Euler Method
yi
+ f (x , y)h ⇒ yi
+(a1
f (x , y)+a2
k2)h
5. MAT210 2013/14 Sem II 5 of 14
The 2nd
Order Method
●
Pick one and the other three fall into place
●
At its heart it is a weighted average of f at the
starting point and a predicted f at point
somewhere in the interval
● a1 and a2 are the weights
● k1 and k2 are the two points
6. MAT210 2013/14 Sem II 6 of 14
Heun's Method, a2
=1/2
●
Equal weighting
● Linear prediction at far end
7. MAT210 2013/14 Sem II 7 of 14
Midpoint Method, a2
=1
● Ignore starting point
● Estimate f at the midpoint
8. MAT210 2013/14 Sem II 8 of 14
Ralston's Method, a2
=2/3
● 1/3 to 2/3 weighting
● Estimate f at the 3/4 point
14. MAT210 2013/14 Sem II 14 of 14
Summary
●
Not only is it valuable to compare Euler to
Runge-Kutta, but to a full calculation of f'
●
Note the approximations of f' are of minimal
impact compared to improvement over Euler
●
4th order continues the pattern. (For Reading)