This project work is concerned with the study of Runge-Kutta method of higher order and to apply in solving initial and boundary value problems for ordinary as well as partial differential equations. The derivation of fourth order and sixth order Runge-Kutta method have been done firstly. After that, Fortran 90/95 code has been written for particular problems. Numerical results have been obtained for various problems. The main focus has been given on sixth order Runge-Kutta method. Exact and approximate results have been obtained and shown in tubular and graphical form
2. Study of Runge Kutta method of
higher order and their
Application
Presented By
Fahad Bin Mostafa
Department Of Mathematics
University Of Dhaka, 2014.
3. ABSTRACT
This project work is concerned with the study of Runge-
Kutta method of higher order and to apply in solving
initial and boundary value problems for ordinary as well as
partial differential equations. The derivation of fourth
order and sixth order Runge-Kutta method have been done
firstly. After that, Fortran 90/95 code has been written for
particular problems. Numerical results have been obtained
for various problems. The main focus has been given on
sixth order Runge-Kutta method. Exact and approximate
results have been obtained and shown in tubular and
graphical form.
4. Introduction
The Runge-Kuttta methods are named after two German
mathematicians, Carl Runge (1856-1927) and Wilhelm Kutta
(1867-1944). The methods were devised by Runge in 1894 and later
extended by Kutta in 1901. These techniques were developed around
1900 by the German mathematicians C. Runge and M.W. Kutta. In
numerical analysis, the Runge–Kutta methods are an important
family of implicit and explicit iterative methods for the
approximation of solutions of ordinary differential equations.
The use of Euler’s method to solve the differential equation
numerically is less efficient and is not very useful in practical
problems since it requires a very small step length h for obtaining a
reasonable accuracy. . The Runge-Kutta methods are designed to
give greater accuracy with the advantage of requiring only the
functional values at some selected points on the sub-interval. Our
aim is to show how the sixth order R-K method is giving better
accuracy than the four order R-K method. Then we have shown a
FORTRAN code to test which one is yielding less error
5. OBJECTS OF THE
CONTENTS
Deriving the General form of R-K method
Deriving the forth order R-K method
Deriving the sixth order R-K method
Application to the forth order R-K method
Fortran 90/95 codes for both R-K method with
particular problem.
Showing tubular and graphical representation
and comparisons
6. What is Runge-Kutta method ?
The Runge-Kutta method are designed to give
greater accuracy than Euler Method and they
(Runge-Kutta) possess the advantage of require
only the function values at some selected
points on the subinterval. The Runge-Kutta
method is essentially an attempt to match a
more complex Euler-like formula to a fourth
order Taylor method.
7. Deriving the General Form
Of Runge-Kutta Method :
Applying simpson’s rule to the integral produces the estimates.
k1=f(ti, yi)
k2=f(ti+ h/2, yi+hk1/2)
k3=f(ti+ h/2, yi+hk2/2)
k4=f(ti+ h, yi+hk3)
yi+1= yi+ h(k1+2k2+2k3+k4)/3
8. Runge-Kutta of order Four :
The fourth-order Runge-Kutta method (RK4) simulates the
accuracy of the Taylor series method of order N = 4. The
method is based on computing yk+1 as follows:
yk+1= yk+w1k1+w2k2+w3k3 +w4k4 (2)
Where k1,k2,k3, and k4 have the form
k1= hf(tk,yk) ,
k2= hf(tk+a1h,yk+b1k1),
k3= hf(tk+a2h,yk+b2k1+b3k2),
k4= hf(tk+a3h,y+b4k1+b5k2+b6k3).
By matching coefficients with those of the Taylor series
method of order N = 4 so that the local truncation error is of
order O(h^5),
9. Runge and Kutta were able to obtain the following system of
equations:
b1= a1,
b2+b3= a2,
b4+b5+b6= a3,
w1+w2+w3+w4= 1,
w2a1+w3a2+w4a3 = 1/2 ,
w2+w3+w4 =1/3 , (3)
w2+w2+w4= 1/4,
w3a1b3+w4(a1b5+a2b6) =1/6 ,
w3a1a2b3+w4a3(a1b5+a2b6) =1/8,
w3b3+w(b5+b6) =1/12 ,
w4a1b3b6=1/24 ,
The system involves 11 equations in 13 unknowns. Two
additional conditions must be supplied to solve the system. The
most useful choice is a1 = 1/2 and b2 = 0 (4)
10. Then the solution for the remaining variables is
a2 = 1/2 , a3 = 1, b1 =1/2 , b3 =1/2 , b4 = 0, b5 = 0, b6 = 1,
(5)
w1 =1/6 , w2 = 1/3 , w3 = 1/3, w4 = 1/6.
The values in (4) and (5) are substituted into (2) and (1) to obtain the
formula for the standard Runge-Kutta method of order N = 4, which is
stated as follows. Start with the initial point (t0,y0) and generate the
sequence of approximations using
yk+1= yk + (f1 +2 f2 +2 f3 + f4 )/6, (6)
where
f1= f(tk , yk),
f2= f(t+ , yk + f1),
f3= f(tk + , yk + f1) ,
f4= f(tk+ h, yk+hf3).
11. Example
Compute y(0.1) and y(0.2) using Runge-Kutta method of fourth for the
differential equation y’ = -y with the initial condition y(0) = 1.
Solution: Given = -y; y(0) = 1
= -y, x0 = 0, y0 = 1
Let us take h = 0.1
By 4th order Runge-Kutta method , we have
13. Here, v is a real parameter which is not zero.
14. FORTRAN CODE:
PROGRAM RK4_RK6_method
OPEN(1,'ab.dat') ! Input File
OPEN(2,'bc.dat') ! Output File
READ (1,*)A,B,YO,N
CALL RK64(A,B,YO,N)
END PROGRAM
SUBROUTINE RK64(A,B,YO,N)
REAL H,X,Y,K1,K2,K3,K4,k5,k6,k7,j1,j2,j3,j4,z
H=(B-A)/N ! h is step size
X=A ! Initial approximation
Y=YO ! Initial value of y ( given values)
z=YO
WRITE (2,*)" Results of Runge Kutta method of Order 6"
WRITE(2,*)'__________________________________________'
WRITE(2,*)' '
WRITE (2,30)
30 FORMAT (" ITE",1X," (X)",2X,"By RK-6:(Y)",2X," EXACT(Y)",5X,"ERROR %"," By
RK-4:(Y)",2x,"Error %")
WRITE(2,*)' '
WRITE (2,20)I,X,y,G(X),((ABS(G(X)-z))/z)*100.0,z,((ABS(G(X)-Y))/y)*100.0
FUNCTION G(X)
G=(X+1)**2-0.5*EXP(X)
RETURN
END
17. Graphical Representation of Runge-Kutta Methods
So, we have seen from the graphical representation of R-K method of orders
four and six with their exact solutions.
Hence we come to a conclusion that R-K six Method is better than R-K four Method .
20. Conclusion
1. Accuracy depends on step size.
2. R-K method of sixth order gives better accuracy
than R-K method of forth order.
21. REFERENCES
Books:
Lee W. Johnson & R.Dean Riess (1982). Numerical Analysis (2nd
edition). Addison-Wesley Publishing Company, Inc.
Richard L. Burden & J. Douglas Faires (2005). Numerical Analysis
(6th edition). Thomson Asia Pte Ltd.
Sastry, S.S (2005). Introductory Methods Of Numerical Analysis
(2nd edition). Prentice Hall India Private Limited.
William E. Mayo, Martin Cwiakala. Schaum’s Outline Series.
Programming With FORTRAN 77.Mcgraw-Hill Publishing Comany
Ltd.
Howard Anton. Calculus (6th edition). John Wiley and Sons, Inc.
Article:
H. A. Luther, An Explicit Sixth Order R-K Formula, SIAMS Rev.,
v.7,1965, pp. 551-558.MR 32#3796
Website:
Wikipedia, Wolfram math world.