SlideShare a Scribd company logo
1 of 21
Study of Runge Kutta method of
higher order and their
Application
Presented By
Fahad Bin Mostafa
Department Of Mathematics
University Of Dhaka, 2014.
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.
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
 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
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.
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
 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),
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)
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).
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
Explicit R-K method of order Six (N=6)
Here, v is a real parameter which is not zero.
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
DO I=1,N
j1=H*F(X,z)
j2=H*F(X+H/2,z+j1/2)
j3=H*F(X+H/2,z+j2/2)
j4=H*F(X+H,z+j3)
z=z+(j1+2*j2+2*j3+j4)/6.0
K1=H*F(X,Y)
K2=H*F(X+H,Y+K1)
K3=h*f(x+(h/2),y+(3*k1+k2)/8)
K4=h*f(x+(2*h)/3,y+(8*k1+2*k2+8*k3)/27)
k5=h*f(x+((7-21**(1/2))*h)/14,y+(3*(3*21**(1/2)-7)*k1-8*(7-21**(1/2))*k2+48*(7-21**(1/2))*k3-
3*(21-21**(1/2))*k4)/392)
k6=h*f(x+((7+21**(1/2))*h)/14,y+(-5*(123+51*21**(1/2))*k1-40*(7+21**(1/2))*k2-
320*21**(1/2)*k3+3*(21+121*21**(1/2))*k4 &
+392*(6+21**(1/2))*k5)/1960)
k7=h*f(x+h,y+(15*(22+7*21**(1/2))*k1+120*k2+40*(7*21**(1/2)-5)*k3+63*(3*21**(1/2)-2)*k4-
14*(49+9*21**(1/2))*k5 &
+70*(7-21**(1/2))*k6)/180)
Y=y+(9*k1+64*k3+49*k5+49*k6+9*k7)/180
X=A+I*H
WRITE (2,20)I,X,y,G(X),((ABS(G(X)-z))/z)*100.0,z,((ABS(G(X)-Y))/y)*100.0
END DO
20 FORMAT (I2,F 10.3,1X,F10.7,1X,F10.7,1X,F10.7,1x,F10.7,1x,F10.7)
END SUBROUTINE
FUNCTION F(X,Y)
F=Y-X**2+1
RETURN
END
Output of the Program:
ITE (X) By RK-6:(Y) EXACT(Y) ERROR % By RK-4:(Y) Error %
0 0.000 0.5000000 0.5000000 0.0000000 0.5000000 0.0000000
1 0.100 0.6592928 0.6574146 0.8046837 0.6521667 0.2848922
2 0.200 0.8334174 0.8292986 0.7476951 0.8231440 0.4941978
3 0.300 1.0218238 1.0150707 0.7075466 1.0079390 0.6608914
4 0.400 1.2239038 1.2140876 0.6786026 1.2059044 0.8020329
5 0.500 1.4389843 1.4256394 0.6576112 1.4163254 0.9273840
6 0.600 1.6663206 1.6489407 0.6425841 1.6384125 1.0430111
7 0.700 1.9050888 1.8831236 0.6322126 1.8712931 1.1529733
8 0.800 2.1543772 2.1272295 0.6256444 2.1140034 1.2601162
9 0.900 2.4131775 2.3801985 0.6222648 2.3654790 1.3666195
10 1.000 2.6803739 2.6408591 0.6216570 2.6245434 1.4742279
11 1.100 2.9547317 2.9079170 0.6235414 2.8898973 1.5843960
12 1.200 3.2348850 3.1799417 0.6277146 3.1601052 1.6984625
13 1.300 3.5193226 3.4553518 0.6340468 3.4335814 1.8177012
14 1.400 3.8063726 3.7323999 0.6424673 3.7085736 1.9433907
15 1.500 4.0941854 4.0091553 0.6529772 3.9831464 2.0768452
16 1.600 4.3807139 4.2834840 0.6655937 4.2551618 2.2195032
17 1.700 4.6636939 4.5530262 0.6804032 4.5222569 2.3729575
18 1.800 4.9406199 4.8151765 0.6975217 4.7818222 2.5390234
19 1.900 5.2087207 5.0670528 0.7171242 5.0309744 2.7198226
20 2.000 5.4649291 5.3054719 0.7394682 5.2665277 2.9178267
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 .
Application in Partial Differential Equation
Conclusion
1. Accuracy depends on step size.
2. R-K method of sixth order gives better accuracy
than R-K method of forth order.
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.
THANK YOU

More Related Content

What's hot

p_enclosure_presentation_long
p_enclosure_presentation_longp_enclosure_presentation_long
p_enclosure_presentation_long
Tommi Brander
 

What's hot (19)

IRJET- Total Domatic Number of a Jump Graph
IRJET- Total Domatic Number of a Jump GraphIRJET- Total Domatic Number of a Jump Graph
IRJET- Total Domatic Number of a Jump Graph
 
On Steiner Dominating Sets and Steiner Domination Polynomials of Paths
On Steiner Dominating Sets and Steiner Domination Polynomials of PathsOn Steiner Dominating Sets and Steiner Domination Polynomials of Paths
On Steiner Dominating Sets and Steiner Domination Polynomials of Paths
 
Unit 6.2
Unit 6.2Unit 6.2
Unit 6.2
 
3367
33673367
3367
 
p_enclosure_presentation_long
p_enclosure_presentation_longp_enclosure_presentation_long
p_enclosure_presentation_long
 
Direct current machine
Direct current machineDirect current machine
Direct current machine
 
Kumegawa russia
Kumegawa russiaKumegawa russia
Kumegawa russia
 
Estrada Index of stars
Estrada Index of starsEstrada Index of stars
Estrada Index of stars
 
doc
docdoc
doc
 
Business mathematics
Business mathematicsBusiness mathematics
Business mathematics
 
Gyrokinetic plasma theory
Gyrokinetic plasma theoryGyrokinetic plasma theory
Gyrokinetic plasma theory
 
Numerical Evaluation of Complex Integrals of Analytic Functions
Numerical Evaluation of Complex Integrals of Analytic FunctionsNumerical Evaluation of Complex Integrals of Analytic Functions
Numerical Evaluation of Complex Integrals of Analytic Functions
 
Helicopter rotor dynamics
Helicopter rotor dynamicsHelicopter rotor dynamics
Helicopter rotor dynamics
 
Inner product
Inner productInner product
Inner product
 
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
 
Shortest path algorithm
Shortest path algorithmShortest path algorithm
Shortest path algorithm
 
Factorization
FactorizationFactorization
Factorization
 
F04573843
F04573843F04573843
F04573843
 
B.tech ii unit-4 material vector differentiation
B.tech ii unit-4 material vector differentiationB.tech ii unit-4 material vector differentiation
B.tech ii unit-4 material vector differentiation
 

Similar to Runge kurta method of order Four and Six

a first course in fourier analysis-kammler.pdf
a first course in fourier analysis-kammler.pdfa first course in fourier analysis-kammler.pdf
a first course in fourier analysis-kammler.pdf
cibeyo cibeyo
 
Aaa qualitative and dft analysis of endiynes for isha slideshare
Aaa qualitative and  dft analysis of endiynes for isha slideshareAaa qualitative and  dft analysis of endiynes for isha slideshare
Aaa qualitative and dft analysis of endiynes for isha slideshare
Dr Robert Craig PhD
 
R language Project report
R language Project reportR language Project report
R language Project report
Tianyue Wang
 

Similar to Runge kurta method of order Four and Six (20)

Runge Kurta method of order Four and Six
Runge Kurta method of order Four and SixRunge Kurta method of order Four and Six
Runge Kurta method of order Four and Six
 
Part 3 Residuals.pdf
Part 3 Residuals.pdfPart 3 Residuals.pdf
Part 3 Residuals.pdf
 
a first course in fourier analysis-kammler.pdf
a first course in fourier analysis-kammler.pdfa first course in fourier analysis-kammler.pdf
a first course in fourier analysis-kammler.pdf
 
Ch08 3
Ch08 3Ch08 3
Ch08 3
 
Numerical solution of ordinary differential equation
Numerical solution of ordinary differential equationNumerical solution of ordinary differential equation
Numerical solution of ordinary differential equation
 
Project 1
Project 1Project 1
Project 1
 
Aplicaciones de las derivadas
Aplicaciones de las  derivadasAplicaciones de las  derivadas
Aplicaciones de las derivadas
 
Possible existence of_wormholes_in_the_central_regions_of_halos
Possible existence of_wormholes_in_the_central_regions_of_halosPossible existence of_wormholes_in_the_central_regions_of_halos
Possible existence of_wormholes_in_the_central_regions_of_halos
 
Comparison GUM versus GUM+1
Comparison GUM  versus GUM+1Comparison GUM  versus GUM+1
Comparison GUM versus GUM+1
 
ProjectAndersSchreiber
ProjectAndersSchreiberProjectAndersSchreiber
ProjectAndersSchreiber
 
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
quantum chemistry on quantum computer handson by Q# (2019/8/4@MDR Hongo, Tokyo)
 
Aaa qualitative and dft analysis of endiynes for isha slideshare
Aaa qualitative and  dft analysis of endiynes for isha slideshareAaa qualitative and  dft analysis of endiynes for isha slideshare
Aaa qualitative and dft analysis of endiynes for isha slideshare
 
R language Project report
R language Project reportR language Project report
R language Project report
 
An overview of statistics management with excel
An overview of statistics management with excelAn overview of statistics management with excel
An overview of statistics management with excel
 
Conic Section: Circles (Pre-Calculus).pdf
Conic Section: Circles (Pre-Calculus).pdfConic Section: Circles (Pre-Calculus).pdf
Conic Section: Circles (Pre-Calculus).pdf
 
Day 1 polar
Day 1   polarDay 1   polar
Day 1 polar
 
Fractional integration and fractional differentiation of the product of m ser...
Fractional integration and fractional differentiation of the product of m ser...Fractional integration and fractional differentiation of the product of m ser...
Fractional integration and fractional differentiation of the product of m ser...
 
A NEW RANKING ON HEXAGONAL FUZZY NUMBERS
A NEW RANKING ON HEXAGONAL FUZZY NUMBERSA NEW RANKING ON HEXAGONAL FUZZY NUMBERS
A NEW RANKING ON HEXAGONAL FUZZY NUMBERS
 
A NEW RANKING ON HEXAGONAL FUZZY NUMBER
A NEW RANKING ON HEXAGONAL FUZZY NUMBERA NEW RANKING ON HEXAGONAL FUZZY NUMBER
A NEW RANKING ON HEXAGONAL FUZZY NUMBER
 
Shapiro wilk test
Shapiro wilk testShapiro wilk test
Shapiro wilk test
 

Recently uploaded

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 

Recently uploaded (20)

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 

Runge kurta method of order Four and Six

  • 1. Study of Runge Kutta method of higher order and their Application Presented By Fahad Bin Mostafa Department Of Mathematics University Of Dhaka, 2014.
  • 2. 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.
  • 3. 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
  • 4.  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
  • 5. 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.
  • 6. 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
  • 7.  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),
  • 8. 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)
  • 9. 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).
  • 10. 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
  • 11. Explicit R-K method of order Six (N=6)
  • 12. Here, v is a real parameter which is not zero.
  • 13. 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
  • 14. DO I=1,N j1=H*F(X,z) j2=H*F(X+H/2,z+j1/2) j3=H*F(X+H/2,z+j2/2) j4=H*F(X+H,z+j3) z=z+(j1+2*j2+2*j3+j4)/6.0 K1=H*F(X,Y) K2=H*F(X+H,Y+K1) K3=h*f(x+(h/2),y+(3*k1+k2)/8) K4=h*f(x+(2*h)/3,y+(8*k1+2*k2+8*k3)/27) k5=h*f(x+((7-21**(1/2))*h)/14,y+(3*(3*21**(1/2)-7)*k1-8*(7-21**(1/2))*k2+48*(7-21**(1/2))*k3- 3*(21-21**(1/2))*k4)/392) k6=h*f(x+((7+21**(1/2))*h)/14,y+(-5*(123+51*21**(1/2))*k1-40*(7+21**(1/2))*k2- 320*21**(1/2)*k3+3*(21+121*21**(1/2))*k4 & +392*(6+21**(1/2))*k5)/1960) k7=h*f(x+h,y+(15*(22+7*21**(1/2))*k1+120*k2+40*(7*21**(1/2)-5)*k3+63*(3*21**(1/2)-2)*k4- 14*(49+9*21**(1/2))*k5 & +70*(7-21**(1/2))*k6)/180) Y=y+(9*k1+64*k3+49*k5+49*k6+9*k7)/180 X=A+I*H WRITE (2,20)I,X,y,G(X),((ABS(G(X)-z))/z)*100.0,z,((ABS(G(X)-Y))/y)*100.0 END DO 20 FORMAT (I2,F 10.3,1X,F10.7,1X,F10.7,1X,F10.7,1x,F10.7,1x,F10.7) END SUBROUTINE FUNCTION F(X,Y) F=Y-X**2+1 RETURN END
  • 15. Output of the Program: ITE (X) By RK-6:(Y) EXACT(Y) ERROR % By RK-4:(Y) Error % 0 0.000 0.5000000 0.5000000 0.0000000 0.5000000 0.0000000 1 0.100 0.6592928 0.6574146 0.8046837 0.6521667 0.2848922 2 0.200 0.8334174 0.8292986 0.7476951 0.8231440 0.4941978 3 0.300 1.0218238 1.0150707 0.7075466 1.0079390 0.6608914 4 0.400 1.2239038 1.2140876 0.6786026 1.2059044 0.8020329 5 0.500 1.4389843 1.4256394 0.6576112 1.4163254 0.9273840 6 0.600 1.6663206 1.6489407 0.6425841 1.6384125 1.0430111 7 0.700 1.9050888 1.8831236 0.6322126 1.8712931 1.1529733 8 0.800 2.1543772 2.1272295 0.6256444 2.1140034 1.2601162 9 0.900 2.4131775 2.3801985 0.6222648 2.3654790 1.3666195 10 1.000 2.6803739 2.6408591 0.6216570 2.6245434 1.4742279 11 1.100 2.9547317 2.9079170 0.6235414 2.8898973 1.5843960 12 1.200 3.2348850 3.1799417 0.6277146 3.1601052 1.6984625 13 1.300 3.5193226 3.4553518 0.6340468 3.4335814 1.8177012 14 1.400 3.8063726 3.7323999 0.6424673 3.7085736 1.9433907 15 1.500 4.0941854 4.0091553 0.6529772 3.9831464 2.0768452 16 1.600 4.3807139 4.2834840 0.6655937 4.2551618 2.2195032 17 1.700 4.6636939 4.5530262 0.6804032 4.5222569 2.3729575 18 1.800 4.9406199 4.8151765 0.6975217 4.7818222 2.5390234 19 1.900 5.2087207 5.0670528 0.7171242 5.0309744 2.7198226 20 2.000 5.4649291 5.3054719 0.7394682 5.2665277 2.9178267
  • 16. 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 .
  • 17. Application in Partial Differential Equation
  • 18.
  • 19. Conclusion 1. Accuracy depends on step size. 2. R-K method of sixth order gives better accuracy than R-K method of forth order.
  • 20. 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.