SlideShare a Scribd company logo
Ch 8.3: The Runge-Kutta Method
Consider the initial value problem y' = f (t, y), y(t0) = y0, with
solution φ(t).
We have seen that the local truncation errors for the Euler,
backward Euler, and improved Euler methods are
proportional to h2
, h2
, and h3
, respectively.
In this section, we examine the Runge-Kutta method, whose
local truncation error is proportional to h5
.
As with the improved Euler approach, this method better
approximates the integral introduced in Ch 8.1, where we had
( )
( )( )
hfyy
ttttftt
tdttfdtt
nnn
nnnnnn
t
t
t
t
n
n
n
n
+=
−+≅
=′
+
++
∫∫
++
1
11 )(,)()(
)(,)(
11
φφφ
φφ
Runge-Kutta Method
The Runge-Kutta formula approximates the integrand
f (tn, φ(tn)) with a weighted average of its values at the two
endpoints and at the midpoint. It is given by
where
Global truncation error is bounded by a constant times h4
for a
finite interval, with local truncation error proportional to h5
.
( )43211 22
6
nnnnnn kkkk
h
yy ++++=+
),(
)2/,2/(
)2/,2/(
),(
34
23
12
1
hkyhtfk
hkyhtfk
hkyhtfk
ytfk
nnnn
nnnn
nnnn
nnn
++=
++=
++=
=
Simpson’s Rule
The Runge-Kutta formula is
where
If f(t, y) depends only on t and not on y, then we have
which is Simpson’s rule for numerical integration.
( ) ( )[ ],)2/(4
6
1 htfhtftf
h
yy nnnnn ++++=−+
( )43211 22
6
nnnnnn kkkk
h
yy ++++=+
),(
)2/,2/(
)2/,2/(
),(
34
23
12
1
hkyhtfk
hkyhtfk
hkyhtfk
ytfk
nnnn
nnnn
nnnn
nnn
++=
++=
++=
=
Programming Outline: Runge-Kutta Method
Step 1. Define f (t,y)
Step 2. Input initial values t0 and y0
Step 3. Input step size h and number of steps n
Step 4. Output t0 and y0
Step 5. For j from 1 to n do
Step 6. k1 = f (t, y)
k2 = f (t + 0.5*h, y + 0.5*h*k1)
k3 = f (t + 0.5*h, y + 0.5*h*k2)
k4 = f (t + h, y + h*k3)
y = y + (h/6)*(k1 + 2*k2 + 2*k3 + k4)
t = t + h
Step 7. Output t and y
Step 8. End
Example 1: Runge-Kutta Method (1 of 2)
Recall our initial value problem
To calculate y1 in the first step of the Runge-Kutta method for
h = 0.2, we start with
Thus
.928.10)532.11,2.00(
,532.1;66.7)69.01,1.00(
,38.1;9.6)5.01,1.00(
,0.1;5)1,0(
04
0303
0202
0101
=++=
==++=
==++=
===
fk
khfk
khfk
khfk
,1)0(,41 =+−=′ yyty
( ) 5016.2928.10)66.7(2)9.6(25
6
2.0
11 =++++=y
Example 1: Numerical Results (2 of 2)
The Runge-Kutta method (h = .05) and the improved Euler
method (h = .025) both require a total of 160 evaluations of f.
However, we see that the Runge-Kutta is far more accurate.
The Runge-Kutta method (h = .2) requires 40 evaluations of f
and the improved Euler method requires 160 evaluations of f,
and yet the accuracy at t = 2 is similar.
1)0(,41 =+−=′ yyty
Improved
Euler
Runge-
Kutta
Runge-
Kutta
Runge-
Kutta
Improved
Euler
Runge -
Kutta
Runge -
Kutta
Runge -
Kutta
t h = 0.025 h = 0.2 h = 0.1 h = 0.05 Exact
Rel Error
h = 0.025
Rel Error
h = 0.2
Rel Error
h = 0.1
Rel Error
h = 0.05
0.00 1.0000 1.0000 1.0000 1.0000 1.0000 0.0000 0.0000 0.0000 0.0000
0.10 1.6079 1.6089 1.6090 1.6090 0.0684 0.0062 0.0000
0.20 2.5021 2.5016 2.5050 2.5053 2.5053 0.1277 0.1477 0.0120 0.0000
0.30 3.8223 3.8294 3.8301 3.8301 0.2037 0.0183 0.0000
0.40 5.7797 5.7776 5.7928 5.7941 5.7942 0.2503 0.2865 0.0242 0.0017
0.50 8.6849 8.7093 8.7118 8.7120 0.3111 0.0310 0.0023
1.00 64.4979 64.4416 64.8581 64.8949 64.8978 0.6162 0.7030 0.0612 0.0045
1.50 474.8340 478.8193 479.2267 479.2592 0.9233 0.0918 0.0068
2.00 3496.6702 3490.5574 3535.8667 3539.8804 3540.2001 1.2296 1.4023 0.1224 0.0090
E x a mple 2
Adaptive Runge-Kutta Methods
The Runge-Kutta method with a fixed step size can suffer
from widely varying local truncation errors.
That is, a step size small enough to achieve satisfactory
accuracy in some parts of the interval of interest may be
smaller than necessary in other parts of the interval.
Adaptive Runge-Kutta methods have been developed,
resulting in a substantial gain in efficiency.
Adaptive Runge-Kutta methods are a very powerful and
efficient means of approximating numerically the solutions of
a large class of initial value problems, and are widely available
in commercial software packages.

More Related Content

What's hot

Ep 5512 lecture-02
Ep 5512 lecture-02Ep 5512 lecture-02
Ep 5512 lecture-02
Kindshih Berihun
 
Gamma beta functions-1
Gamma   beta functions-1Gamma   beta functions-1
Gamma beta functions-1
Selvaraj John
 
Sol75
Sol75Sol75
Calculus of variation problems
Calculus of variation   problemsCalculus of variation   problems
Calculus of variation problems
Solo Hermelin
 
Gamma function
Gamma functionGamma function
Gamma function
Solo Hermelin
 
D021018022
D021018022D021018022
D021018022
researchinventy
 
Ma2002 1.13 rm
Ma2002 1.13 rmMa2002 1.13 rm
Ma2002 1.13 rm
Ramakrishna Paduchuri
 
Stirling theorem
Stirling theoremStirling theorem
Stirling theorem
Arshad Ibrahimi
 
Calculus of variations & solution manual russak
Calculus of variations & solution manual   russakCalculus of variations & solution manual   russak
Calculus of variations & solution manual russak
José Pallo
 
Beta & Gamma Functions
Beta & Gamma FunctionsBeta & Gamma Functions
Beta & Gamma Functions
DrDeepaChauhan
 
Tp problèmes-à-valeurs-initiales
Tp problèmes-à-valeurs-initialesTp problèmes-à-valeurs-initiales
Tp problèmes-à-valeurs-initiales
papillontuba
 
Series solutions at ordinary point and regular singular point
Series solutions at ordinary point and regular singular pointSeries solutions at ordinary point and regular singular point
Series solutions at ordinary point and regular singular point
vaibhav tailor
 
Inner outer and spectral factorizations
Inner outer and spectral factorizationsInner outer and spectral factorizations
Inner outer and spectral factorizations
Solo Hermelin
 
Ma2002 1.20 rm
Ma2002 1.20 rmMa2002 1.20 rm
Ma2002 1.20 rm
Ramakrishna Paduchuri
 
Gamma and betta function harsh shah
Gamma and betta function  harsh shahGamma and betta function  harsh shah
Gamma and betta function harsh shah
C.G.P.I.T
 
Partial Differential Equation - Notes
Partial Differential Equation - NotesPartial Differential Equation - Notes
Partial Differential Equation - Notes
Dr. Nirav Vyas
 
University of manchester mathematical formula tables
University of manchester mathematical formula tablesUniversity of manchester mathematical formula tables
University of manchester mathematical formula tables
Gaurav Vasani
 

What's hot (17)

Ep 5512 lecture-02
Ep 5512 lecture-02Ep 5512 lecture-02
Ep 5512 lecture-02
 
Gamma beta functions-1
Gamma   beta functions-1Gamma   beta functions-1
Gamma beta functions-1
 
Sol75
Sol75Sol75
Sol75
 
Calculus of variation problems
Calculus of variation   problemsCalculus of variation   problems
Calculus of variation problems
 
Gamma function
Gamma functionGamma function
Gamma function
 
D021018022
D021018022D021018022
D021018022
 
Ma2002 1.13 rm
Ma2002 1.13 rmMa2002 1.13 rm
Ma2002 1.13 rm
 
Stirling theorem
Stirling theoremStirling theorem
Stirling theorem
 
Calculus of variations & solution manual russak
Calculus of variations & solution manual   russakCalculus of variations & solution manual   russak
Calculus of variations & solution manual russak
 
Beta & Gamma Functions
Beta & Gamma FunctionsBeta & Gamma Functions
Beta & Gamma Functions
 
Tp problèmes-à-valeurs-initiales
Tp problèmes-à-valeurs-initialesTp problèmes-à-valeurs-initiales
Tp problèmes-à-valeurs-initiales
 
Series solutions at ordinary point and regular singular point
Series solutions at ordinary point and regular singular pointSeries solutions at ordinary point and regular singular point
Series solutions at ordinary point and regular singular point
 
Inner outer and spectral factorizations
Inner outer and spectral factorizationsInner outer and spectral factorizations
Inner outer and spectral factorizations
 
Ma2002 1.20 rm
Ma2002 1.20 rmMa2002 1.20 rm
Ma2002 1.20 rm
 
Gamma and betta function harsh shah
Gamma and betta function  harsh shahGamma and betta function  harsh shah
Gamma and betta function harsh shah
 
Partial Differential Equation - Notes
Partial Differential Equation - NotesPartial Differential Equation - Notes
Partial Differential Equation - Notes
 
University of manchester mathematical formula tables
University of manchester mathematical formula tablesUniversity of manchester mathematical formula tables
University of manchester mathematical formula tables
 

Similar to Ch08 3

Ma2002 1.7 rm
Ma2002 1.7 rmMa2002 1.7 rm
Ma2002 1.7 rm
Ramakrishna Paduchuri
 
Computer Controlled Systems (solutions manual). Astrom. 3rd edition 1997
Computer Controlled Systems (solutions manual). Astrom. 3rd edition 1997Computer Controlled Systems (solutions manual). Astrom. 3rd edition 1997
Computer Controlled Systems (solutions manual). Astrom. 3rd edition 1997
JOAQUIN REA
 
Ma2002 1.16 rm
Ma2002 1.16 rmMa2002 1.16 rm
Ma2002 1.16 rm
Ramakrishna Paduchuri
 
Trapezoidal Method IN Numerical Analysis
Trapezoidal Method IN  Numerical AnalysisTrapezoidal Method IN  Numerical Analysis
Trapezoidal Method IN Numerical Analysis
Mostafijur Rahman
 
Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)
asghar123456
 
Euler Method of solving Initial value problems
Euler Method of solving Initial value problemsEuler Method of solving Initial value problems
Euler Method of solving Initial value problems
ashugizaw1506
 
trapezoidal rule.pptx
trapezoidal rule.pptxtrapezoidal rule.pptx
trapezoidal rule.pptx
SatishKotwal
 
Bayesian Experimental Design for Stochastic Kinetic Models
Bayesian Experimental Design for Stochastic Kinetic ModelsBayesian Experimental Design for Stochastic Kinetic Models
Bayesian Experimental Design for Stochastic Kinetic Models
Colin Gillespie
 
Solutions fox
Solutions   foxSolutions   fox
Solutions fox
Arthur Lott Bezerra
 
MATLAB sessions Laboratory 6MAT 275 Laboratory 6Forced .docx
MATLAB sessions Laboratory 6MAT 275 Laboratory 6Forced .docxMATLAB sessions Laboratory 6MAT 275 Laboratory 6Forced .docx
MATLAB sessions Laboratory 6MAT 275 Laboratory 6Forced .docx
andreecapon
 
Solucionário Introdução à mecânica dos Fluidos - Chapter 01
Solucionário Introdução à mecânica dos Fluidos - Chapter 01Solucionário Introdução à mecânica dos Fluidos - Chapter 01
Solucionário Introdução à mecânica dos Fluidos - Chapter 01
Rodolpho Montavoni
 
Chap8
Chap8Chap8
Chap8
RAVINGM
 
Automatic Control Via Thermostats Of A Hyperbolic Stefan Problem With Memory
Automatic Control Via Thermostats Of A Hyperbolic Stefan Problem With MemoryAutomatic Control Via Thermostats Of A Hyperbolic Stefan Problem With Memory
Automatic Control Via Thermostats Of A Hyperbolic Stefan Problem With Memory
Crystal Sanchez
 
Project Paper
Project PaperProject Paper
Project Paper
Brian Whetter
 
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
Karl Rudeen
 
Ch06 6
Ch06 6Ch06 6
Ch06 6
Rendy Robert
 
Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!
Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!
Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!
Statistics Assignment Help
 
A successful maximum likelihood parameter estimation in skewed distributions ...
A successful maximum likelihood parameter estimation in skewed distributions ...A successful maximum likelihood parameter estimation in skewed distributions ...
A successful maximum likelihood parameter estimation in skewed distributions ...
Hideo Hirose
 
Comparison GUM versus GUM+1
Comparison GUM  versus GUM+1Comparison GUM  versus GUM+1
Comparison GUM versus GUM+1
Maurice Maeck
 
2018 MUMS Fall Course - Mathematical surrogate and reduced-order models - Ral...
2018 MUMS Fall Course - Mathematical surrogate and reduced-order models - Ral...2018 MUMS Fall Course - Mathematical surrogate and reduced-order models - Ral...
2018 MUMS Fall Course - Mathematical surrogate and reduced-order models - Ral...
The Statistical and Applied Mathematical Sciences Institute
 

Similar to Ch08 3 (20)

Ma2002 1.7 rm
Ma2002 1.7 rmMa2002 1.7 rm
Ma2002 1.7 rm
 
Computer Controlled Systems (solutions manual). Astrom. 3rd edition 1997
Computer Controlled Systems (solutions manual). Astrom. 3rd edition 1997Computer Controlled Systems (solutions manual). Astrom. 3rd edition 1997
Computer Controlled Systems (solutions manual). Astrom. 3rd edition 1997
 
Ma2002 1.16 rm
Ma2002 1.16 rmMa2002 1.16 rm
Ma2002 1.16 rm
 
Trapezoidal Method IN Numerical Analysis
Trapezoidal Method IN  Numerical AnalysisTrapezoidal Method IN  Numerical Analysis
Trapezoidal Method IN Numerical Analysis
 
Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)Amth250 octave matlab some solutions (1)
Amth250 octave matlab some solutions (1)
 
Euler Method of solving Initial value problems
Euler Method of solving Initial value problemsEuler Method of solving Initial value problems
Euler Method of solving Initial value problems
 
trapezoidal rule.pptx
trapezoidal rule.pptxtrapezoidal rule.pptx
trapezoidal rule.pptx
 
Bayesian Experimental Design for Stochastic Kinetic Models
Bayesian Experimental Design for Stochastic Kinetic ModelsBayesian Experimental Design for Stochastic Kinetic Models
Bayesian Experimental Design for Stochastic Kinetic Models
 
Solutions fox
Solutions   foxSolutions   fox
Solutions fox
 
MATLAB sessions Laboratory 6MAT 275 Laboratory 6Forced .docx
MATLAB sessions Laboratory 6MAT 275 Laboratory 6Forced .docxMATLAB sessions Laboratory 6MAT 275 Laboratory 6Forced .docx
MATLAB sessions Laboratory 6MAT 275 Laboratory 6Forced .docx
 
Solucionário Introdução à mecânica dos Fluidos - Chapter 01
Solucionário Introdução à mecânica dos Fluidos - Chapter 01Solucionário Introdução à mecânica dos Fluidos - Chapter 01
Solucionário Introdução à mecânica dos Fluidos - Chapter 01
 
Chap8
Chap8Chap8
Chap8
 
Automatic Control Via Thermostats Of A Hyperbolic Stefan Problem With Memory
Automatic Control Via Thermostats Of A Hyperbolic Stefan Problem With MemoryAutomatic Control Via Thermostats Of A Hyperbolic Stefan Problem With Memory
Automatic Control Via Thermostats Of A Hyperbolic Stefan Problem With Memory
 
Project Paper
Project PaperProject Paper
Project Paper
 
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
fb69b412-97cb-4e8d-8a28-574c09557d35-160618025920
 
Ch06 6
Ch06 6Ch06 6
Ch06 6
 
Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!
Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!
Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!
 
A successful maximum likelihood parameter estimation in skewed distributions ...
A successful maximum likelihood parameter estimation in skewed distributions ...A successful maximum likelihood parameter estimation in skewed distributions ...
A successful maximum likelihood parameter estimation in skewed distributions ...
 
Comparison GUM versus GUM+1
Comparison GUM  versus GUM+1Comparison GUM  versus GUM+1
Comparison GUM versus GUM+1
 
2018 MUMS Fall Course - Mathematical surrogate and reduced-order models - Ral...
2018 MUMS Fall Course - Mathematical surrogate and reduced-order models - Ral...2018 MUMS Fall Course - Mathematical surrogate and reduced-order models - Ral...
2018 MUMS Fall Course - Mathematical surrogate and reduced-order models - Ral...
 

More from Rendy Robert

Ch07 9
Ch07 9Ch07 9
Ch07 9
Rendy Robert
 
Ch07 8
Ch07 8Ch07 8
Ch07 8
Rendy Robert
 
Ch07 7
Ch07 7Ch07 7
Ch07 7
Rendy Robert
 
Ch07 6
Ch07 6Ch07 6
Ch07 6
Rendy Robert
 
Ch07 5
Ch07 5Ch07 5
Ch07 5
Rendy Robert
 
Ch07 4
Ch07 4Ch07 4
Ch07 4
Rendy Robert
 
Ch07 3
Ch07 3Ch07 3
Ch07 3
Rendy Robert
 
Ch07 2
Ch07 2Ch07 2
Ch07 2
Rendy Robert
 
Ch07 1
Ch07 1Ch07 1
Ch07 1
Rendy Robert
 
Ch06 5
Ch06 5Ch06 5
Ch06 5
Rendy Robert
 
Ch06 4
Ch06 4Ch06 4
Ch06 4
Rendy Robert
 
Ch06 3
Ch06 3Ch06 3
Ch06 3
Rendy Robert
 
Ch06 2
Ch06 2Ch06 2
Ch06 2
Rendy Robert
 
Ch06 1
Ch06 1Ch06 1
Ch06 1
Rendy Robert
 
Ch05 8
Ch05 8Ch05 8
Ch05 8
Rendy Robert
 
Ch05 7
Ch05 7Ch05 7
Ch05 7
Rendy Robert
 
Ch05 6
Ch05 6Ch05 6
Ch05 6
Rendy Robert
 
Ch05 5
Ch05 5Ch05 5
Ch05 5
Rendy Robert
 
Ch05 4
Ch05 4Ch05 4
Ch05 4
Rendy Robert
 
Ch05 3
Ch05 3Ch05 3
Ch05 3
Rendy Robert
 

More from Rendy Robert (20)

Ch07 9
Ch07 9Ch07 9
Ch07 9
 
Ch07 8
Ch07 8Ch07 8
Ch07 8
 
Ch07 7
Ch07 7Ch07 7
Ch07 7
 
Ch07 6
Ch07 6Ch07 6
Ch07 6
 
Ch07 5
Ch07 5Ch07 5
Ch07 5
 
Ch07 4
Ch07 4Ch07 4
Ch07 4
 
Ch07 3
Ch07 3Ch07 3
Ch07 3
 
Ch07 2
Ch07 2Ch07 2
Ch07 2
 
Ch07 1
Ch07 1Ch07 1
Ch07 1
 
Ch06 5
Ch06 5Ch06 5
Ch06 5
 
Ch06 4
Ch06 4Ch06 4
Ch06 4
 
Ch06 3
Ch06 3Ch06 3
Ch06 3
 
Ch06 2
Ch06 2Ch06 2
Ch06 2
 
Ch06 1
Ch06 1Ch06 1
Ch06 1
 
Ch05 8
Ch05 8Ch05 8
Ch05 8
 
Ch05 7
Ch05 7Ch05 7
Ch05 7
 
Ch05 6
Ch05 6Ch05 6
Ch05 6
 
Ch05 5
Ch05 5Ch05 5
Ch05 5
 
Ch05 4
Ch05 4Ch05 4
Ch05 4
 
Ch05 3
Ch05 3Ch05 3
Ch05 3
 

Ch08 3

  • 1. Ch 8.3: The Runge-Kutta Method Consider the initial value problem y' = f (t, y), y(t0) = y0, with solution φ(t). We have seen that the local truncation errors for the Euler, backward Euler, and improved Euler methods are proportional to h2 , h2 , and h3 , respectively. In this section, we examine the Runge-Kutta method, whose local truncation error is proportional to h5 . As with the improved Euler approach, this method better approximates the integral introduced in Ch 8.1, where we had ( ) ( )( ) hfyy ttttftt tdttfdtt nnn nnnnnn t t t t n n n n += −+≅ =′ + ++ ∫∫ ++ 1 11 )(,)()( )(,)( 11 φφφ φφ
  • 2. Runge-Kutta Method The Runge-Kutta formula approximates the integrand f (tn, φ(tn)) with a weighted average of its values at the two endpoints and at the midpoint. It is given by where Global truncation error is bounded by a constant times h4 for a finite interval, with local truncation error proportional to h5 . ( )43211 22 6 nnnnnn kkkk h yy ++++=+ ),( )2/,2/( )2/,2/( ),( 34 23 12 1 hkyhtfk hkyhtfk hkyhtfk ytfk nnnn nnnn nnnn nnn ++= ++= ++= =
  • 3. Simpson’s Rule The Runge-Kutta formula is where If f(t, y) depends only on t and not on y, then we have which is Simpson’s rule for numerical integration. ( ) ( )[ ],)2/(4 6 1 htfhtftf h yy nnnnn ++++=−+ ( )43211 22 6 nnnnnn kkkk h yy ++++=+ ),( )2/,2/( )2/,2/( ),( 34 23 12 1 hkyhtfk hkyhtfk hkyhtfk ytfk nnnn nnnn nnnn nnn ++= ++= ++= =
  • 4. Programming Outline: Runge-Kutta Method Step 1. Define f (t,y) Step 2. Input initial values t0 and y0 Step 3. Input step size h and number of steps n Step 4. Output t0 and y0 Step 5. For j from 1 to n do Step 6. k1 = f (t, y) k2 = f (t + 0.5*h, y + 0.5*h*k1) k3 = f (t + 0.5*h, y + 0.5*h*k2) k4 = f (t + h, y + h*k3) y = y + (h/6)*(k1 + 2*k2 + 2*k3 + k4) t = t + h Step 7. Output t and y Step 8. End
  • 5. Example 1: Runge-Kutta Method (1 of 2) Recall our initial value problem To calculate y1 in the first step of the Runge-Kutta method for h = 0.2, we start with Thus .928.10)532.11,2.00( ,532.1;66.7)69.01,1.00( ,38.1;9.6)5.01,1.00( ,0.1;5)1,0( 04 0303 0202 0101 =++= ==++= ==++= === fk khfk khfk khfk ,1)0(,41 =+−=′ yyty ( ) 5016.2928.10)66.7(2)9.6(25 6 2.0 11 =++++=y
  • 6. Example 1: Numerical Results (2 of 2) The Runge-Kutta method (h = .05) and the improved Euler method (h = .025) both require a total of 160 evaluations of f. However, we see that the Runge-Kutta is far more accurate. The Runge-Kutta method (h = .2) requires 40 evaluations of f and the improved Euler method requires 160 evaluations of f, and yet the accuracy at t = 2 is similar. 1)0(,41 =+−=′ yyty Improved Euler Runge- Kutta Runge- Kutta Runge- Kutta Improved Euler Runge - Kutta Runge - Kutta Runge - Kutta t h = 0.025 h = 0.2 h = 0.1 h = 0.05 Exact Rel Error h = 0.025 Rel Error h = 0.2 Rel Error h = 0.1 Rel Error h = 0.05 0.00 1.0000 1.0000 1.0000 1.0000 1.0000 0.0000 0.0000 0.0000 0.0000 0.10 1.6079 1.6089 1.6090 1.6090 0.0684 0.0062 0.0000 0.20 2.5021 2.5016 2.5050 2.5053 2.5053 0.1277 0.1477 0.0120 0.0000 0.30 3.8223 3.8294 3.8301 3.8301 0.2037 0.0183 0.0000 0.40 5.7797 5.7776 5.7928 5.7941 5.7942 0.2503 0.2865 0.0242 0.0017 0.50 8.6849 8.7093 8.7118 8.7120 0.3111 0.0310 0.0023 1.00 64.4979 64.4416 64.8581 64.8949 64.8978 0.6162 0.7030 0.0612 0.0045 1.50 474.8340 478.8193 479.2267 479.2592 0.9233 0.0918 0.0068 2.00 3496.6702 3490.5574 3535.8667 3539.8804 3540.2001 1.2296 1.4023 0.1224 0.0090 E x a mple 2
  • 7. Adaptive Runge-Kutta Methods The Runge-Kutta method with a fixed step size can suffer from widely varying local truncation errors. That is, a step size small enough to achieve satisfactory accuracy in some parts of the interval of interest may be smaller than necessary in other parts of the interval. Adaptive Runge-Kutta methods have been developed, resulting in a substantial gain in efficiency. Adaptive Runge-Kutta methods are a very powerful and efficient means of approximating numerically the solutions of a large class of initial value problems, and are widely available in commercial software packages.