Professional Documents
Culture Documents
Lecture 4
Even if the expressions for derivatives are obtained, lot of computational effort may
still be required in their numerical evaluation
It is possible to develop one step algorithms which require evaluation of first derivative
as in Euler method but yields accuracy of higher order as in Taylor series. These
methods require functional evaluations of f(t,y(t)) at more than one point.on the interval
[tk,tk+1]. The Category of methods are known as Runge-Kutta methods of order 2, 3 and
more depending upon the order of accuracy. .A general Runge Kutta algorithm is given
as
y k 1 y k h ( t k , y k , h) (1.7)
The function phi is termed as increment function. The mth order Runge-Kutta method
gives accuracy of order hm. The function is chosen in such a way so that when
expanded the right hand side of (1.7) matches with the Taylor series upto desired order.
This means that for a second order Runge-Kutta mehod the right side of (1.7 ) matches
up to second order terms of Taylor series.
The Second order Runge Kutta methods are known as RK2 methods. For the derivation
of second order Runge Kutta methods, it is assumed that phi is the weighted average of
two functional evaluations at suitable points in the interval [tk,tk+1]:
(tk , yk , h) w1K1 w 2K 2
K1 f ( t k , yk ) (1.8)
K 2 f (t k ph, yk qhK1 ); 0 p, q 1
Here, four constants w1, w2, p and q are introduced. These are to be chosen in such a
way that the expansion matches with the Taylor series up to second order terms.
For this
K 2 f (t k ph, y k qhK1 )
f (t k , y k ) phft (t k , y k ) qhK1fy (t k , yk ) O(h2 ) (1.9)
f (t k , y k ) phft (t k , y k ) qhf (t k , yk )(fy (t k , yk ) O(h2 )
yk 1 yk h[w1f (tk , yk ) w 2{f (tk , yk ) phft (tk , yk ) qhf (tk , yk )(fy (tk , yk ) O(h2 )}]
Or
yk 1 yk h[ w1f (tk , yk ) w 2 f (tk , yk )] h2 [pft (tk , yk ) qf (tk , yk )(fy (tk , yk )] O(h3 ) (1.10)
h2 h3
y (t k h) y (t k ) hf (t k y (t k )) f (t k , y (t k )) f ( , y ( )); t k t k 1
2 6
f ( t k , y ( t k )) ft ( t k , y ( t k )) f ( t k , y ( t k ))( fy ( t k , y ( t k ))
h2
y (t k h) y (t k ) hf (t k y ( t k )) [ ft ( t k , y ( tk )) f ( tk , y ( t k ))( fy ( tk , y ( t k ))] O(h3 ) (1.11)
2
w 1 w 2 1 , w 1p 1/ 2 and w 2 q 1/ 2 (1.12)
Observe that four unknowns are to be evaluated from three equations. Accordingly
many solutions are possible for (1.12). Let us chose arbitrary value to constant q as
q=1, then
w 1 w 2 1/ 2, p 1 and q 1
Accordingly, the second order Runge-Kutta can be written as
y kp y k hf ( t k , y k )
h (1.13)
y k 1 y k [ f ( t k , y k ) f ( t k h, y kp )]
2
This is the same as modified Euler method. It may be noted that the method reduces to
a quadrature formula [Trapezoidal rule] when f(t, y) is independent of y:
h
y k 1 y k [f (t k ) f (t k h)]
2
For convenience q is chosen between 0 and 1such that one of the weights w in the
method is zero. For example choose q=1/2 makes w1=0 and (1.12) yields:
w 1 0, w 2 1, p q 1/ 2
h
yk yk f (t k , yk )
2
h (1.14)
y k 1 yk hf (t k , yk )
2
w 1 1/ 4, w 2 3 / 4, p q 2 / 3
This gives another second order Runge-Kutta method known as optimal RK2 method:
2h
y k y k f (tk , yk )
3
h 3h 2h (1.15)
y k 1 y k f (t k , y k ) f (t k , y k )
4 4 3
Example 1.5: Solve IVP in 1<t<2 with h=0.1using Optimal Runge Kutta Method (1.15)
y y / t ( y / t ) 2 ; y (1) 1
[Ref modified-euler.xlsx/sheet3]