Upload
others
View
9
Download
0
Embed Size (px)
Citation preview
Numerical Methods for Solving Systems of Ordinary
Differential Equations
Simruy Hürol
Submitted to the
Institute of Graduate Studies and Research
in partial fulfillment of the requirements for the Degree of
Master of Science
in
Applied Mathematics and Computer Science
Eastern Mediterranean University
January 2013
Gazimağusa, North Cyprus
Approval of the Institute of Graduate Studies and Research
Prof. Dr. Elvan Yılmaz
Director
I certify that this thesis satisfies the requirements as a thesis for the degree of Master of
Science in Applied Mathematics and Computer Science.
Prof. Dr. Nazım Mahmudov
Chair, Department of Mathematics
We certify that we have read this thesis and that in our opinion it is fully adequate in
scope and quality as a thesis for the degree of Master of Science in Applied
Mathematics and Computer Science.
Asst. Prof. Dr. Mehmet Bozer
Supervisor
Examining Committee
1. Assoc. Prof. Dr. Derviş Subaşı
2. Asst. Prof. Dr. Mehmet Bozer
3. Asst. Prof. Dr. Mustafa Rıza
ABSTRACT
This thesis concantrates on numerical methods for solving ordinary differential equa-
tions. Firstly, we discuss the concept of convergence, local-truncation error, global-
truncation error, consistency, types of stability, zero-stability, and weak-stability. Af-
terwards, we inform some materials for Euler and Runge-Kutta method. The given
ordinary differential equation is analyzed on Euler and Runge-Kutta method to find
the approximated solution with the given initial conditions. Then, the stability of
each method is examined briefly. We also focus on numerical methods for systems.
Then, the reason of the stiff system is discussed. After investigating the numerical
methods, we gave advantages and disadvantages of Euler method and Fourth Order
Runge-Kutta method. Finally, numerical experiments is applied on Explicit Euler
method and Explicit Fourth Order Runge-Kutta method. The approximated solutions
with different step-size and analytical solutions of methods are computed in Matlab
software. The computation of approximated solutions of methods are compared with
analytical solutions. Then we discussed the accuracy of these methods when they
are applied to the specified system in Chapter 7. Finally, we conclude that Explicit
Fourth Order Runge-Kutta method is more accurate than the Explicit Euler method.
Keywords: Ordinary Differential Equations, Numerical solutions, Euler’s method,
Runge-Kutta method, Stiff System
iii
ÖZ
Bu çalısmada adi diferansiyel denklemlerin çözümü için sayısal yöntemler irdelen-
mistir. Ilk olarak, yakınsama kavramı, yerel kesme hatası, küresel kesme hatası,
tutarlılık, kararlılık türleri, sıfır kararlılık ve zayıf kararlılık kavramları incelenmistir.
Ayrıca, Euler ve Runge-Kutta metodları verilmistir. Verilen bir diferansiyel den-
klemin, yaklasık çözümünü bulmak için Euler ve Runge-Kutta yöntemi verilen bas-
langıç kosulları ile analiz edilmis ve her bir yöntem için kararlılık kısaca ele alın-
mıstır. Daha sonra, verilen sistemler için sayısal yöntemlere odaklanılmıs ve sert
sistemin çıkıs sebebi incelenmistir. Euler yöntemin ve dördüncü dereceden Runge-
Kutta yöntemin avantajları ve dezavantajları verilmistir. Son olarak, sayısal deneyler
üzerinde Açık Euler ve Açık dördüncü dereceden Runge-Kutta yöntemleri uygu-
lanmıstır. Farklı adım büyüklügü ele alınarak yaklasılan çözümler ve yöntemlerin
analitik çözümleri Matlab yazılımıkullanılarak hesaplanmıstır. Elde edilen yaklasılır
çözümler ile analitik çözümler karsılastırılmıstır. Daha sonra yöntemler Bölüm 7’de
belirtilen sistem üzerine uygulanıp yöntemlerin dogrulugu tartısılmıstır. Son olarak,
Açık Runge-Kutta yöntemin yaklastırılmıs çözümünün Açık Euler methoduna göre
daha az hatalı oldugu sonucuna varılmıstır.
Anahtar Kelimeler: Adi Diferensiyel Denklemler, Sayısal Çözümler, Euler Yön-
temi, Runge-Kutta Yöntemi, Sert Sistemi
iv
ACKNOWLEDGMENTS
First of all, I would like to express my gratidute to my supervisor, Dr. Mehmet
Bozer for his recommendation, patient, and encouragement during this thesis. Spe-
cial thanks are extended to Dr. Arif Akkeles and Dr. Mustafa Rıza for assist on
editing my dissertation. I would like to express my sincere thanks to my cousin Dr.
Neyre Tekbıyık Ersoy for her guidance and persistent help on my dissertation. I am
also thankful to my office mates for their help and moral support. Furthermore, I
wish to thank my closest friend for unending spiritual support throught all the hard
times. Last, my thanks to my family for their support during this studies.
v
TABLE OF CONTENTS
ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
ÖZ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv
ACKNOWLEDGMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
LIST OF TABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 CONCEPT OF CONVERGENCE, LOCAL-GLOBAL TRUNCATION ER-
ROR, CONSISTENCY, STABILITY, WEAK STABILITY AND ZERO STA-
BILITY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 STIFF SYSTEMS AND PROBLEMS OF STABILITY FOR STIFF SYS-
TEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2 Definition of Stiffness . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.3 The Problem of Stability for Stiff System . . . . . . . . . . . . . . . 22
4 EULER METHOD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.2 Definition of Euler’s Method . . . . . . . . . . . . . . . . . . . . . 26
4.3 Error Analysis of Euler’s Method . . . . . . . . . . . . . . . . . . . 31
4.4 Numerical Stability of Euler’s Method . . . . . . . . . . . . . . . . 38
vi
4.5 Rounding Error Accumulation of Euler’s Method . . . . . . . . . . 44
4.6 Euler’s Method for Systems . . . . . . . . . . . . . . . . . . . . . . 47
5 RUNGE-KUTTA METHOD . . . . . . . . . . . . . . . . . . . . . . . . 49
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
5.2 Problem of Runge-Kutta Method . . . . . . . . . . . . . . . . . . . 50
5.3 Explicit Runge Kutta Method . . . . . . . . . . . . . . . . . . . . . 51
5.4 Implicit Runge-Kutta Method . . . . . . . . . . . . . . . . . . . . . 59
5.5 Fourth Order Runge-Kutta Method . . . . . . . . . . . . . . . . . . 60
5.6 Stability of Runge-Kutta Method . . . . . . . . . . . . . . . . . . . 64
5.6.1 Absolute Stability of Runge-Kutta Method . . . . . . . . . 70
6 SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS . . . . . . . 74
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
6.2 Stability Theory for System . . . . . . . . . . . . . . . . . . . . . . 76
7 NUMERICAL EXPERIMENTS ON SIMPLE SYSTEMS . . . . . . . . 83
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
7.2 Numerical Experiments on Stiff System . . . . . . . . . . . . . . . 84
7.2.1 Numerical Experiments on Explicit Euler method . . . . . . 84
7.2.2 Numerical Experiments on Explicit Fourth Order Runge-
Kutta method . . . . . . . . . . . . . . . . . . . . . . . . . 86
8 COMPARISON OF EULER METHOD AND RUNGE-KUTTA METHOD
WITH ADVANTAGES AND DISADVANTAGES . . . . . . . . . . . . . 88
9 CONCLUSION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
vii
APPENDICES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Appendix A. Explicit Euler method . . . . . . . . . . . . . . . . . . . . . 97
Appendix B. Fourth Order Runge Kutta method . . . . . . . . . . . . . . 112
viii
LIST OF TABLES
Table 1. Explicit Euler method with h=0.1 for n=10 . . . . . . . . . . . 98
Table 2. Explicit Euler method with h=0.05 for n=20 . . . . . . . . . . 100
Table 3. Explicit Euler method with h=0.025 for n=40 . . . . . . . . . 102
Table 4. Explicit Euler method with h=0.0125 for n=80 . . . . . . . . . 104
Table 5. Explicit Euler method with h=0.00625 for n=160 . . . . . . . 106
Table 6. Explicit Euler method with h=0.003125 for n=320 . . . . . . . 108
Table 7. Explicit Euler method with h= 0.0015625 for n=640 . . . . . . 110
Table 8. Fourth Order Runge Kutta method with h=0.1 for n=10 . . . . 113
Table 9. Fourth Order Runge Kutta method with h=0.05 for n=20 . . . 115
Table 10. Fourth Order Runge Kutta method with h=0.025 for n=40 . . . 117
Table 11. Fourth Order Runge Kutta method with h=0.0125 for n=80 . . 119
Table 12. Fourth Order Runge Kutta method with h=0.00625 for n=160 . 121
ix
LIST OF FIGURES
Figure 3.1 The region of A−Stability . . . . . . . . . . . . . . . . . . . 23
Figure 3.2 The region of A (α)−Stability . . . . . . . . . . . . . . . . . 24
Figure 3.3 The region of Stiff Stability . . . . . . . . . . . . . . . . . . 25
Figure 4.1 The region of absolute stability of Forward Euler Method . . . 42
Figure 4.2 The region of absolute stability of Backward Euler Method . . 44
Figure 4.3 Rounding Error Curve for (4.5.7) . . . . . . . . . . . . . . . 47
Figure 1. Graph of approximated solution and exact solution by using
Explicit Euler method with h = 0.1 . . . . . . . . . . . . . . . 99
Figure 2. Graph of approximated solution and exact solution by using
Explicit Euler method with h = 0.05 . . . . . . . . . . . . . . 101
Figure 3. Graph of approximated solution and exact solution by using
Explicit Euler method with h = 0.025 . . . . . . . . . . . . . . 103
Figure 4. Graph of approximated solution and exact solution by using
Explicit Euler method with h = 0.0125 . . . . . . . . . . . . . 105
Figure 5. Graph of approximated solution and exact solution by using
Explicit Euler method with h = 0.00625 . . . . . . . . . . . . 107
Figure 6. Graph of approximated solution and exact solution by using
Explicit Euler method with h = 0.003125 . . . . . . . . . . . . 109
Figure 7. Graph of approximated solution and exact solution by using
Explicit Euler method with h = 0.0015625 . . . . . . . . . . . 111
x
Figure 8. Graph of approximated solution and exact solution by using
Explicit RK4 method with h = 0.1 . . . . . . . . . . . . . . . 114
Figure 9. Graph of approximated solution and exact solution by using
Explicit RK4 method with h = 0.05 . . . . . . . . . . . . . . . 116
Figure 10. Graph of approximated solution and exact solution by using
Explicit RK4 method with h = 0.025 . . . . . . . . . . . . . . 118
Figure 11. Graph of approximated solution and exact solution by using
Explicit RK4 method with h = 0.0125 . . . . . . . . . . . . . 120
Figure 12. Graph of approximated solution and exact solution by using
Explicit RK4 method with h = 0.00625 . . . . . . . . . . . . . 122
xi
Chapter 1
INTRODUCTION
Differential equations are among the most important mathematical tools used in pro-
ducing models in the physical sciences, biological sciences, and engineering. In this
text, we consider numerical methods for solving ordinary differential equations, that
is, those differential equations that have only one independent variable. We consider
the differential equations in the form of
y′ (x) = f (x,y (x))
where y(x) is an unknown function that is being sought. The given function f (x,y)
of two variables defines the differential equation. This equation is called a first order
differential equation because it contains a first order derivative of unknown function.
The numerical methods for a first-order equation can be extended to a system of first
order equations ([12]). The brief of thesis is organized as follows: In the second
chapter, the concept of convergence, local–global truncation error, consistency, zero-
stability, weak-stability are investigated for ordinary differential equations. At this
stage we focused on simple first order differential equations, and multistep method
for the given necessary conditions in Chapter 2. The purpose of this study is to
find the best approximated solution which converge to analytical solution. Chapter
1
3 consist of the problem of stability for stiff system which focuses on the model
problem. It is the instructive form to determine the stiff numerical method. Then, in
the Chapter 4, Euler’s method is reviewed. The derivation of Euler’s method is stated
and using some basic definitions, error and the region of stability is determined. In
the next chapter, we discuss the derivation of the families of Runge-Kutta method.
After completing this, we present some necessary definitions of the stability, and
examined the absolute stability of Fourth Order Runge-Kutta method. In chapter 6,
we give the general form of system for first order equations. The aim of this study
is to compute the approximated solutions of system of differential equations. Then,
it follows the stability theory for systems. In the last chapter, some examples are
given, and each numerical method is solved by using Matlab software. After that,
the results of numerical methods are analyzed. Finally, we concluded by giving the
advantages and disadvantages of the specified numerical methods in Chapter 4 and
Chapter 5. Additionally, in this dissertation, equations and formulas is benefited from
two books.([15]), ([25])
2
Chapter 2
CONCEPT OF CONVERGENCE, LOCAL-GLOBAL
TRUNCATION ERROR, CONSISTENCY, STABILITY, WEAK
STABILITY AND ZERO STABILITY
A simple first order differential equation can be defined as
∂y∂x= y′(x) = f (x,y(x)) (2.1)
where ∂y∂x is describing the first derivative of y with respect to time and f (x,y) is any
function of time and y. We look for a solution to (2.1) for x > x0 as
y(x0) = b (2.2)
where x0 < x < b, x0 and b are two real numbers. The first order differential equation
(2.1) with the condition described in (2.2) is known as the Initial Value Problem.
Analytical solution is defined by y(x), and approximate solution is represented by
yn. Introduce a general multistep method for solving initial value problem. Let the
several nodes given by xn = x0+nh, n = 0,1,2, ...
The general conformation of multistep method can be shown as
yn+1 =
p∑j=0
a jyn− j+hp∑
j=−1
b j f (xn− j,yn− j) (2.3)
3
where h > 0 and a0,a1, .....,ap,b−1,b0, ....,bp are given constants term with∣∣∣ap
∣∣∣+∣∣∣bp∣∣∣ , 0 as p ≥ 0. This is named (p+1) step method. In following chapters, we will
see that some methods can be produced by using multistep method as Euler Method,
The Midpoint Rule, Trapezoidal Rule, and Adams methods. When any numerical
method applied to a system, errors comprise in two forms.
1. Truncation (or discretization) Error: It is caused when approximations are used
to estimate some quantity. Truncation error are composed of two parts.
(a) Local Truncation Error: It is defined by Tn+p, and introduced the local
error at xn+p. It is shown as
Tn+p = y(xn+p)− y(xn)−hΦ(xn,y(xn);h) (2.4)
Local Truncation error arises when a numerical method is used to solve
initial value problem. The error occur after the first step and form in each
step.
Tn+1 = y(xn+1)− yn+1
To obtain the local truncation error, take difference between left hand side
and right hand side of method, and expand by using Taylor series. The
remaining term is called Local Truncation error. Finally, divide the result
4
to step size h. It is shown as
τn(y) =1h
Tn (2.5)
If y(x) is assumed to be sufficiently differentiable, then the local truncation
error for both explicit and implicit method can be written in the form
y(xn+p)− yn+p =Cp+1hp+1yp+1(xn)+O(hp+2)
Tn+p =Cp+1hp+1yp+1(xn)+O(hp+2)
where Cp+1 states the error constant, p indicates the order of the method,
and Cp+1hyp+1 (x) is the principal local truncation error ([27]). Thus, if
the local truncation error is O(hp+1), we can say that p represent the order
of the method. This means that∣∣∣Tn+p
∣∣∣ < Cp+1hp+1. If p is larger, then the
method is more accurate.
(b) Global (or Accumulated) Truncation Error: It is denoted by en which is
expressed
en = y(xn)− yn (2.7)
where y(xn) is exact solution and yn is approximate solution. Global Trun-
cation error is caused by the accumulation of the local error in all of the
iterations.
2. Round-off Error: It originate due to the operations of computer that takes lim-
5
ited edition number of digit. After calculating the approximations of methods,
the result is dropped in specific location. It is denoted by Rn+k which is also
committed at the n th application of the methods.
The general multistep method of initial value problem satisfies
y(xn+1) =p∑
j=0
a jy(xn− j)+hp∑
j=−1
b j f (xn− j,y(xn− j))+Tn+p (2.8)
where Tn+p is the Local Truncation error, and
yn+1 =
p∑j=0
a jyn− j+hp∑
j=−1
b j f (xn− j,yn− j)+Rn+p (2.9)
where {yn} is the solution of multistep method and Rn+p is the Round-off error. Sub-
tracting (2.9) from (2.8) and considering the global error en = y(xn)− yn, we obtain
en+1 =
p∑j=0
a jen− j+hp∑
j=−1
b j[f (xn− j,y(xn− j)− f (xn− j,yn− j)
]+∅n+p
where ∅ is obtained by subtracting round-off error from local truncation error as
∅ = Tn+p−Rn+p. For any differentiable function y(x), define the truncation error
Tn(y) = y(xn+1)−
p∑j=0
a jy(xn− j)+hp∑
j=−1
b jy′(xn− j)
, n ≥ p (2.10)
To state the error of numerical methods, use the Taylor expansion series for y(xn+1).
Then the error will be determined by
Tn(y) = O(hp+1)
6
Consistency is used to indicate the accuracy of the method. Consider the expression
of (2.5) to follow the consistency condition that is satisfied by
τn(y) −→ 0 as h −→ 0
Use the notation (2.5), and rewrite the multistep method. We obtain
y(xn+1) =p∑
j=0
a jy(xn− j)+hp∑
j=−1
b jy′(xn− j)+hτn(y)
Then introduce
τ(h) ≡ maxx0≤xn≤b
|τn(y)| (2.11)
where node points [x0,b] are x0 ≤ x1 ≤ .........≤ xN ≤ b. Multistep method is consistent
if y(x) is continuously differentiable on [x0,b] and satisfied the following status
τ(h) −→ 0 as h −→ 0 (2.12)
Order of the methods have a major role for the speed of the convergence. If the
condition (2.11) goes to zero rapidly, then approximate solution will be closer to the
exact solution. Thus, the speed of the convergence of approximated solution {yn}
to the exact solution y(x) is related with the speed of the convergence of condition
(2.11). When step size h will be chosen small, the intervals will increase. This
provide to be closer to 0. This relation is defined as
τ(h) = O(hp) (2.13)
7
Theorem 2.0.1 ([1])Let m ≥ 1 be a given integer. For (2.11) to hold for all continu-
ously differentiable functions y(x), that is, for the method (2.3) to be consistent, it is
necessary and sufficient that
p∑j=0
a j = 1, (2.14)
p∑j=−1
b j−p∑
j=0
ja j = 1 (2.15)
Further, for τ(h) = O(hm) to be valid for all functions y(x) that are (m+ 1) times
continuously differentiable, it is necessary and sufficient that (2.14)-(2.15) hold and
that
p∑j=0
(− j)ia j+ ip∑
j=−1
(− j)i−1b j = 1, i = 2, ...,m
Proof. ([2])Note that
Tn (αy+βw) = αTn (y)+βTn (w) (2.17)
for all constant α,β and for all differentiable functions y(x),W. To examine the conse-
quences of (2.11)-(2.12) and (2.13), expand y(x) about xn using the Taylor’s theorem
to obtain
y(x) =m∑
i=0
1i!
(x− xn)i y(i) (xn)+Rm+1(x), (2.18)
8
Rm+1(x) =1
m!
∫ x
xn
(x− s)m y(m+1) (s) ds
=(x− xs)m+1
(m+1)!y(m+1) (ξn) (2.19)
with ξn between x and xn. We are assuming that y(x) is m+ 1 times continuously
differentiable on the interval bounded by x and xn. Substituting into (2.10) and using
(2.17), we obtain
Tn(y) =m∑
i=0
1i!
y(i)(xn)Tn((x− xn)i
)+Tn (Rm+1)
It is necessary to calculate Tn((x− xn)i
)for i ≥ 0
• For i = 0,
Tn (1) = c0 ≡ 1−p∑
j=0
a j
• For i ≥ 1,
Tn((x− xn)i
)= (xn+1− xn)i
−
p∑j=0
a j(xn− j− xn
)i+h
p∑j=−1
b ji(xn− j− xn
)i−1
= cihi
ci = 1−p∑
j=0
(− j)i a j+ ip∑
j=−1
(− j)i−1 b j, i ≥ 1 (2.20)
9
This gives us
Tn (y) =m∑
j=0
ci
i!hiy(i) (xn)+Tn (Rm+1) (2.21)
From (2.19), it is straightforward that Tn (Rm+1) = O(hm+1
). If y is m+ 2 times con-
tinuously differentiable, we may write the remainder Rm+1 (x) as
Rm+1(x) =1
(m+1)!(x− xn)(m+1) y(m+1)(xn)+ ...,
and then
Tn (Rm+1) =cm+1
(m+1)!hm+1y(m+1) (xn)+O
(hm+2
)(2.22)
with
cm+1 = 1−
p∑j=0
(− j)m+1a j+ (m+1)p∑
j=−1
(− j)mb j
To obtain the consistency condition (2.11)−(2.12), assuming that y is an arbitrary
twice continuously differentiable function, we need τ (h) = O (h) and this requires
Tn (y) = O(h2
). Using (2.21) with m = 1, we must have c0 = c1 = 0, which gives the
set of equations (2.14)−(2.15). In some texts, these equations are referred to as the
consistency conditions. It can be further shown that (2.14)−(2.15) are the necessary
and sufficient condition for consistency (2.11)−(2.12), even when y is only assumed
to be differentiable. To obtain (2.13) for some m ≥ 1, we must have Tn(y) =O(hm+1).
From (2.21)−(2.20), this will be true if and only if c2 = c3 = . . . = cm = 0. This proves
10
the conditions (2.16).
For the largest value of p, which (2.13) holds, is known as the order or order of
convergence of method, stated in (2.3). Convergence occurs for multistep methods
then approximated solution {yn} tends to analytical solution {y(xn)} as the step size h
goes to zero. This describes that convergence in the limit as h→ 0, n→∞, nh= x− x0
remaining fixed where x is between x0 and b. It can be represented as
limh−→0
yn = y(xn)
To define the convergence of the initial value problem in (2.24) and the general mul-
tistep method in condition (2.3),
y′(x) = f (x,y(x)), x ≥ x0 (2.24)
y(x0) = y0
The following theorem will be examined.
Theorem 2.0.2 ([3])Assume that the derivative function f (t,y) is continuous and
satisfies the Lipschitz Condition
| f (x,y1)− f (x,y2)| ≤ K |y1− y2| (2.25)
for all −∞ < y1, y2 < ∞, x0 ≤ x ≤ b, and for some constant K > 0. Let the initial
11
errors satisfy
η(h) ≡ max0≤ i ≤ p
|y(xi)− yi| −→ 0 as h −→ 0 (2.26)
Assume that the solution y(x) is continuously differentiable and method is consis-
tent, that is, that it satisfies (2.12). Finally, assume that the coefficients a j are all
nonnegative
a j ≥ 0, j = 0,1, ..., p (2.27)
then the multistep method (2.3) is convergent and
maxx0 ≤ xn≤ b
|y(xn)− yn| ≤ c1η(h)+ c2τ(h) (2.28)
for suitable constants c1, c2. If the solution y(x) is (m+1) times continuously differ-
entiable, the method (2.3) is of order m, and the initial errors satisfy η(h) = O(hm),
then the order of convergence of the method is m; that is, the error is of size O(hm).
Proof. ([4])Rewrite (2.10) and use y′(x) = f (x,y(x)) to get
y(xn+1) =
p∑j=0
a jy(xn− j)+hp∑
j=−1
b j f (xn− j,y(xn− j))+hτn(y)
Subtracting (2.3) from this equality and using the notation en = y(xn)− yn, we obtain
en+1 =
p∑j=0
a jen− j+hp∑
j=−1
b j[f (xn− j,y(xn− j)− f (xn− j,yn− j)
]+hτ(h)
12
Apply the Lipschitz condition and the assumption (2.27) to obtain
|en+1| ≤p∑
j=0
a j∣∣∣en− j
∣∣∣+hKp∑
j=−1
∣∣∣b j∣∣∣ ∣∣∣en− j
∣∣∣+hτ(h)
where
τ(h) ≡max |τn(y)|
Introduce the maximum of error
fn = maxi=0,...n
|ei| ,n = 0,1, ...,N (h) .
Using this function, we have
|en+1| ≤p∑
j=0
a j fn+hKp∑
j=−1
∣∣∣b j∣∣∣ fn+1+hτ(h)
and applying (2.14), we obtain
|en+1| ≤ fn+hc fn+1+hτ(h), n ≥ p
c = Kp∑
j=−1
∣∣∣b j∣∣∣
The right hand side is trivially a bound for fn and thus,
fn+1 ≤ fn+hc fn+1+hτ(h)
13
For hc ≤ 12 , which is true as h −→ 0, we obtain
fn+1 ≤fn
1−hc+
h1−hc
τ (h)
≤ (1+2hc) fn+2hτ(h)
Noting that fp = η(h), then
fn ≤ e2c(b−x0)η(h)+[e2c(b−x0)−1
hc
]τ(h), x0 ≤ xn ≤ b (2.29)
The convergence of methods depends on consistency condition and stability. The
stability and convergence of numerical solution is related with the roots of the poly-
nomial
p(r) = rp+1−p∑
j=0
a jrp− j (2.30)
We can see that p(1) = 0 by considering the consistency conditionp∑
j=0a j = 1. Let
r0 = 1 and r1,r2, ...,rp be the roots of polynomial p(r). The method (2.3) satisfies the
root condition if
∣∣∣r j∣∣∣ ≤ 1, j = 0, ..., p (2.31)∣∣∣r j∣∣∣ = 1 =⇒ ρ′(r j) = σ(1) , 0 (2.32)
These says that all roots of ρ(r), which is known first characteristic polynomial, be-
long to the closed unit circle {z : |z| ≤ 1} in complex plane, and some simple roots of
14
p(r) lie on the boundary of the circle. It associated a characteristic polynomial as
π (r,hλ) = ρ(r)−hλσ(r) (2.33)
The general solution of (2.26) can be defined if the roots r j(hλ) are all distinct
yn =p∑
j=0γ j
[r j (hλ)
]n(2.34)
Since hλ = 0, we get from equation (2.33) that ρ(r) = 0. So, roots of equation become
r j(0) = r j, j = 0,1, ..., p.When r0 = 1, then the root of (2.33) is r0(0) = 1.
Definition 2.0.3 ([5])Assume the consistency conditions (2.14)-(2.15). Then the mul-
tistep method (2.3) is stable if and only if the root condition is satisfied.
Stability determines how well the method will perform in finding the approximated
solution in terms of satisfactoriness before actually performing the method. This
means that numerical errors generated during the solution, and these errors should
not be magnified.If Initial condition y0 contains numerical errors, then this will effect
the further approximation yn.
Solving the initial value problem numerically shows that there is a solution y(x) on a
given finite interval x0 ≤ x ≤ b. Accordingly, it is needed to analyze the stability for
methods. We perturb the initial value problem (2.1) with y0+ ϵ. The result is
y′ϵ(x) = f (x,yϵ(x)) (2.35)
yϵ(x) = y0+ ϵ
15
This notations shows that y(x) and yϵ(x) are exist on the given interval for small
values of ε and besides,
∥yϵ − y∥∞ ≡ maxx0≤ x ≤ b
|yϵ(x)− y(x)| ≤ cϵ for c > 0 (2.36)
Similar procedure is analyzed for stability of multistep method. Let state the solution
of (2.4) with initial values y0,y1, ...,yp for some differential equation y′(x)= f (x,y(x))
which perturb to the new values z0,z1, ...,zp. Then,
max0≤n≤p
|yn− zn| ≤ ϵ (2.37)
These initial values are valid for depending on h. In contrast, the numerical solution
{yn : 0 ≤ n ≤ N(h)} is stable if it is independent of h, and there is a constant c with
for all sufficiently small ϵ which is
max0≤n≤N(h)
|yn− zn| ≤ cϵ, 0 ≤ h ≤ h0
and N(h) is accepted the largest subscript N which xN ≤ b. In addition, it is satisfying
the Lipschtz condition. Thus, we can say that numerical solution of multistep method
is stable if all approximate solution {yn} is stable. If the maximum error is less than
the beginning error which is ϵ, then the I.V.P is called well-conditioned. Otherwise,
it is ill-conditioned. Consequently, the small changes in the initial value y0 will affect
the solution of y(x) of the initial value problem for small ϵ.
Theorem 2.0.4 (As described in [32])A linear multistep method is zero stable for
16
any ordinary differential equation of the form (2.1) where f satisfies Lipschitz condi-
tion if and only if its first characteristic polynomial has zeros inside the closed unit
disc with any which lie on the unit circle being simple.
We say that if first characteristic polynomial’s all roots belong to the closed unit
disc, zero stability holds for a linear multistep method. This means that modulus of
first characteristics polynomial p(r) is less than or equal to 1, and satisfies the root
condition. There are two fundamental condition for convergence which is specified
in the following theorem;
Theorem 2.0.5 ([33])To be consistent and zero-stable are the most basic condition
for convergence of linear multistep method.
Definition 2.0.6 ([6])The linear multi-step method (2.3) is said to be relatively sta-
ble for a given hλ if, for a given hλ, the root r j satisfy∣∣∣r j(hλ)
∣∣∣≤ r0(hλ), j= 1,2,3, ..., p
for sufficiently small values of h. If a linear method is stable but not relatively stable,
then it is called weakly stable.
It is clear that a method is relatively stable if the characteristic roots r j(hλ) satisfies
the given definition for nonzero values of |hλ|.
Definition 2.0.7 ([18])A numerical method is said to be absolutely stable in a region
ℜ of complex plane if, for all hλϵℜ, all roots of the stability polynomial π (r,hλ)
17
associated with the method, satisfy
∣∣∣r j∣∣∣ < 1, j = 1,2, . . . , p
Stability also includes some concept of absolute stability. Two parameters are con-
sidering for absolute stability: ”λ” which is the eigenvalues of Jacobian matrix and
”h” which is the step size. Absolute stability depends on value of the product of these
two parameters, is called hλ. Analyzing of the stability at two parameters separately
is insufficient. The region of the stability is considered in a complex plane. Because
λ can be either negative real part or complex. When numerical method is applied to
model equation y′(x) = λy(x) for performing the region of stability, then the modulus
of the nth step iteration should be less than or equal to 1. In system of differential
equations, first , the Jacobian matrix form is created by writing the coefficients of the
matrix variables. Then, the eigenvalues of Jacobian matrix is denoted by λt where
t = 1,2, ... are achieved by taking determinant of the Jacobian matrix which is equal
to zero. Finally, solving the system, we obtain the λt. If all eigenvalues of the matrix
are real, then the matrix is symmetric, and can have complex eigenvalues. Otherwise,
if eigenvalues of matrix are complex, then the parameter hλ will be also complex.
Consequently, the numerical method is absolutely stable if the parameter hλ is in the
region of absolute stability.
18
Chapter 3
STIFF SYSTEMS AND PROBLEMS OF STABILITY FOR STIFF
SYSTEM
3.1. Introduction
Stiff systems arises applications, such as chemical kinetics, mechanical system, con-
trol theory, electronics, and mathematical biology, and numerical solution of partial
differential equations. Stiffness is related with the concept of stability of numerical
methods. There are several definitions of stiff equation.
Let A be the coefficient of matrix of mxm system. Let λµ and λυ be two eigenvalues
of the coefficient matrix. The given problem is stiff if∣∣∣Re(λµ)
∣∣∣≫ |Re(λυ)|. It is re-
quired to integrate numerically over a long range, using the hugely small step length
to the interval.
Let A be the coefficient matrix of linear system. For system of differential equation,
consider the eigenvalues λt of fy(x,y(x)). If eigenvalues λt have negative real part
Re(λt) < 0 (3.1.1)
with the very large magnitude
max1< j<n
|Re(λt)| ≫ min1< j<n
|Re(λt)| (3.1.2)
19
then it make difficult to solve the system. We can say that the given problem is stiff.
By this definition, a stiff problem has a stable point with greatly different magnitudes
of eigenvalues.
To see the large magnitude between the eigenvalues, it is sufficient to look at the ratio
of
ℜ = max |Re(λt)|min |Re(λt)|
(3.1.3)
which provides a measure of stiffness. It is clear that stiffness ratio is calculated by
dividing highest eigenvalue by lowest eigenvalue.
3.2. Definition of Stiffness
Given the mxm linear systems
y′= Ay+Φ(x) (3.2.1)
where A is the coefficient of matrix that has different eigenvalues λt and correspond-
ing eigenvectors ct, t = 1,2, ..,m has general solution in the form of
y(x) =m∑
t=1
kteλt xct +Ψ(x) (3.2.2)
where kt is a constant term. Suppose that Re(λt) < 0, then the first term
m∑t=1
kteλt xct −→ 0 as x −→∞ (3.2.3)
20
which includes exponential terms, is called "transient part" and the remaining term
Ψ(x) is called "steady state part". In this system, to reach the accurate approximation,
the step size h is taken extremely small in our choice. It follows that the transient part
approach to zero as x −→∞ and λ is real and negative. Steady state part will attain
to exact solution. Thus, the aim of numerical solution is to find the approximate so-
lution in steady state part and to ignore the transient part that includes the slowest
decaying exponential eλt . If the eigenvalues lie outside the region of stability, then
step length should be chosen exceedingly small to satisfy hλ. Hence hλ will lie in
region of the absolute stability. In order to recognize the necessary condition, step
size is to be excessively small for stability and it has negative real eigenvalues or
negative real part of complex eigenvalues. Under this consideration system of differ-
ential equation is referred as stiff system.
In general, stiffness is affected from stiffness ratio which resulted in enormous nu-
meral. It arises when the huge difference observed in the modulus of real part of
eigenvalues.
Definition 3.2.1 ([19])The linear system y′= Ay+Φ(x) is said to be stiff if
1. Re(λt) < 0, t = 1,2, . . . ,m and
2. maxt=1,2,...,m
|Re(λt)| ≫ mint=1,2,...,m
|Re(λt)|, where λt,t = 1,2, . . . ,m are the eigenvalues
of A. The ratio
[max
t=1,2,...,m|Re(λt)|
]:[
mint=1,2,...,m
|Re(λt)|]
(3.2.4)
21
is called the stiffness ratio.
3.3. The Problem of Stability for Stiff System
We have seen the difficulties of the numerical solution of stiff system. It is essential to
consider the absolute stability of methods. There are various definitions of stability
for stiff systems that is proposed. These are applicable to any numerical method
which involves discretization with associated step length h.
Definition 3.3.1 ([20])(Dahlquist37) A numerical method is said to be A-stable if its
region of absolute stability contains the whole of the left-hand half-plane Re(hλ) < 0.
It is shown in figure
Figure 3.1. The region of A−Stability
When A−stable is considered on stiff system that Re(λ j) < 0, then step size can be
taken without any restriction, and the magnitude of real part of eigenvalues, which
represent maxt=1,2,...,m
|Re(λt)| , disregard.
22
Definition 3.3.2 ([21])([35])(Widlund 181) A numerical method is said to be A(α)−stable,
αϵ (0,π/2), if its region of absolute stability contains the infinite wedge
Wα ={hλ| −α < π− arghλ < α
}
it is said to be A(0)−stable if it is A(α)−stable for some (sufficiently small) αϵ (0,π/2).
A numerical method is A0−stable if its region of absolute stability includes the nega-
tive real axis in the complex plane.
If for a given λ, Re(λ)< 0, then the point hλ either will lie inside or outside the wedge
Wα for all h > 0. Eventually, eigenvalues of a stiff system lie in a some wedge Wβ;
so, A(β)− stable can be considered on the numerical solution of initial value problem
without any restriction on step size. Especially, A(0)−stable can be used for real and
nonnegative eigenvalues of matrix A. It is shown as
Figure 3.2. The region of A (α)−Stability
Definition 3.3.3 ([22])(Gear52,53) A numerical method is said to be stiffly stable iff
1. its region of absolute stability containsℜ1 andℜ2,
23
2. it is accurate for all hǫℜ2 when applied to the scalar test equationy′= λy, λ
complex constant withRe(λ) < 0, whereℜ1 = {hλ|Re(hλ) < −a}, and
ℜ2= {hλ| −a≤ Re(hλ) < b,−c≤ Im(hλ) < c} and a, c are positive real numbers.
It is shown as ([30])
Figure 3.3. The region of Stiff Stability
Sinceλ is real and negative, the regionR1 has no restriction onh. Eigenvalues decays
rapidly in the transient part. The valuehλ in ℜ1 will lie in stability region by elimi-
nating the step size. Nevertheless, in the regionℜ2, the step sizeh should be chosen
excessively small to satisfyhλ. Hereby, the valuehλ will lie in a stable region that is
shown in the above figure.
Definition 3.3.4 ([23])A one step numerical method is said to beL-Stable if it is A-
stable and, in addition, when applied to the scalar test equation y′= λy, λ a complex
constant withRe(λ) < 0, it yields yn+1 =ℜ(hλ)yn, where∣
∣
∣ℜ(hλ)∣
∣
∣ −→ 0 asRe(hλ) −→
−∞.
24
It is clear that A−stable is not enough to get accurate approximation, L− stabil-
ity is also required which can also be called as left stability. Definition of L−
stability needed, the ℜ(hλ) tends to zero along with the real part of λ tends to
negative infinity. Obviously, A−stability=⇒stiff-stability=⇒ A(α)−stability=⇒ A(0)-
stability=⇒ A0−stability ([34]).
25
Chapter 4
EULER METHOD
4.1. Introduction
Many differential equations in engineering are so intricate. It is inapplicable to have
solution. Numerical methods provide ease for solving the differential equations. The
simplest method to solve initial value problem is Euler method which have one step
process for each equation before move on next step. This method is not an adequate
method to get the certain approximation. Differential equation can be solved simply
even though it is rather rough and least accurate. It is restricted to utilize because
each successive step during the process accumulates large errors. It has slow of
convergence which means a method of order 1. So the error is O(h). In contrast, the
remainder term and error analysis in Euler method provide convenience to state the
difference between the approximate and exact solutions.
4.2. Definition of Euler’s Method
Assume that initial value problem (2.1)−(2.2) is applied to numerical method on
the specified interval: [x0,b] . We can create nodes with equi-spaced subinterval for
26
simplicity as
x0 < x1 < ... < xN < b
If nodes is taken to be evenly spaced, numerical methods will generate an approxi-
mate solution yn. It is written simply which is called mesh point as follows
xn = x0+nh, n = 0,1, ...,N
where
h =(b− x0)
N
and h is defined as step-size or (step of integration), a positive real number N. For
each n, the numerical approximation yn at a mesh points xn can be smoothly obtained.
The initial condition is known as
y(x0) = y0
Assume that we have already calculated yn up to some n. This represent
yn+1 = yn+h f (xn,yn) (4.2.1)
27
It is known as Euler method with the initial condition. To attain Euler’s method,
consider a forward difference approximation to the derivative
y′(x) ≈ 1
h[y(x+h)− y(x)
]
Equalize this to the initial value problem (2.1−2.2) at xn.We obtain
1h[y(xn+h)− y(xn)
]= f (xn,y(xn))
y(xn+1) = y(xn)+h f (xn,y(xn))
Euler’s method can be represented by considering the approximated values
yn+1 = yn+h f (xn,yn), 0 ≤ n ≤ N −1
The other way to derive the Euler’s method is to integrate the differential equation
(2.1) between two consecutive mesh points xn and xn+1.We conclude that
xn+1∫xn
y′(x)dx =
xn+1∫xn
f (x,y(x))dx
y(xn+1)− y(xn) =xn+1∫xn
f (x,y(x))dx, n = 0,1, ...,N −1
y(xn+1) = y(xn)+xn+1∫xn
f (x,y(x))dx (4.2.2)
28
Here, we cannot integrate f (x,y(x)) without knowing y(x). Hence we must approxi-
mate the integral. Apply the numerical integration rule
xn+1∫xn
g(x)dx ≈ hg(x)
which is knowns as the rectangle rule with g(x)= f (x,y(x)). This means the simplest
approach is to approximate the area under function f (x,y(x)) by the rectangle with
base [xn, xn+1] and height f (x,y(x)).We can define the rectangle rule
xn+1∫xn
g(x)dx ≈ h[(1−Θ)g(xn)+Θg(xn+1)
](4.2.3)
with Θϵ [0,1] . Then, substitute (4.2.3) into (4.2.2) by considering g(xn) = f (xn,y(xn)
to obtain
y(xn+1) = y(xn)+h[(1−Θ)g(xn)+Θg(xn+1)
]y(xn+1) ≈ y(xn)+h
[(1−Θ) f (xn,y (xn))+Θ f (xn+1,y (xn+1))
]y(x0) = y0
Then, supply the initial conditions to the one parameter method that is mentioned
above. This gives us the following method where Θϵ [0,1]
yn+1 = yn+h[(1−Θ) f (xn,yn)+Θ f (xn+1,yn+1)
]
This definition motivatesΘ−method by considering approximate values. TheΘ−method
referred Euler’s method as Θ = 0 which yn+1 must be found merely left hand side.
29
This definition that give yn+1 directly is called explicit methods. For Θ = 1 we re-
cover the Implicit (backward) Euler Method.
yn+1 = yn+h f (xn+1,yn+1), n = 0, ..,N −1 (4.2.4)
In order to identify yn+1 (4.2.4) need the solution of an implicit equation. Euler’s
method is also referred as Explicit Euler Method in order to pick out the difference.
This scheme gives a result for the value of Θ = 12 which is denominated Trapezium
Rule Method. It is shown as
yn+1 = yn+12
h[ f (xn,yn)+ f (xn+1,yn+1)], n = 0, ..,N −1
The other way to obtain numerical method is using multistep method. In general
form of multistep method, it is easier to achieve any numerical methods. Consider
the given form of (2.3) to obtain Euler method. As p = 0, we get that
yn+1 = a0yn+h[b−1 f (xn+1,yn+1)+b0 f (xn,yn)
]
If we give values instead of a0,b−1,b0 kind of
a0 = 1,b−1 = 0,b0 = 1
gives Euler method formulae. In contrast, if the values are taken as
a0 = 1,b−1 = 1,b0 = 0
30
, we get Implicit Euler method
yn+1 = yn+h f (xn+1,yn+1)
which yn+1 will occur in both sides.
4.3. Error Analysis of Euler’s Method
The purpose of examining error of Euler’s method is to see how the approximated
solution works. In Euler’s method the slope of function affects the accuracy of meth-
ods. In order to minimize the error that occur, the step size should be chosen very
small. In other words, number of point need to be taken enormous between the given
interval. Thus, when step size is chosen excessively small, error is minimized and
approximated solution will be more better.
For error analysis, we consider the differential equation y(x) that satisfies
y′(x) = f (x,y(x))
Assume that the solution of initial value problem is unique on x0 ≤ x ≤ b, and this
solution has bounded second derivative y′′(x) over given interval. To state the error
of Euler method, we begin by applying Taylor expansion series for y (xn+1) .
y (xn+1) = y(xn)+hy′(xn)+
h2
2y′′(ξn)+O(h3)
31
for some xn ≤ ξn ≤ xn+1. Taylor approximation becomes
y (xn+1) = y(xn)+h f (xn,y(xn))+h2
2y′′(ξn)+O(h3) (4.3.1)
If we compare the eguations (4.2.1) and (4.3.1), it yields
yn+1 = yn+h f (xn,yn)+O(h2)
It is shown that local truncation error of forward Euler method is O(h2
). The other
way to find truncation error; for any differentiable function y(x), we can define the
truncation error as follows
Tn(y) = y (xn+1)− y(xn)−h f (xn,y(xn)) (4.3.2)
and the term
Tn =h2
2y′′(ξn)+O
(h3
)(4.3.3)
is called truncation error for Euler method. By considering the 2.5 in Chapter 2,
we have the local truncation error of Euler method
τn =1h
Tn
τn =1h
[y (xn+1)− y(xn)−h f (xn,y(xn))], as y′(xn) = f (xn,y(xn))
32
Then substitute the Taylor expansion about y(xn+1) to get
τn =1h
[y(xn)+hy
′(xn)+O(h2)− y(xn)−h f (xn,y(xn))
]τn =
1h
[O(h2)
]τn = O(h1)
From the above explanation, It is clear that the truncation error is defined Tn =O(h2)
for Euler’s method and in general if Tn = O(hp+1) which p indicates the order of
method, then method is the pth order. That is; Euler method is the first order method.
It can be explained that exact solution is equal to the approximate solution addedly to
local truncation error: y(xn) = yn+Tn. As the order of method is 1, the method is too
small. For this reason, it is not efficient method to obtain accuracy. To comprehend
the error in Euler method, subtract
yn+1 = yn+h f (xn,yn)
from (4.3.1) getting
y (xn+1)− yn+1 = y(xn)− yn+h f (xn,y(xn))−h f (xn,yn)+h2
2y′′(ξn) (4.3.4)
From the above explanation, the propagated error arises as following
y(xn)− yn+h[f (xn,y(xn))− f (xn,yn)
](4.3.5)
33
Let en = y(xn)− yn to rewrite the (4.3.4)
en+1 = en [1+hK]+h2
2y′′(ξn)
These results give a general error of Euler Methods. Now, we investigate the con-
vergence of Euler’s method for solving the general initial value problem on a given
interval [x0,b] .
y′(x) = f (x,y(x)), x0 ≤ x ≤ b (4.3.6)
y(x0) = y0
For complete the error analysis the following Lemma and Theorem will be consid-
ered.
Lemma 4.3.1 ([9])For any real t,
1+ t ≤ et, (4.3.7)
and for any t ≥ 1, any m ≥ 0,
0 ≤ (1+ t)m ≤ emt (4.3.8)
Theorem 4.3.2 ([7])Let f (x,y) be a continuous function for x0 ≤ x≤ b and −∞< y<
∞, and further assume that f (x,y) satisfies the Lipschitz condition. Assume that the
solution y(x) of the general solution of initial value problem has a continuous second
34
derivative on [x0,b] . Then the solution {y(xn)| x0 ≤ x ≤ b} obtained by Euler’s method
satisfies
maxx0≤xn≤b
|y(xn)− yn| ≤ e(b−x0)K |e0|+[e(b−x0)K −1
K
]τ(h), (4.3.9)
where
τ(h) =12
h∥∥∥∥y′′∥∥∥∥∞ = 1
2h max
x0≤xn≤b
∣∣∣∣y′′(x)∣∣∣∣ (4.3.10)
and e0 = y(x0)− y0. If, in addition, we have
|y(x0)− y0| ≤ c1h as h −→ 0 (4.3.11)
for some c1 ≥ 0 (e.g., if y(x0) = y0 for all h, then c1 = 0), then there is a constant
B ≥ 0 for which
maxx0≤xn≤b
|y(xn)− yn| ≤ Bh (4.3.12)
Proof. ([8])Let en = y(xn)− yn,n ≥ 0. Let N ≡ N(h) be integer for which
xN ≤ b, xN+1 > b.
Define
τn =12
hy′′(ξn), 0 ≤ n ≤ N(h)−1,
35
based on the truncation error. Easily, we obtain
max0≤n≤N−1
|τn| ≤ τ(h)
using (4.3.10). Recalling (4.3.5), we have
en+1 = en+h[f (xn,y(xn))− f (xn,yn)
]+hτn (4.3.13)
Taking bounds using Lipschtz condition, we obtain
|en+1| ≤ |en|+hK |y(xn)− yn|+h |τn|
|en+1| ≤ (1+hK) |en|+hτ(h), 0 ≤ n ≤ N(h)−1 (4.3.14)
Apply this recursively to obtain
∣∣∣en| ≤ (1+hK)n∣∣∣e0|+
[1+ (1+hK)+ . . .+ (1+hK)n−1
]hτ(h)
Using the formula for the sum of a finite geometric series,
1+ r+ r2+ ...+ rn−1 =rn−1r−1
, r , 1 (4.3.15)
we obtain
∣∣∣en| ≤ (1+hK)n∣∣∣e0|+
[(1+hK)n−1
K
]τ(h) (4.3.16)
36
Using the Lemma 1, we obtain
(1+hK)n ≤ enhK = e(xn−x0)K ≤ e(b−x0)K
and this with (4.3.16 ) implies the main result (4.3.9).
The remaining result (4.3.12) is a trivial corollary of (4.3.9) with the constant B given
by
B = c1e(b−x0)K +12
[e(b−x0)K −1
K
]∥∥∥y”∥∥∥∞
We can say that the result (4.3.12) is consistent. When step size is halved, Bh is also
halved. Euler’s method is convergent with order 1, because that is the power of h that
occurs in the error bound. In general, if we have
|y(xn)− yn| ≤ chp, x0 ≤ xn ≤ b
for some constant p ≥ 0, then numerical methods is convergent with order p ([14]).
Let us consider the consistency on the examples:
1. For Euler methods: The numerical solution is
yn+1 = yn+h f (xn+1,yn+1)
37
Tn(y) = y(xn+1)− y(xn)−hy′(xn)+O(h2)
τn(y) =1h[y(xn+1)− y(xn)−hy′(xn)
]
This says that
y(xn+1)− y(xn)h
≈ y′(xn)
and the order of the method is 1, O(h1).
2. ([31])For midpoint method:
yn+1 = yn−1+2h f (xn,yn)
Here
Tn(y) = y(xn+1)− y(xn−1)−2hy′(xn)
τn(y) = 2[y(xn+1)− y(xn)
2h− y
′(xn)
]
Thusly,
y(xn+1)− y(xn)2h
≈ y′(xn)
4.4. Numerical Stability of Euler’s Method
Recollect the definition of stability for initial value problem. Small changes in initial
value y0 will perturbed the solution y(x) by ϵ. Similar analysis is valid for Euler’s
38
method. Introduce a new numerical solution {zn} by
zn+1 = zn+h f (xn,zn), n = 0,1, ...,N −1
with initial values z0 = y0 + ϵ. It is perturbed to the initial value problem. In order
to inspect the stability, compare two numerical solution {yn} in (2.1) and {zn} by
subtracting. We get
zn+1− yn+1 = zn− yn+h[f (xn,zn)− f (xn,yn)
]
with initial value z0− y0 = ϵ. Introduce en = zn− yn to obtain
en+1 = en+h[f (xn,zn)− f (xn,yn)
]
To be more straightforward, use the Lipschtz condition and apply theorem (4.3.2) to
get
max0≤n≤N
|zn− yn| ≤ e(b−x0)K |ϵ |
There is a constant c ≥ 0 such that
max0≤n≤N
|zn− yn| ≤ c |ϵ|
This analog shows that error must be less than the received perturbed error in startup
for getting stable method. Thus, Euler method is a stable under the solution of the
initial value problem Now, we turn to examine the performance of Euler’s method on
39
model problem. We have
y′(x) = λy(x), x ≥ 0 (4.4.1)
y(0) = 1
When it is applied to the model problem, the numerical method is displayed
yn+1 = yn+hλyn = (1+hλ)yn, n ≥ 0 (4.4.2)
y0 = 1
We investigate the case λ to find the region of stability of Euler methods. Recursively,
it is obtained
yn = (1+hλ)n y0 (4.4.3)
It can be written for a fixed node point xn = nh ≡ −x, as n −→∞
yn =
1+ λ−xn
n
−→ eλ−x
Since exact solution is decaying exponentially, numerical method also has same be-
havior. To show the stability of Explicit Euler method, we need that
|1+hλ| < 1
for λ is real and negative. Thus, in the complex plane radius is 1 with centre 1. The
point hλ is in region of absolutely stable under specified interval with Re(λ). Then
40
the condition indicates the interval that Euler method is stable. It becomes
−2 < hλ < 0
namely
0 < h <2λ
This also satisfied the convergence of Euler method since in the notation (4.4.3),
yn −→ 0 as n −→∞ for any choice of step size holds. Thus, in Explicit Euler method,
step size should be chosen excessively small to provide the stability. The stability
region of Explicit Euler method is straightforward in the figure 4.1
Figure 4.1. The region of absolute stability of Forward Euler Method
41
On the other hand, we show the implicit Euler method to understand how methods
behaves in the model problem. Implicit Euler method states that
yn+1 = yn+h f (xn+1,yn+1)
After that substitute model problem to numerical method to obtain
yn+1 = yn+hλyn+1
yn+1 =1
1−hλyn
and by using induction
yn =
(1
1−hλ
)n
y0
Therefore, it is clear that for Re(λ) < 0 implicit Euler method is stable if and only if
it satisfies
(1
1−hλ
)< 1
So, |1−hλ| > 1 for any step size h > 0. Thus, we should choose step size h large to
ensure the stability. It is straightforward in figure (4.2)
42
Figure 4.2. The region of absolute stability of Backward Euler Method
Consequently, when numerical method is absolutely stable, there is no restriction on
h. If the values of λ that is real and negative has the large magnitude, then step size
should be chosen excessively small to satisfies hλ. Hereby, it belong to the region of
absolute stability. This also affect the approximation solution. It provides the trun-
cation error to be small. Even though Euler’s method is absolute stable, we cannot
make any comment for Euler Method about weak-stable. Consider root condition
(2.30) and take p = 0
ρ (r) = r−a0
and root is
r0 = a0
From the condition (2.14) of theorem 2.0.1, manifestly r0 = 1. This shows that Euler
method is absolute stable, but we cannot apply the definition 2.0.5 which is related
with relatively stable and weak stable. Because it has one root.
43
4.5. Rounding Error Accumulation of Euler’s Method
"Integer mode" and "floating point mode" provide to represent the numbers. Integer
mode is used for integer numbers and floating point mode is used for real numbers.
We concern with floating point mode. In numerical methods, numbers have greatly
varying size. In order to facilitate the operations, the limitations on the numbers of
digit are required. Rounding error is caused due to this modes. It affect the accuracy
in the numerical solution. Now, we analyze the error for Euler’s method. After
numerical method applied the to any differential equation, rounding error is being
performed.
Denote δn which is called rounding error. It is the precision of the arithmetic and
affected the approximate solution {yn}. We have
yn+1 = yn+h f (xn,yn)+δn, n = 0,1, . . . ,N(h)−1 (4.5.1)
Assume that
|δn| ≤ cu. maxx0≤x≤b
|y(x)| = cu.∥y∥∞ (4.5.2)
where u = 2.2x10−16 is the machine epsilon of the computer and the magnitude of c
is 1 or larger 1. Let δ(h)be a bound on the rounding errors
δ(h) = max0≤n≤N(h)−1
|δn| (4.5.3)
To see the effect of rounding error subtract the approximate solution (4.5.1) from the
44
exact solution to have
y(xn+1)− yn+1 = y(xn)− yn+h[f (xn,y(xn))− f (xn,yn)
]+
12
h2y′′(ξn)−δn (4.5.4)
y(x0)− y0 = 0
This is equivalent to the form
y(xn+1)− yn+1 = y(xn)− yn+h[f (xn,y(xn))− f (xn,yn)
]+hτ(h)−δn
where Tn+1 =12h2y”(ξn) is the local truncation error. It is same as the notation
τ(h) =1h
Tn+1
The error term of (4.5.4) can be written as follows
hτ(h)−δ(h) = h[τ(h)− δn
h
](4.5.5)
Setting en = y(xn)− yn, take bounds of notation (4.5.4) using the Lipschtz condition
|en+1| ≤ |en|+hK |en|+hτ(h)−δ(h) (4.5.6)
|en+1| ≤ (1+hK) |en|+hτ(h)−δ(h) (4.5.1)
By an inductive argument and applying the proof of the theorem (4.3.2) we obtain,
|en| ≤ e(b−x0)K |e0|+e(b−x0)K
hKh[τ(h)− δn
h
]
45
where e0 = 0 is getting from (4.5.4). So, we reach the last form as
|en| ≤e(b−x0)K
K
[12
h∥∥∥∥y′′∥∥∥∥∞− cu
h∥y∥∞
]|y(xn)− yn| ≤ c1
{12
h∥∥∥∥y′′∥∥∥∥∞− cu
h∥y∥∞
}= E(h) (4.5.7)
It is clear from the above operations that error will decrease as h decrease at the
beginning; but at the critical point the optimum value of h∗, the error will increase.
At the second term in brackets on the right hand side of (4.5.7) affect the error despite
the fact that machine epsilon u is small. The figure (4.3) also demonstrate the above
explanation.
Figure 4.3. Rounding Error Curve for (4.5.7)
46
4.6. Euler’s Method for Systems
The numerical solution for system is same as for a single equation. Numerical
method is applied to each equation in the system. It is shown in detailed in Chapter
6 that is written in a matrix form. To be more clarity, we consider Euler’s method for
a system of two differential equations. Let
y′1(x) = f1(x,y1,y2)
y′2(x) = f2(x,y1,y2)
with initial conditions
y1(x0) = y1,0
y2(x0) = y2,0
In order to obtain system of Euler’s method, consider the Taylor expansion for each
equation.
y1(xn+1) = y1(xn)+h f1(xn,y1,n,y2,n)+h2
2y′′1 (ξn)
y2(xn+1) = y2(xn)+h f2(xn,y1,n),y2,n)+h2
2y′′2 (ζn)
47
for some ξn, ζn in [xn, xn+1]. We get Euler’s method for a system of two equation by
ignoring the error terms and considering the initial conditions
y1,n+1 = y1,n+h f1(xn,y1,n,y2,n)
y2,n+1 = y2,n+h f2(xn,y1,n,y2,n)
This indicates the general form of system in matrices format as
yn+1 = yn+hf(xn,yn)
48
Chapter 5
RUNGE-KUTTA METHOD
5.1. Introduction
The Runge-Kutta method is popular method for solving initial value problem. It is
most accurate and stable method. It arise when Leonhard Euler have made improve-
ments on Euler method to produce Improved Euler method. Then, Runge is realized
this method which is similar method with the second order Runge Kutta method. A
few years later in 1989 Runge acquired Fourth Order of Runge Kutta method and af-
terwards, it is developed by Heun(1900) and Kutta(1901). Fourth Order Runge-Kutta
method intend to increase accuracy to get better approximated solution. This means
that the aim of this method is to achieve higher accuracy and to find explicit method
of higher order. In this section, we discuss the formulation of method, concept of
convergence, stability, consistency for RK4 method. In spite of the fact that Runge
Kutta methods are all explicit, implicit Runge Kutta method is also observed. It has
the same idea of Euler method. Euler method is the first order accurate; in addition it
require only a single evaluation of f (xn,yn) to obtain yn+1 from yn. In contrast, Runge
Kutta method has higher accuracy. It re-evaluates the function f at two consecutive
points (xn,yn) and (xn+1,yn+1). It requires four evaluations per step. Due to this,
Runge-Kutta method is quite accurate, and it has faster rates of convergence.
49
5.2. Problem of Runge-Kutta Method
Analyze the initial value problem to find the solution of ordinary differential equa-
tions
y′(x) = f (x,y(x)) (5.2.1)
y(x0) = y0
The general form Runge-Kutta method is
yn+1 = yn+hF (xn,yn;h) , n = 0, . . . ,N −1 (5.3.2)
where F(., .; .) is called an increment function on the interval [xn, xn+1] . It can be
defined in general form as
F (x,y;h) = b1k1+b2k2+ . . .+bnkn (5.2.3)
where bn’s are constant and kn’s are
k1 = f (xn,yn) (5.2.4)
k2 = f (xn+ c2h,yn+a21k1h)
k3 = f (xn+ c3h,yn+a31k1h+a32k2h)
...
ks = f (xn+ csh,yn+as,1k1h+as,2k2h+ ...+as,s−1ks−1h)
50
where c’s and a’s are constants. Here, each of function k’s are represent slope of the
solution which are approximated to y(x). These coefficients ai j,c j,b j must be satisfied
the system of Runge-Kutta method. These are usually arranged in Butcher tableau or
(partitioned tableau)
c A
bT
The coefficient bT is a vector of quadrature weights, and ai j (i, j = 1, . . . , s) indicates
the matrix A.
5.3. Explicit Runge Kutta Method
The family of s−stage Explicit Runge Kutta method can be formed as shown in the
following:
yn+1 = yn+h
b1 f (xn,yn)+b2 f (xn+ c2h, f (xn,yn+h [a21k1]))+ . . .
+bs−1 f (xn+ cs−1h,yn+h[as−1,1k1+as−1,2k2+ . . .+as−1,s−2
])
+bs f (xn+ csh,yn+h[as,1k1+as,2k2+ . . .+as,s−1
])
(5.3.1)
yn+1 = yn+hs∑
i=1
biki
51
where
k1 = f (xn,yn),
ki = f (xn+ cih,yn+hs−1∑j=1
ai, jk j), i = 1,2, . . . , s (5.3.2)
where h = xn+1 − xn. The coefficients{ci,ai, j,b j
}determine the numerical method.
This form was developed for higher accuracy methods. However, formulas can be
defined different notations as
zi = yn+hi−1∑j=1
ai, j f (xn+ c jh,z j), i = 1,2, ..., s (5.3.4)
yn+1 = yn+hs∑
j=1
b j f(xn+ c jh,z j
)(4.3.5)
The coefficients{ci,ai, j,b j
}for Explicit Runge Kutta methods can be simplified by
using the following Butcher Tableau
0
c2 a21
c3 a31 a32
......
.... . .
cs as1 as2 . . . . . . as,s−1
b1 b2 . . . bs−1 bs
52
If Runge-Kutta method is consistent, then the coefficients{ai, j
}and
{c j
}must satisfy
the condition
i−1∑j=1
ai, j = ci, i = 2, . . . , s (5.3.5)
The simplest Runge–Kutta method is the (Explicit) Euler method. The formula of
Euler method which is the first order, is mentioned previous chapter as yn+1 = yn +
f (xn,yn). The corresponding tableau is
0 0
1
The other example is given the midpoint method which is a second-order method
yn+1 = yn+h f (xn+12
h,yn+12
h f (xn,yn)
and its Butcher tableau is shown as
0 0
12
12 0
0 1
In order to evaluate y(xn+1), each of higher order derivatives is required to expand at
the point xi in the Taylor series. It is convenient to analyze any Runge-Kutta method
53
by using some formulae of derivatives which is
y′(x) = f (y(x))
y′′(x) = f ′(y(x)) y′(x) =⇒ f ′(y(x)) f (y(x))
y′′′(x) = f′′(y(x))
(f (y(x)),y
′(x)
)+ f
′(y(x)) f ′(y(x))y
′(x)
=⇒ f ′′ (y (x)) ( f (y(x)), f (y(x)))+ f ′(y(x)) f ′(y(x)) f (y (x))
It can be simplified to avoid complication by taking f = f (y (x)), fy = f ′ (y(x)), fyy =
f′′
(y (x)). We obtain
y′(x) = f
y′′(x) = fy f (5.3.6)
y′′′
(x) = fyy f 2+ f 2y f
y′′′′
(x) = fyyyy f 3+4 fyy fy f 2+ f 3y f
In order to generate the second order Runge Kutta method, we observe Taylor expan-
sions for y(xn+1) which has the form
y(xn+1) = y(xn)+hy′(xn)+
h2
2!y′′(xn)+
h3
3!y′′′
(xn)+ . . .+hp
p!y(p)(xn+) (5.3.7)
So as to attain the second order Runge Kutta method, we should take the derivation
of f (x,y) for the functions k1,k2. Consider the second order Taylor series and use
notations of (5.3.5)−(5.3.6) to construct the Runge Kutta method with order 2. Thus,
instead of y′(xn), we can write f (x,y) and we need to evaluate y
′′(xn) with respect to
54
y. After substituting, we takes form
y(xn+1) = y(xn)+h f +12
h2 fy f +O(h3) (5.3.8)
The approximate solution of second order Runge Kutta method can be obtained
yn+1 = yn+h [b1k1+b2k2] (5.3.9)
where
k1 = f (x,y) = f (5.3.10)
k2 = f (xn+ c2h,yn+ha21k1) = f +ha21 f fy+h2a12 f fx
Then, replace the slope of solution to form of the approximation solution yn+1 and
neglect function of f that depend on x to obtain
yn+1 = yn+h[b1 f +b2
(f +ha21 f fy
)](5.3.11)
Now, we match (5.3.8) with Taylor series (5.3.7). This satisfy the following equations
b1+b2 = 1 (5.3.12)
b2a21 =12
55
So, we have two conditions with three unknowns values. If we choose b1 = 0, b2 = 1
and a21 =12 , Runge Kutta method with order 2
yn+1 = yn+h f(xn+
12
h,yn+12
h f (xn,yn))
This is called Modified Euler method. Another particular solution of (4.3.12) is
Heun’s method since b1 =12 ,b2 =
12 and a21 = 1. The resulting method is
yn+1 = yn+h2
f (xn,yn+ f (xn+h,yn+h f (xn,yn)))
It is possible to acquire third order Runge Kutta method by using the same construc-
tion. Expansion of the term will include the order h3.Thus, for the Runge Kutta
method of order third, we consider third order Taylor expansion which has the form
y(xn+1) = y(xn)+hy′(xn)+
h2
2!y′′(xn)+
h3
3!y′′′
(xn)+O(h4)
It is required to find y′′(xn), y
′′′(xn) and also we need to expand k1, k2, k3 by using
derive expansion. The numerical solution is written as
yn+1 = yn+h [b1k1+b2k2+b3k3] (5.3.13)
56
where
k1 = f (x,y)
k2 = f (xn+ c2h,yn+ha21k1) (5.3.14)
k3 = f (xn+ c3h,yn+h [a31k1+a32k2])
Expanding k2 as a Taylor series we obtain
k2 = f +hc2 fx+ha21k1 fy+h2a12 f fx+12
h2a221
[fxx+2k1 fxy+ fyyk2
1
]+O(h3) (5.3.15)
and substitute k1 to equation (5.3.15) and ignore the function which is depending of
x to obtain
k2 = f +ha21 f fy+12
h2a221 fyy f 2+O(h3)
Similarly, in order to obtain k3, same process is applied in turn
k3 = f +h (a31k1+a32k2) fy+12
h2(a2
31k21 +a2
32k22
)fyy
Then by substituting ki’s (i = 1,2,3) to the numerical solution, we obtain
yn+1 = yn+h (b1+b2+b3) f +h2 (b2a21+b3a31+b3a32) f fy
+h3
2
(b2a2
21+b3a231+b3a2
32
)f 2 fyy+h3b3a32a21 f fy fy
57
Ultimately, we match the Taylor expansion of exact solution with the expansion of
solution. We have
y (xn+1)− yn+1 = h (b1+b2+b3−1) f +h2(b2a21+b3a31+b3a32−
12
)f fy (5.3.16)
+h3
2
(b2a2
21+b3a231+b3a2
32−13
)f 2 fyy+h3(b3a32a21−
16
) f fy fy
It is clear that set of functions
b1+b2+b3 = 1
b2a21+b3a31+b3a32 =12
(5.3.17)
b2a221+b3a2
31+b3a232 =
13
b3a32a21 =16
There are four equations with six unknowns. By taking convenient value for un-
knowns, we get through two particular solution of third order Runge Kutta method:
1. ([28])Since b1 =14 ,b2 = 0,b3 =
34 ,a21 =
13 ,a31 =
23 ,a32 =
23 , the result gives
Heun’s third order formula
yn+1 = yn+h4
(k1+3k3)
k1 = f (x,y)
k2 = f (x+13
h,y+13
hk1)
k3 = f (x+23
h,y+23
hk2)
58
2. ([29])Since b1 =16 ,b2 =
23 ,b3 =
16 ,a21 =
12 ,a31 = 1,a32 = 2, the result gives
Kutta’s third order formula
yn+1 = yn+h6
(k1+4k2+ k3)
k1 = f (x,y)
k2 = f (x+12
h,y+12
hk1)
k2 = f (x+h,y−hk1+2hk2)
5.4. Implicit Runge-Kutta Method
The implicit method is more different than explicit methods. It is such a complicated
method; but in solving differential equation, it has helpful numerical stability. The
form of s- stage Runge Kutta method is defined as
yn+1 = yn+hs∑
i=1
biki
where
ki = f (xn+ cih,yn+hs∑
j=1
ai jk j), i = 1, . . . , s (5.4.2)
It has a Butcher tableau
59
c1 a11 a12 . . . a1s
c2 a21 a22 . . . a2s
......
.... . .
...
cs as1 as2 . . . ass
b1 b2 ... bs
If the equation is a system of m differential equation, then the coefficients will be
system of sm nonlinear equation. It is clear that s nonlinear equations of system has
s unknowns ki.We now introduce a famous Runge Kutta method.
5.5. Fourth Order Runge-Kutta Method
The most popular method Fourth Order Runge-Kutta method is obtained as
yn+1 = yn+16
(k1+2k2+2k3+ k4)
where
k1 = f (xn,yn)
k2 = f (xn+12
h,yn+12
k1h) (5.5.2)
k3 = f (xn+12
h,yn+12
k2h)
k4 = f (xn+h,yn+ k3h)
Fourth Order Runge Kutta method is the well-known sample of all Runge Kutta
methods. Its tableau is
60
0
12
12
12 0 1
2
1 0 0 1
16
13
13
16
It is clear that RK4 method is consistent over the condition (5.3.8). The local trun-
cation error is O(h5). Also, it has four evaluation of function f in each step. We can
construct the function of f same as the second order method. First we begin with
Taylor expansion of exact solution
y(xn+1) = y(xn)+hy′(xn)+12
h2y′′(xn)+13!
h3y′′′(xn)+14!
h4y′′′′(xn)+O(h5) (5.5.3)
Then we replaced the first derivative, second derivative, third derivative, and fourth
derivative by using differentiation of (5.2.1). The expression will be interpreted
y(xn+1) = y(xn)+h f +12
h2 f fy+13!
h3[fyy f 2+ f 2
y f]
(5.5.4)
+14!
h4[fyyyy f 3+4 fyy fy f 2+ f 3
y f]+O(h5)
To contrast the approximate and exact solution, we need to indicate the expansion of
numerical method. By assuming
yn+1 = yn+h [b1k1+b2k2+b3k3+b4k4] (5.5.5)
61
with
k1 = f (x,y)
k2 = f (xn+ c2h,yn+ha21k1) (5.5.6)
k3 = f (xn+ c3h,yn+h [a31k1+a32k2])
k4 = f (xn+ c4h,yn+h [a41k1+a42k2+a43k3]
In order to extend ki’s we use again Taylor expansion formulae
∞∑m=0
m∑j=0
1j!(m− j)!
D j1D(m− j)
2 f (x,y)h jk(m− j) (5.5.7)
Here, expansion is only depending on y, so we neglect x which appears in argument
of f . After expansion is carry out, substitute ki’s to numerical method. Afterwards,
we have to match the expansions (5.5.4) and (5.5.5). We achieve ([16])
b1+b2+b3+b4 = 1 (5.5.8a)
b2c2+b3c3+b4c4 =12
(5.5.8b)
b2c22+b3c2
3+b4c24 =
13
(5.5.8c)
b3a32c2+b4a42c2+b4a43c3 =16
(5.5.8d)
b2c32+b3c3
3+b4c34 =
14
(5.5.8e)
b3c3a32c2+b4c4a42c2+b4c4a43c3 =18
(5.5.8f)
b3a32c22+b4a42c2
2+b4a43c23 =
112
(5.5.8g)
b4a43a32c2 =124
(5.5.8h)
62
In place of above a system of 8 equations in 10 unknowns is obtained. To show the
application is so complicated for Fourth Order Runge Kutta method. In contrast, It
can be solved by taking some appropriate value. Thus, since c4 = 1 is taken, b2,b3,b4
obtain for equation (5.5.8b),(5.5.8c) and (5.5.8c) ; then solve for a32,a42,a43 from
equation (5.5.8d), (5.5.8f), (5.5.8g); finally substituting to h. Many solution and s−
stages families of solution is arise these condition. There are two well known fourth
order methods
yn+1 = yn+h6
(k1+2k2+2k3+ k4)
k1 = f (xn,yn)
k2 = f (xn+12
h,yn+12
k1h)
k3 = f (xn+12
h,yn+12
k2h)
k4 = f (xn+h,yn+ k3h)
and
yn+1 = yn+h8
(k1+3k2+3k3+ k4)
63
k1 = f (xn,yn)
k2 = f (xn+13
h,yn+13
hk1)
k3 = f (xn+23
h,yn−13
hk1+hk2)
k4 = f (xn+h,yn+hk1−hk2+hk3)
5.6. Stability of Runge-Kutta Method
Runge-Kutta method has the same property of stability. Observe that the model
problem
y′ = λy (5.6.1)
y(0) = y0
with real and negative λ. Denote zT = [z1,z2, . . . ,zs] and eT = [1,1, . . . ,1] is the
s−dimensional vector. Apply the general form of s−stages to model problem to
get
zn = yne+hλAzn (5.6.2)
yn+1 = yn+hλbT zn
After some operations applied, it gives
yn+1 = yn+hλbT (1−hλA)−1eyn =(1+hλbT (1−hλA)−1e
)yn (5.6.3)
64
Then the method has stability function if
R(η) =(1+hλbT (1−hλA)−1e
)(5.6.4)
The Runge-Kutta method is A−Stable if modulus of function is less than 1 for Re(hλ)<0
which is
|R(η)| < 1 (5.6.5)
for all complex hλ.
Definition 5.6.1 ([24]) The method (5.3.2) is said to have order p if p is the largest
integer for which
y(x+h)− y(x)−hF(x,y(x);h) = O(hp+1) (5.6.6)
holds, where y(x) is known as the theoretical solution of the initial value problem.
Definition 5.6.2 ([26]) The method (5.3.2) is said to be consistent with initial value
problem if
F(x,y,0) ≡ f (x,y) (5.6.7)
The method is zero stable if F(x,y(x);h) = 0 as h −→ 0. It can be shown as follows:
yn+1 = yn+16
(k1+2k2+2k3+ k4) (5.6.8)
65
This equation becomes
yn+1− yn = 0 (5.6.9)
If we apply the root condition, the characteristic equation is satisfied
r−1 = 0
r = 1
Then root conditions hold when the modulus of root is less than or equal to 1 which
shown as |r| ≤ 1. We can say that the fourth order of Runge Kutta method is zero
stable.
To confirm that Runge Kutta method have greater accuracy than Euler method, we
need to calculate the local truncation error. Assume that
F(yn, xn;h) =s∑
i=1
biki
RK4 is consistent if F(yn, xn;0) = f (xn,yn)) then we must approve this rule. Replac-
ing the consistency condition into F(yn, xn;h) =∑s
i=1 biki, we get
s∑i=1
bi = 1
66
which is the necessary condition to satisfy the consistency condition for Runge-Kutta
method. Furthermore, we can define the local truncation error is
Tn+1 = y(xn+1)− y(xn)−hF(y(xn), xn;h)
The comparison of definition (5.6.2) and the local truncation error gives us
Tn+1 = O(hp+1)
where p is the order of the method. It is clear that Tn+1 =O(h5) is the local truncation
error of Fourth Order Runge Kutta method. Order of method assure the accuracy of
the method. For RK4 method, the local truncation error is appeared O(h5). This
means that the order of RK4 method is four. In case that RK4 is consistent and zero
stable, RK4 converges to analytical solution.
The definition of convergence is given in Chapter 2. To investigate the convergence
of Runge-Kutta method, consistency and stability condition must be hold. Consider
the form of method
yn+1 = yn+hF(xn,yn;h), n ≥ 0 (5.6.10)
which refers to the numerical solution of initial value problem (5.2.1). Using the
truncation error
Tn+1 = y(xn+1)− y(xn)−hF(x,y(x),h; f ) (5.6.11)
67
we define
τn(y) =1h
Tn+1(y)
In order to show the convergence of the solution (5.6.10), we need to have τn(y)−→ 0
as h −→ 0 since
τn(y) =y(xn+1)− yn
h−F(x,y(x),h; f ) (5.6.12)
We need that
F (xn,y(xn),h; f ) −→ y′(x) = f (x,y(x)) as h −→ 0
This shows that
η(h) = sup x0≤x≤b, −∞<y<∞| f (x,y)−F(x,y,h; f )| (5.6.1)
and since
η(h) −→ 0 as h −→ 0 (5.6.14)
the consistency condition is hold. We can also show the consistency result by other
way. Rewrite (5.6.12) in the form
y(xn+1) = y(xn)+hF(xn,y(xn),h; f )+hτn(y) (5.6.15)
68
then define
τ(h) = maxx0≤x≤b
|τn(y)|
The condition can be used for consistency condition while τ(h) −→ 0 as h −→ 0.
Apart from that we need to check the Lipschitz condition on F;
|F(x,y,h; f )−F(x,z,h; f )| ≤ L |y− z| (5.6.16)
for all x0 ≤ x ≤ b, −∞ < y, z <∞ and h > 0.
Theorem 5.6.3 ([10])Assume that the Runge-Kutta method satisfies the Lipschitz
condition. Then, for the initial value problem, the solution {yn} satisfies
maxx0≤xn≤b
|y(xn)− yn| ≤ e(b−x0)L |y(x0)− y0|+[e(b−x0)L−1
L
]τ(h) (5.6.17)
where
τ(h) ≡ maxx0≤xn≤b
|τn(y)| (5.6.18)
If the consistency condition (5.6.14) is also satisfied, then the numerical solution {yn}
converges to y(x).
Proof. ([11])Subtract (5.6.15) from (5.6.10) to obtain
en+1 = en+h[F(xn,y(xn),h; f )−F(xn,yn,h; f )
]+hτn(y) (5.6.19)
69
in which en = y(xn)− yn. Apply the Lipschitz condition (5.6.16) and use (5.6.18) to
get
|en+1| ≤ (1+hL) |en|+hτ(h), x0 ≤ xN ≤ b (5.6.20)
As with the convergence proof in Theorem 4.3.2 for the Euler method, given in
Section 4.3 of Chapter 3, this leads easily to the result (5.6.9). In most cases, it is
known by direct computation that τ (h)−→ 0 as h−→ 0, and in that case, convergence
of {yn} to y(x) is immediately proved. But all that we need to know is that (5.6.14) is
satisfied. To see this, write
hτn(y) = y(xn+1)− y(xn)−hF(xn,y(xn),h; f )
= hy′(xn)+12
h2y′′(ξn)−hF(xn,y(xn);h), y′(xn) = f (xn,y(xn))
h |τn(y)| ≤ hη(h)+12
h2∥∥∥y′′
∥∥∥∞τ(h) ≤ η(h)+
12
h∥∥∥y′′
∥∥∥∞Thus τ(h) −→ 0 as h −→ 0, completing the proof.
5.6.1. Absolute Stability of Runge-Kutta Method
The adequate technique is to consider model problem
y′ = λy (5.7.1)
y (0) = y0
70
The analytical solution of initial value problem is y′(x)= y0 exp(λx) where λ negative
real number. Here, analytical solution converge to 0 as x −→ +∞ at the exponen-
tial part. Note that this condition also is necessary for the solution of Runge Kutta
method. We investigate that what condition on step size the solution of Runge Kutta
method will satisfy the same behavior. By choosing the appropriate step size in the
numerical solution of initial value problem on the interval [x0, xm] with xm≫ x0, the
numerical solution reproduce desired status. When the numerical solution is applied
to the model problem, the interval of line hλ must satisfy the absolute stability con-
dition. This shows that solution of Runge Kutta method tends to zero as x −→ ∞.
Now, perform the Runge Kutta fourth order method to model problem to obtain
k1 = f (x,y) = λy
k2 = f (xn+ c2h,yn+ha21k1) = λ (y+ha21λy) =
= λy (1+a21hλ)
k3 = f (xn+ c3h,yn+h [a31k1+a32k2]) (5.7.2)
= λ(y+h
[a31λy+a32λy (1+a21hλ)
])= λy
(1+hλ [a31+a32]+h2λ2a32a21
)k4 = f (xn+ c4h,yn+h [a41k1+a42k2+a43k3] =
= λ(y+h
[a41λy
]+ha42λy [1+a21hλ]+ha43λy
[1+hλ [a31+a32]+h2λ2a32a21
])= λy
(1+hλa41+hλa42+h2λ2a42a21+hλa43+h2λ2a43 [a31+a32]+h3λ3a43a32a21
)
71
Assuming−h = hλ and
i−1∑j=1
ai j = ci, (i = 1, .., s), then rewrite (5.7.2)
k1 = λy
k2 = λy(1+a21
−h)
k3 = λy(1+−hc3+
−h2a32a21
)(5.7.3)
k4 = λy(1+−hc4+
−h2a42a21+
−h2a43c3+
−h3a43a32a21
)
Afterwards, substitute into (5.2.3) to obtain
F(x,y;h) = b1k1+b2k2+b3k3+b4k4
and
yn+1 = yn+−h
b1+b2
(1+a21
−h)+b3
(1+−hc3+
−h2a32a21
)+b4
(1+−hc4+
−h2a42a21+
−h2a43c3+
−h3a43a32a21
) yn
yn+1− yn =−h
(b1+b2+b3+b4)+ (b2a21+b3c3+b4c4)
−h
+ (b3a32a21+b4a42a21+b4a43c3)−h2+b4a43a32a21
−h3
yn (5.7.4)
yn+1/yn = 1+ (b1+b2+b3+b4)−h+ (b2a21+b3c3+b4c4)
−h2
+ (b3a32a21+b4a42a21+b4a43c3)−h3+b4a43a32a21
−h4
72
Now, we turn to the conditions (5.5.8a), (5.5.8b), (5.5.8d), (5.5.8h). It is evident that
the difference equation satisfies these conditions; so it is obtained
yn+1 =
(1+−h+
12
−h2+
16
−h3+
124
−h4
)yn (5.7.5)
Consequently, method is absolutely stable, that is, yn tends to 0 if and only if
∣∣∣∣∣∣1+ −h+ 12
−h2+
16
−h3+
124
−h4
∣∣∣∣∣∣ < 1 (5.7.6)
The plot of this function towards−h pose that the interval of absolute stability in
−hϵ [−2.78,0] .
73
Chapter 6
SYSTEM OF ORDINARY DIFFERENTIAL EQUATIONS
6.1. Introduction
More application problems include a system of several equation. The solution of a
system of ordinary differential equation is required in engineering and science that
has more complicated situations. The initial value problem of m differential equa-
tion’s system can be put into a form as
y′(x) = f(x,y(x)), y(x0) = y0 (6.1)
We can write as follows
y′1(x) = f1(x,y1(x),y2(x), ...,ym(x)), y1(x0) = y1,0
y′2(x) = f2(x,y1(x),y2(x), ...,ym(x)), y2(x0) = y2,0
...
y′m(x) = fm(x,y1(x),y2(x), ...,ym(x)), ym(x0) = ym,0
74
with the given some interval x0 ≤ x ≤ b. The general form of system can be repre-
sented the solution and the differential equation by using the column vector. Indicate,
y(x) =
y1(x)
y2(x)
...
ym(x)
, y0 =
y1,0
y2,0
...
ym,0
, f(x,y) =
f1(x,y1,y2, ...,ym)
f2(x,y1,y2, ...,ym)
...
fm(x,y1,y2, ...,ym)
with y =
[y1,y2, ...,ym
]T .
Example 6.1.1 ([13])The initial value problem
y′1 = y1(x)−2y2(x)+4cos(x)−2sin(x) , y1(0) = 1,
y′2 = 3y1(x)−4y2(x)+5cos(x)−5sin(x), y2(0) = 2
has the solution
y1(x) = cos(x)+ sin(x), y2(x) = 2cos(x)
System can be written as
y′(x) = Ay(x)+Φ(x), y(0) = y0
75
with
y =
y1
y2
, A =
1 −2
3 −4
,
Φ(x) =
4cos(x)−2sin(x)
5cos(x)−5sin(x)
, y0 =
1
2
In the notation above it can be represented as
f(x,y) =Ay+Φ(x), y =[y1,y2
]T
6.2. Stability Theory for System
Stability means that small disturbance in the initial value problems causes a small
change in the solution. Here, we consider the numerical methods for solving the
initial value problems that are numerically stable. Small change in initial value prob-
lem will cause a small change in the numerical solution for any sufficiently small
step size.
To examine the stability of system keep in view the initial value problem
y′(x) = f (x,y(x)),
y(x0) = y0
76
Instead of this, we consider the stability of numerical method for the model problem
y′(x) = λy(x)+g(x)
y(0) = 1
Stability and convergence can be answered for this problem. Expand y′(x) = f (x,y)
to get
f (x,y(x)) = f (x0,y0)+ fx(x0,y0)(x− x0)+ fy(x0,y0)(y(x)− y0)
Thus,
y′(x) = f (x,y(x))
= λ(y(x)− y0)+g(x)
with
g(x) = f (x0,y0)+ fx(x0,y0)(x− x0),
λ = fy(x0,y0)
Let V(x) = y(x)− y0, then we obtain
V ′(x) = λV(x)+g(x)
which is called model equation for the initial value problem. Make small change in
77
the initial value problem and see the difference in the solution
V ′ϵ(x) = λVϵ(x)+g(x)
Vϵ(x0) = V0+ ϵ
Here, g(x) will be cancelled. Because we are interested in the differ of the solutions
and we get model problem. Subtracting them we get
V ′ϵ(x)−V′(x) = λ(Vϵ(x)−V(x))
Vϵ(x0)−V(x0) = ϵ
Take W = V′ϵ(x)−V ′(x) to obtain
W′ = λW
W(x0) = ϵ
These operations demonstrate the stability and convergence of model equation. Now,
we examine the more general problem for system by considering the model equation.
It is similar with the above analysis.
The initial value problem of m differential equations of system describe as
y′ = f(x,y), x0 ≤ x ≤ b
y(x0)= y0
78
The final version of the model problem is defined
y′(x) = ∧y(x)+g(x)
with ∧ = fy(x0,y0). if f is differentiable, then fy(x,y) indicate a Jacobian matrix.
fy(x,y)i, j =∂ fi(x,y1,y2, ...,ym)
∂y j, 1 ≤ i, j ≤ m
This system can be written as
y′ = ∧y+g(x)
which can be reduced to equivalent system
z′i = λizi+γi(x), 1 ≤ i ≤ m
with λ1,λ2, ...,λm the eigenvalues of ∧ = fy(x0,y(x0)).
To investigate the stability of multistep method (3), examine the special model equa-
tion case
y′(x) = λy(x),
y0 = 1
79
After applied it to the multistep method, it becomes
yn+1 =
p∑j=0
a jyn− j+hλp∑
j=−1
b jyn− j , n ≥ p
yn+1 =
p∑j=0
a jyn− j+hλb−1yn+1+hλp∑
j=0
b jyn− j
we get
(1−hλb−1)yn+1 =
p∑j=0
(a j+hλb j
)yn− j
This is called a linear difference equation of (p+1) .We investigate a general solution
in a form
yn = rn , n ≥ 0
Substitute this form to the method and multiply by rp−n
rp+1 =
p∑j=0
a jrp− j+hλp∑
j=−1
b jrp− j
which is called characteristic equation. Denote the second characteristic roots,
σ(r) =p∑
j=−1
b jrp− j = b−1rp+1+
p∑j=0
rp− j
and remind that the first root of polynomials
ρ(r) = rp+1−p∑
j=0
a jrp− j
80
Thus first and second characteristic polynomial of (2.3) can be defined by
π(r,hλ) = ρ(r)−hλσ(r) = 0
The stability of numerical methods will be analyzed, when the step size is not chosen
very small. The model problem is the instructive technique to state the region of the
stability for any methods. We will investigate the case λ for this.
In general multistep methods (2.3), the characteristic equation is represented as
rp+1−p∑
j=0
a jrp− j−hλp∑
j=−1
b jrp− j = 0
for the determined model equation.
All roots of characteristic equation have magnitude 1 to satisfy the absolute stability.
We can find hλ from the characteristic equation.
rp+1−p∑
j=0
a jrp− j = hλp∑
j=−1
b jrp− j
hλ =rp+1−∑p
j=0 a jrp− j∑pj=−1 b jrp− j
This shows the region of the stability of method. When the constant λ is real, then λ
is negative (λ < 0) ; or when λ is complex, assume that Re(λ) < 0 in stable differential
equation problems. The true solution of the given model problem is
y(x) = eλx
Considering the above cases, the solution of model problem tends to zero as x tends
81
to infinity.
y(x) −→ 0 as x −→∞
When the any numerical method is applied to model problem, the approximated
solution satisfied
y(xn) −→ 0 as xn −→∞
If hλ is satisfied for above definition in any numerical method, then it is called region
of absolute stability of the numerical method.
82
Chapter 7
NUMERICAL EXPERIMENTS ON SIMPLE SYSTEMS
7.1. Introduction
Numerical experiments is mentioned to prove which numerical methods converge
faster to analytic solutions. Numerical experiments are investigated over an exam-
ple. In comparing different numerical methods, numerical experiments must be done
using the same of ordinary differential equations.([17]). For comparison bases, Hull
and Enright (1976) pointed out some assumptions that must be undertaken. Assump-
tions include assuming that the method is modelled to integrate between initial values
specified. Another assumption is assuming that local error is observed by keeping the
absolute error under the specified error tolerance. Differential equation is inspected
two varied numerical methods.
The given differential equations are analyzed for Explicit Euler method, Explicit
Runge-Kutta method. Analytical solution of ODE is calculated as well. Each one
of all is examined at varied step sizes. Step size is started with 0.1 and continued
with halved. Afterward, the absolute error is identified.
Initially, exact solution of DE is computed and then approximated solution is cal-
culated by using Matlab software for each numerical method at different step size.
Afterwards, absolute error are computed by taking difference analytical solution
83
to approximated solutions and presented in the same table at each step size. Ulti-
mately,errors at each step size of method are compared with other numerical meth-
ods. All numbers in the table. The computation process, errors and according to
graphs of each steps can be found in Appendix A and Appendix B.
7.2. Numerical Experiments on Stiff System
7.2.1. Numerical Experiments on Explicit Euler method
Consider the following example of stiff system;
dudx= 8u (x)−5v (x)+10w (x)
dvdx= 2u (x)+1v (x)+2w (x)
dwdx= −4u (x)+4v (x)+6w (x)
where initial conditions are u (0) = 2,v (0) = 2,w (0) = −3. It can be shown in general
form as y (0) = [2,2,−3]T . Its theoretical solution is given
u (x) = 6e2x−4e3x,
v (x) = −4e3x+6e2x,
w (x) = −e−2x+3e2x
where y (x) = [u (x) ,v (x) ,w (x)]T .[36]
Explicit Euler method and Explicit Fourth Order Runge Kutta method of numerical
methods is considered to solve system of ordinary differential equations. The system
84
is computed in Matlab software to evaluate values of the approximated and analytical
solution for Explicit Euler method and Explicit Fourth Order Runge Kutta method.
Initially, Explicit Euler method and Explicit Fourth Order Runge Kutta method is
computed for the given system at different step size. The system and analytical solu-
tions is entered into Matlab software for each method separately. Then analytical so-
lution and approximated solution is evaluated with step sizes 0.1,0.05,0.025,0.0125,
0.00625 and 0.003125. Afterwards, the absolute errors which is obtain by differ ap-
proximated solution from analytical solution, are calculated at specified step size.
Error tables with exact solution, approximated solution, and graphs, which is related
with exact and approximated solution, are shown in Appendix 2. In this table, we can
see how the approximated solutions behave when the step size is reduced by half. We
can compare the exact solution with approximate solution and identify the safe step
size ,which the approximated solution tends to analytical solution, through this table.
It can be determined the proximity of the approximated solution to exact solution
since the step size is changed.
In order to compute the approximated solution, step size is started with 0.1 for Ex-
plicit Euler method. As can be seen from the table in step size 0.1,0.05, 0.025 and
0.0125, the resulted of approximated solution is not closeness to exact solution. So,
these step sizes do not lie in the region of absolute stability. The difference between
exact solution and approximated solution must be excessively small. The computed
approximated solutions have much difference from analytical solutions as it seen in
the table. Nevertheless, the step size will lie inside the region of absolute stability
85
since h < 0.003125. The approximated solution is closer to exact solution. This
shows that the small step size provides the better approximation.
Application of Explicit Euler method is not occasionally preferred to use in stiff
systems. The reason is that cannot give the accurate approximated solution in fixed
error tolerance well. In order to achieve certain approximation, the step size must be
taken very small. This cause more iterations and high computation.
7.2.2. Numerical Experiments on Explicit Fourth Order Runge-Kutta method
The same system is computed in Matlab software. It is taken for comparing the
Explicit Euler method and Explicit Runge Kutta method. The same technique which
is implemented for Explicit Euler method, is applied to RK4. The computation of
Explicit Runge Kutta of fourth order method in same stiff system is also given at
different step sizes in Table for given systems. Step size is started from 0.1 and com-
putation progress is proceed of half. Evaluation of analytical solution is same and the
approximated solution is computed by using the step sizes 0.1,0.05,0.025,0.0125
respectively. In addition, local error of numerical method is generated by taking
modulus. Error tables with graphic can be found in Appendix 2. As it is seen in
table, at the step size h = 0.1, errors in system lie in the region of absolute stability.
Thus,absolute error is started to behave as approximate solutions But, the approxi-
mation of u(x),v(x),w(x) is not close to analytical solution. It is also appreciable in
absolute error which is not small absolute error. Again, when step sizes are taken
0.05 and 0.025, we can see in the table that absolute error is started to behave as
86
approximate solutions. These results indicate that the acceptable approximations,
and step sizes are in the region of the absolute stability. if the step size is used less
than 0.0125, the approximate solution will have same solutions with analytical so-
lutions. It is also noticeable from the error evaluation that have excessively small
difference. This shows that approximated solution turn into the exact solution at step
size h = 0.0125.
87
Chapter 8
COMPARISON OF EULER METHOD AND RUNGE-KUTTA
METHOD WITH ADVANTAGES AND DISADVANTAGES
1. EULER METHOD:
Advantages:
Euler’s method is the simplest of all linear multi-step method to obtain the ap-
proximated solution of the specified initial value problem. It has the one-step
techniques, and it can be easily programmed. Most of the ordinary differen-
tial equations can be solved conjecturally with numerical method and approxi-
mated solution yn+1 can be obtained from yn. The derivation of Euler’s method
can be revealed by constructing Taylor series. Approximated solution can be
acquired at each step before progressing to the next step. In addition, it has
merely single computation of function f in each time (step-size). The error
analysis, which involve local and global truncation error, and remainder term
can be obtained smoothly. Consequently, Euler’s method has the practical so-
lution techniques in order to solve the complicated differential equations.
Disadvantages:
In spite of the simplicity, it is restricted to use. The reason is; it generate large
error in each successive step during the computation which is the accumulated
error. In order to avoid the formation of larger error, step-size should be taken
88
excessively small.Therefore, it needs high computation of time. Additively,
approximated solution converge slower to analytical solution. This means that
the order of method is 1 and the error is observable O(h2
). It is a slow rate of
convergence.
2. RUNGE-KUTTA METHOD:
Advantages:
The idea of families of Runge Kutta method is too complicated, but higher or-
der provides much better approximated solutions than Euler method. The most
popular Runge-Kutta method is the method of order four. It is good choice to
get more accurate and more efficient solutions for solving the specified ordi-
nary differential equations.The approximated solution converge faster to exact
solution and the order of RK4 is 4 and the truncation error is O(h5
).
Disadvantages:
Method is re-evaluating the function f at each time to obtain the predictable
solution. It requires four evaluation per step. So, the computation of function
may take long time. The derivation of Runge-Kutta method is obtained from
Taylor series, but it is tedious to calculate higher derivative. To avoid this, the
function f is evaluated at more points.
89
Chapter 9
CONCLUSION
In this thesis, we have discussed numerical methods for solving systems of ordi-
nary differential equations. Some necessary conditions and definitions are given to
examine the numerical methods. After that, by considering these conceptions and
definitions, Euler methods and Runge Kutta method of order 4 are developed and,
derivations and stabilities of both methods are discussed. Afterwards, the system of
ODE is given and, we discussed the efficiency of two methods at the different step
size for systems using Tables of approximated solutions with exact solutions. At the
end, we gave information about the advantages and disadvantages of Euler’s method
and Runge Kutta method. Consequently, we see that in the Euler’s method exces-
sively small step size converge to analytical solution. Therefore, large number of
computation is needed. In contrast, Runge Kutta method gives better results and it
converge faster to analytical solution and has less iteration to get accuracy solution.
90
REFERENCES
[1] Atkinson, K. E., and Han, W., and Steward, D.,(1961), Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
[2] Atkinson, K. E., and Han, W., and Steward, D.,(1961), Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
[3] Atkinson, K. E., and Han, W., and Steward, D.,(1961), Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
[4] Atkinson, K. E., and Han, W., and Steward, D.,(1961), Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
[5] Atkinson, K. E., and Han, W., and Steward, D.,(1961), Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
[6] Atkinson, K. E., and Han, W., and Steward, D.,(1961), Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
91
[7] Atkinson, K. E., and Han, W., and Steward, D.,(1961), Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
[8] Atkinson, K. E., and Han, W., and Steward, D.,(1961), Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
[9] Atkinson, K. E., and Han, W., and Steward, D.,(1961), Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
[10] Atkinson, K. E., and Han, W., and Steward, D.,(1961) Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
[11] Atkinson, K. E., and Han, W., and Steward, D.,(1961), Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
[12] Atkinson, K. E., and Han, W., and Steward, D.,(1961), Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
[13] Atkinson, K. E., and Han, W., and Steward, D.,(1961) Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
92
[14] Atkinson, K. E., and Han, W., and Steward, D.,(1961) Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
[15] Atkinson, K. E., and Han, W., and Steward, D.,(1961), Numerical Solutions
of Ordinary Differential Equations, John Wiley & Sons, Inc., Hoboken, New
Jersey, Canada
[16] Butcher, J., C., (1933), Numerical Methods for Ordinary Differential Equa-
tions,John Wiley & Sons, The University of Auckland, New Zealand
[17] Hull, T.E. and Enright,W.H., (1976), The Results on Initial Value Methods for
Non-Stiff Ordinary Differential Equations, Society for Industrial and Applied
Mathematics Journal on Numerical Analysis, 13(6), pp,944-961.
[18] Lambert J.D., (1973), Computational Methods in Ordinary Differential Equa-
tions, London
[19] Lambert J.D., (1973), Computational Methods in Ordinary Differential Equa-
tions, London
[20] Lambert J.D., (1973), Computational Methods in Ordinary Differential Equa-
tions, London
[21] Lambert J.D., (1973), Computational Methods in Ordinary Differential Equa-
tions, London
93
[22] Lambert J.D., (1973), Computational Methods in Ordinary Differential Equa-
tions, London
[23] Lambert J.D., (1973), Computational Methods in Ordinary Differential Equa-
tions, London
[24] Lambert J.D., (1973), Computational Methods in Ordinary Differential Equa-
tions, London
[25] Lambert J.D., (1973), Computational Methods in Ordinary Differential Equa-
tions, London
[26] Lambert J.D., (1973), Computational Methods in Ordinary Differential Equa-
tions, London
[27] Lambert J.D., (1973), Computational Methods in Ordinary Differential Equa-
tions, London
[28] Lambert J.D., (1973), Computational Methods in Ordinary Differential Equa-
tions, London
[29] Lambert J.D., (1973), Computational Methods in Ordinary Differential Equa-
tions, London
[30] Lambert J.D., (1973), Computational Methods in Ordinary Differential Equa-
tions, London
[31] http://www.math.uiowa.edu/~atkinson/m171.dir/sec_6-3.pdf
[32] http://people.maths.ox.ac.uk/suli/nsodes.pdf
94
[33] http://people.maths.ox.ac.uk/suli/nsodes.pdf
[34] http://people.maths.ox.ac.uk/suli/nsodes.pdf
[35] http://people.maths.ox.ac.uk/suli/nsodes.pdf
[36] http://plato.asu.edu/MAT275/odes_matlab/Chapter12.pdf
[37] http://www.siam.org/books/ot98/sample/OT98Chapter7.pdf
95
96
APPENDICES
Appendix A. Explicit Euler method
.
97
Tabl
e1.
Exp
licit
Eul
erm
etho
dw
ithh=
0.1
forn=
10
ih
u app
(x)
v app
(x)
wap
p(x)
u(x)
v(x)
w(x
)∣ ∣ ∣ u( x)
−u a
pp(x
)∣ ∣ ∣∣ ∣ ∣ v(x)−
v app
(x)∣ ∣ ∣∣ ∣ ∣ w(x)
−w
app(
x)∣ ∣ ∣
00
22
−3
10.
1−0.4
2−1.2
−0.4
8705
11.
9289
8−1.2
4818
0.08
7050
70.
0710
187
0.04
8176
2
20.
2−2.9
21.
880.
48−3.2
6655
1.66
247
0.45
3554
0.34
6555
0.21
7527
0.02
6446
2
30.
3−5.7
161.
582.
112
−6.5
4554
1.09
432.
1734
90.
8295
430.
4857
0.06
1486
6
40.
4−8.9
668
1.01
723.
7632
−10.
5845
0.07
2777
93.
9806
51.
6176
90.
9444
220.
2174
49
50.
5−1
2.88
560.
0782
5.49
888−1
5.71
95−1.6
1707
5.94
757
2.83
384
1.69
527
0.44
8689
60.
6−1
7.73
44−1.3
9133
7.38
509−2
2.39
14−4.2
7789
8.15
319
4.65
705
2.88
656
0.76
8097
70.
7−2
3.84
11−3.6
0032
9.49
125−3
1.18
51−8.3
3348
10.6
867.
3439
84.
7331
61.
1947
7
80.
8−3
1.62
26−6.8
3033
11.8
928−4
2.88
13−1
4.37
4513.6
477
11.2
587
7.54
418
1.75
49
90.
9−4
1.61
27−1
1.45
9314.6
74−5
8.52
71−2
3.22
117.1
571
16.9
144
11.7
617
2.48
311
101−5
4.49
92−1
7.99
317.9
31−7
9.53
01−3
6.00
7821.3
552
25.0
3118.0
148
3.42
419
0 0.2 0.4 0.6 0.8 1−80
−60
−40
−20
0
20
40
h
u,v,
w
App1App2App3 Exact1Exact2Exact3
Figure 1. Graph of approximated solution and exact solution by using Explicit Eulermethod with h = 0.1
99
Tabl
e2.
Exp
licit
Eul
erm
etho
dw
ithh=
0.05
forn=
20
ih
u app
(x)
v app
( x)
wap
p( x
)u
( x)
v(x)
w( x
)∣ ∣ ∣ u( x)
−u a
pp( x
)∣ ∣ ∣∣ ∣ ∣ v( x)−
v app
( x)∣ ∣ ∣∣ ∣ ∣ w( x)
−w
app
( x)∣ ∣ ∣
00
22
−3
20.
1−0.4
31.
97−1.2
3−0.4
8705
11.
9289
8−1.2
4818
0.05
7050
70.
0410
187
0.01
8176
2
40.
2−3.0
5943
1.78
857
0.45
57−3.2
6655
1.66
247
0.45
3554
0.20
713
0.12
6102
0.00
2146
18
60.
3−6.0
636
1.37
712
2.12
604−6.5
4554
1.09
432.
1734
90.
4819
460.
2828
230.
0474
496
80.
4−9.6
5329
0.62
5441
3.84
796−1
0.58
450.
0727
779
3.98
065
0.93
1206
0.55
2664
0.13
2686
100.
5−1
4.09
02−0.6
1977
65.
6891
6−1
5.71
95−1.6
1707
5.94
757
1.62
932
0.99
7289
0.25
8412
120.
6−1
9.70
64−2.5
7043
7.72
071−2
2.39
14−4.2
7789
8.15
319
2.68
51.
7074
60.
4324
78
140.
7−2
6.93
02−5.5
1783
10.0
199−3
1.18
51−8.3
3348
10.6
864.
2548
82.
8156
50.
6661
3
160.
8−3
6.31
87−9.8
6065
12.6
731−4
2.88
13−1
4.37
4513.6
477
6.56
266
4.51
387
0.97
4611
180.
9−4
8.60
12−1
6.14
2315.7
792−5
8.52
71−2
3.22
117.1
571
9.92
589
7.07
873
1.37
796
201−6
4.73
67−2
5.10
1119.4
53−7
9.53
01−3
6.00
7821.3
552
14.7
934
10.9
067
1.90
212
0 0.2 0.4 0.6 0.8 1−80
−60
−40
−20
0
20
40
h
u,v,
w
App1App2App3 Exact1Exact2Exact3
Figure 2. Graph of approximated solution and exact solution by using Explicit Eulermethod with h = 0.05
101
Tabl
e3.
Exp
licit
Eul
erm
etho
dw
ithh=
0.02
5fo
rn=
40
ih
u app
( x)
v app
( x)
wap
p( x
)u(
x)v(
x)w
( x)
∣ ∣ ∣ u( x)−
u app
( x)∣ ∣ ∣∣ ∣ ∣ v( x)
−v a
pp( x
)∣ ∣ ∣∣ ∣ ∣ w( x)−
wap
p( x
)∣ ∣ ∣0
22
2−3
40.
1−0.4
548
1.95
116−1.2
405−0.4
871
1.92
898−1.2
482
0.03
221
0.02
218
0.00
766
80.
2−3.1
534
1.73
082
0.45
184−3.2
666
1.66
247
0.45
355
0.11
317
0.06
835
0.00
171
120.
3−6.2
851.
2480
22.
1454
1−6.5
455
1.09
432.
1734
90.
2605
90.
1537
20.
0280
8
160.
4−1
0.08
20.
3740
83.
9078
6−1
0.58
50.
0727
83.
9806
50.
5020
80.
3013
0.07
279
200.
5−1
4.84
1−1.0
716
5.80
898
−15.
72−1.6
171
5.94
757
0.87
899
0.54
545
0.13
859
240.
6−2
0.94−3.3
409
7.92
337−2
2.39
1−4.2
779
8.15
319
1.45
186
0.93
699
0.22
982
280.
7−2
8.87
7−6.7
8310.3
334−3
1.18
5−8.3
335
10.6
862.
3082
71.
5504
60.
3525
9
320.
8−3
9.30
8−1
1.88
13.1
326−4
2.88
1−1
4.37
513.6
477
3.57
381
2.49
438
0.51
516
360.
9−5
3.1−1
9.29
516.4
288−5
8.52
7−2
3.22
117.1
571
5.42
767
3.92
580.
7283
8
401−7
1.40
6−2
9.93
720.3
489−7
9.53−3
6.00
821.3
552
8.12
425
6.07
079
1.00
626
0 0.2 0.4 0.6 0.8 1−80
−60
−40
−20
0
20
40
h
u,v,
w
App1App2App3 Exact1Exact2Exact3
Figure 3. Graph of approximated solution and exact solution by using Explicit Eulermethod with h = 0.025
103
Tabl
e4.
Exp
licit
Eul
erm
etho
dw
ithh=
0.01
25fo
rn=
80
ih
u app
( x)
v app
( x)
wap
p( x
)u
( x)
v(x)
w( x
)∣ ∣ ∣ u( x)
−u a
pp( x
)∣ ∣ ∣∣ ∣ ∣ v( x)−
v app
( x)∣ ∣ ∣∣ ∣ ∣ w( x)
−w
app
( x)∣ ∣ ∣
00
22
−3
80.
1−0.4
6997
1.94
053
−1.2
447−0.4
8705
1.92
898−1.2
4818
0.01
7078
0.01
1553
0.00
3474
160.
2−3.2
0739
1.69
812
0.45
1996
−3.2
6655
1.66
247
0.45
3554
0.05
9165
0.03
565
0.00
1558
240.
3−6.4
099
1.17
462.
1583
3−6.5
4554
1.09
432.
1734
90.
1356
390.
0803
030.
0151
58
320.
4−1
0.32
340.
2304
413.
9425
8−1
0.58
450.
0727
783.
9806
50.
2610
890.
1576
630.
0380
73
400.
5−1
5.26
21−1.3
3113
5.87
58−1
5.71
95−1.6
1707
5.94
757
0.45
7359
0.28
5933
0.07
1772
480.
6−2
1.63
49−3.7
8579
8.03
466−2
2.39
14−4.2
7789
8.15
319
0.75
6507
0.49
2101
0.11
8523
560.
7−2
9.98
01−7.5
1763
10.5
045−3
1.18
51−8.3
3348
10.6
861.
205
0.81
5851
0.18
1523
640.
8−4
1.01
17−1
3.05
9413.3
826−4
2.88
13−1
4.37
4513.6
477
1.86
965
1.31
511
0.26
5073
720.
9−5
5.68
11−2
1.14
7116.7
823−5
8.52
71−2
3.22
117.1
571
2.84
601
2.07
393
0.37
4821
801
−75.
26−3
2.79
4220.8
371−7
9.53
01−3
6.00
7821.3
552
4.27
015
3.21
361
0.51
808
0 0.2 0.4 0.6 0.8 1−80
−60
−40
−20
0
20
40
h
u,v,
w
App1App2App3 Exact1Exact2Exact3
Figure 4. Graph of approximated solution and exact solution by using Explicit Eulermethod with h = 0.0125
105
Tabl
e5.
Exp
licit
Eul
erm
etho
dw
ithh=
0.00
625
forn=
160
ih
u app
( x)
v app
( x)
wap
p( x
)u
( x)
v(x)
w( x
)∣ ∣ ∣ u( x)
−u a
pp( x
)∣ ∣ ∣∣ ∣ ∣ v( x)−
v app
( x)∣ ∣ ∣∣ ∣ ∣ w( x)
−w
app
( x)∣ ∣ ∣
00
22
−3
160.
1−0.4
7826
11.
9348
8−1.2
4653−0.4
8705
11.
9289
8−1.2
4818
0.00
8789
670.
0058
9864
0.00
1648
6
320.
2−3.2
363
1.68
069
0.45
2598
−3.2
6655
1.66
247
0.45
3554
0.03
0253
40.
0182
149
0.00
0955
953
480.
3−6.4
7632
1.13
536
2.16
562
−6.5
4554
1.09
432.
1734
90.
0692
190.
0410
640.
0078
6322
640.
4−1
0.45
130.
1534
743.
9611
8−1
0.58
450.
0727
779
3.98
065
0.13
3188
0.08
0695
70.
0194
665
800.
5−1
5.48
61−1.4
7058
5.91
105
−15.
7195
−1.6
1707
5.94
757
0.23
3399
0.14
6485
0.03
6522
9
960.
6−2
2.00
51−4.0
2554
8.09
299
−22.
3914
−4.2
7789
8.15
319
0.38
6359
0.25
2353
0.06
0194
8
112
0.7−3
0.56
91−7.9
1468
10.5
939
−31.
1851
−8.3
3348
10.6
860.
6160
250.
4187
960.
0921
156
128
0.8−4
1.92
44−1
3.69
8713.5
132
−42.
8813
−14.
3745
13.6
477
0.95
6895
0.67
5778
0.13
4482
144
0.9−5
7.06
88−2
2.15
4216.9
67−5
8.52
71−2
3.22
117.1
571
1.45
837
1.06
683
0.19
0177
160
1−7
7.33
93−3
4.35
321.0
922
−79.
5301
−36.
0078
21.3
552
2.19
089
1.65
485
0.26
2934
0 0.2 0.4 0.6 0.8 1−80
−60
−40
−20
0
20
40
h
u,v,
w
App1App2App3 Exact1Exact2Exact3
Figure 5. Graph of approximated solution and exact solution by using Explicit Eulermethod with h = 0.00625
107
Tabl
e6.
Exp
licit
Eul
erm
etho
dw
ithh=
0.00
3125
forn=
320
ih
u app
( x)
v app
( x)
wap
p( x
)u
( x)
v(x)
w( x
)∣ ∣ ∣ u( x)
−u a
pp( x
)∣ ∣ ∣∣ ∣ ∣ v( x)−
v app
( x)∣ ∣ ∣∣ ∣ ∣ w( x)
−w
app
( x)∣ ∣ ∣
00
22
−3
320.
1−0.4
8259
21.
9319
6−1.2
4737−0.4
8705
11.
9289
8−1.2
4818
0.00
4458
430.
0029
8071
0.00
0802
203
640.
2−3.2
5126
1.67
168
0.45
3031
−3.2
6655
1.66
247
0.45
3554
0.01
5297
90.
0092
0782
0.00
0522
396
960.
3−6.5
1057
1.11
507
2.16
948
−6.5
4554
1.09
432.
1734
90.
0349
677
0.02
0767
10.
0040
0324
128
0.4−1
0.51
720.
1136
063.
9708
1−1
0.58
450.
0727
779
3.98
065
0.06
7272
20.
0408
286
0.00
9842
160
0.5−1
5.60
16−1.5
4291
5.92
915
−15.
7195
−1.6
1707
5.94
757
0.11
7913
0.07
4151
10.
0184
23
192
0.6−2
2.19
62−4.1
5008
8.12
285
−22.
3914
−4.2
7789
8.15
319
0.19
5268
0.12
7806
0.03
0334
6
224
0.7−3
0.87
36−8.1
2127
10.6
396
−31.
1851
−8.3
3348
10.6
860.
3115
030.
2122
120.
0464
025
256
0.8−4
2.39
72−1
4.03
1913.5
8−4
2.88
13−1
4.37
4513.6
477
0.48
4152
0.34
2612
0.06
7736
5
288
0.9−5
7.78
88−2
2.67
9917.0
614
−58.
5271
−23.
221
17.1
571
0.73
8337
0.54
1163
0.09
5793
8
320
1−7
8.42
02−3
5.16
7921.2
227
−79.
5301
−36.
0078
21.3
552
1.10
991
0.83
9907
0.13
2461
0 0.2 0.4 0.6 0.8 1−80
−60
−40
−20
0
20
40
h
u,v,
w
App1App2App3 Exact1Exact2Exact3
Figure 6. Graph of approximated solution and exact solution by using Explicit Eulermethod with h = 0.003125
109
Tabl
e7.
Exp
licit
Eul
erm
etho
dw
ithh=
0.00
1562
5fo
rn=
640
ih
u app
( x)
v app
( x)
wap
p( x
)u
( x)
v(x)
w( x
)∣ ∣ ∣ u( x)
−u a
pp( x
)∣ ∣ ∣∣ ∣ ∣ v( x)−
v app
( x)∣ ∣ ∣∣ ∣ ∣ w( x)
−w
app
( x)∣ ∣ ∣
00
22
−3
640.
1−0.4
8480
51.
9304
8−1.2
4778−0.4
8705
11.
9289
8−1.2
4818
0.00
2245
240.
0014
9832
0.00
0395
578
128
0.2−3.2
5886
1.66
710.
4532
81−3.2
6655
1.66
247
0.45
3554
0.00
7692
180.
0046
2937
0.00
0272
326
192
0.3−6.5
2797
1.10
474
2.17
147
−6.5
4554
1.09
432.
1734
90.
0175
745
0.01
0443
20.
0020
1961
256
0.4−1
0.55
070.
0933
143
3.97
57−1
0.58
450.
0727
779
3.98
065
0.03
3808
0.02
0536
40.
0049
4835
320
0.5−1
5.66
02−1.5
7976
5.93
832
−15.
7195
−1.6
1707
5.94
757
0.05
9264
20.
0373
064
0.00
9252
19
384
0.6−2
2.29
33−4.2
1357
8.13
796
−22.
3914
−4.2
7789
8.15
319
0.09
8163
90.
0643
174
0.01
5227
1
448
0.7−3
1.02
85−8.2
2666
10.6
627
−31.
1851
−8.3
3348
10.6
860.
1566
380.
1068
220.
0232
882
512
0.8−4
2.63
78−1
4.20
213.6
137
−42.
8813
−14.
3745
13.6
477
0.24
3526
0.17
2509
0.03
3993
4
576
0.9−5
8.15
56−2
2.94
8517.1
091
−58.
5271
−23.
221
17.1
571
0.37
1497
0.27
2556
0.04
8075
1
640
1−7
8.97
15−3
5.58
4721.2
887
−79.
5301
−36.
0078
21.3
552
0.55
8639
0.42
3136
0.06
6481
9
0 0.2 0.4 0.6 0.8 1−80
−60
−40
−20
0
20
40
h
u,v,
w
App1App2App3 Exact1Exact2Exact3
Figure 7. Graph of approximated solution and exact solution by using Explicit Eulermethod with h = 0.0015625
111
Appendix B. Fourth Order Runge Kutta method
.
112
Tabl
e8.
Four
thO
rder
Run
geK
utta
met
hod
with
h=0.
1fo
rn=
10
ih
u app
( x)
v app
( x)
wap
p( x
)u
( x)
v(x)
w( x
)∣ ∣ ∣ u( x)
−u a
pp( x
)∣ ∣ ∣∣ ∣ ∣ v( x)−
v app
( x)∣ ∣ ∣∣ ∣ ∣ w( x)
−w
app
( x)∣ ∣ ∣
00
22
−3
10.
1−0.4
8695
1.92
905
−1.2
482−0.4
8705
1.92
9−1.2
4818
0.00
0101
6.87
E−
052.
38E−
05
20.
2−3.2
663
1.66
2663
0.45
3508
−3.2
6656
1.66
250.
4535
540.
0002
550.
0001
94.
56E−
05
30.
3−6.5
4505
1.09
4692
2.17
3418
−6.5
4554
1.09
432.
1734
870.
0004
970.
0003
926.
82E−
05
40.
4−1
0.58
360.
0734
963.
9805
55−1
0.58
450.
0727
783.
9806
490.
0008
720.
0007
189.
43E−
05
50.
5−1
5.71
8−1.6
1584
5.94
7442
−15.
7195
−1.6
171
5.94
7569
0.00
145
0.00
1231
0.00
0127
60.
6−2
2.38
91−4.2
7587
8.15
3016
−22.
3914
−4.2
779
8.15
3185
0.00
2326
0.00
2022
0.00
0169
70.
7−3
1.18
15−8.3
3026
10.6
8579−3
1.18
51−8.3
335
10.6
8602
0.00
3642
0.00
3225
0.00
0225
80.
8−4
2.87
57−1
4.36
9513.6
4742−4
2.88
13−1
4.37
513.6
4772
0.00
5598
0.00
5031
0.00
0299
90.
9−5
8.51
87−2
3.21
3317.1
5675−5
8.52
71−2
3.22
117.1
5715
0.00
8483
0.00
7717
0.00
0397
101−7
9.51
74−3
5.99
6121.3
5463−7
9.53
01−3
6.00
821.3
5516
0.01
2707
0.01
168
0.00
0526
0 0.2 0.4 0.6 0.8 1−80
−60
−40
−20
0
20
40
h
u,v,
w
App1App2App3 Exact1Exact2Exact3
Figure 8. Graph of approximated solution and exact solution by using Explicit RK4method with h = 0.1
114
Tabl
e9.
Four
thO
rder
Run
geK
utta
met
hod
with
h=0.
05fo
rn=
20
ih
u app
( x)
v app
( x)
wap
p( x
)u
( x)
v(x)
w( x
)∣ ∣ ∣ u( x)
−u a
pp( x
)∣ ∣ ∣∣ ∣ ∣ v( x)−
v app
( x)∣ ∣ ∣∣ ∣ ∣ w( x)
−w
app
( x)∣ ∣ ∣
00
22
−3
20.
1−0.4
8704
381.
9289
86−1.2
4817
8−0.4
8705
071.
929
−1.2
4817
66.
92E−
064.
91E−
061.
45E−
06
40.
2−3.2
6653
71.
6624
870.
4535
51−3.2
6655
51.
6625
0.45
3553
81.
77E−
051.
35E−
052.
83E−
06
60.
3−6.5
4550
81.
0943
282.
1734
82−6.5
4554
31.
0943
2.17
3487
3.48
E−
052.
79E−
054.
30E−
06
80.
4−1
0.58
443
0.07
2829
033.
9806
43−1
0.58
449
0.07
2778
3.98
0649
6.13
E−
055.
12E−
056.
05E−
06
100.
5−1
5.71
938−1.6
1697
85.
9475
61−1
5.71
948−1.6
171
5.94
7569
0.00
0102
135
8.76
E−
058.
25E−
06
120.
6−2
2.39
126−4.2
7774
48.
1531
74−2
2.39
142−4.2
779
8.15
3185
0.00
0164
166
0.00
0143
872
1.11
E−
05
140.
7−3
1.18
484−8.3
3325
110.6
86−3
1.18
51−8.3
335
10.6
8602
0.00
0257
318
0.00
0229
322
1.49
E−
05
160.
8−4
2.88
093−1
4.37
415
13.6
477
−42.
8813
3−1
4.37
513.6
4772
0.00
0395
824
0.00
0357
608
2.00
E−
05
180.
9−5
8.52
653−2
3.22
049
17.1
5712
−58.
5271
3−2
3.22
117.1
5715
0.00
0600
045
0.00
0548
329
2.67
E−
05
201
−79.
5292
4−3
6.00
698
21.3
5512
−79.
5301
4−3
6.00
821.3
5516
0.00
0899
018
0.00
0829
558
3.55
E−
05
0 0.2 0.4 0.6 0.8 1−80
−60
−40
−20
0
20
40
h
u,v,
w
App1App2App3 Exact1Exact2Exact3
Figure 9. Graph of approximated solution and exact solution by using Explicit RK4method with h = 0.05
116
Tabl
e10
.Fou
rth
Ord
erR
unge
Kut
tam
etho
dw
ithh=
0.02
5fo
rn=
40
ih
u app
( x)
v app
( x)
wap
p( x
)u
( x)
v(x)
w( x
)∣ ∣ ∣ u( x)
−u a
pp( x
)∣ ∣ ∣∣ ∣ ∣ v( x)−
v app
( x)∣ ∣ ∣∣ ∣ ∣ w( x)
−w
app
( x)∣ ∣ ∣
00
22
−3
40.
1−0.4
871
1.92
898−1.2
482−0.4
871
1.92
9−1.2
482
4.55
E−
073.
28E−
079.
00E−
08
80.
2−3.2
666
1.66
247
0.45
355−3.2
666
1.66
250.
4535
51.
17E−
069.
04E−
071.
77E−
07
120.
3−6.5
455
1.09
432.
1734
9−6.5
455
1.09
432.
1734
92.
30E−
061.
87E−
062.
71E−
07
160.
4−1
0.58
40.
0727
83.
9806
5−1
0.58
40.
0727
83.
9806
54.
06E−
063.
41E−
063.
84E−
07
200.
5−1
5.71
9−1.6
171
5.94
757−1
5.71
9−1.6
171
5.94
757
6.78
E−
065.
85E−
065.
27E−
07
240.
6−2
2.39
1−4.2
779
8.15
319−2
2.39
1−4.2
779
8.15
319
1.09
E−
059.
60E−
067.
15E−
07
280.
7−3
1.18
5−8.3
335
10.6
86−3
1.18
5−8.3
335
10.6
861.
71E−
051.
53E−
059.
63E−
07
320.
8−4
2.88
1−1
4.37
413.6
477−4
2.88
1−1
4.37
513.6
477
2.63
E−
052.
38E−
051.
29E−
06
360.
9−5
8.52
7−2
3.22
117.1
572−5
8.52
7−2
3.22
117.1
572
3.99
E−
053.
65E−
051.
73E−
06
401
−79.
53−3
6.00
821.3
552−7
9.53
−36.
008
21.3
552
5.98
E−
055.
53E−
052.
30E−
06
0 0.2 0.4 0.6 0.8 1−80
−60
−40
−20
0
20
40
h
u,v,
w
App1App2App3 Exact1Exact2Exact3
Figure 10. Graph of approximated solution and exact solution by using Explicit RK4method with h = 0.025
118
Tabl
e11
.Fou
rth
Ord
erR
unge
Kut
tam
etho
dw
ithh=
0.01
25fo
rn=
80
ih
u app
( x)
v app
( x)
wap
p( x
)u
( x)
v(x)
w( x
)∣ ∣ ∣ u( x)
−u a
pp( x
)∣ ∣ ∣∣ ∣ ∣ v( x)−
v app
( x)∣ ∣ ∣∣ ∣ ∣ w( x)
−w
app
( x)∣ ∣ ∣
00
22
−3
80.
1−0.4
8705
071.
9289
81−1.2
4817
6−0.4
8705
071.
929
−1.2
4817
62.
91E−
082.
12E−
085.
60E−
09
160.
2−3.2
6655
51.
6624
730.
4535
538−3.2
6655
51.
6625
0.45
3553
87.
52E−
085.
84E−
081.
11E−
08
240.
3−6.5
4554
21.
0943
2.17
3487
−6.5
4554
31.
0943
2.17
3487
1.48
E−
071.
21E−
071.
70E−
08
320.
4−1
0.58
449
0.07
2778
13.
9806
49−1
0.58
449
0.07
2778
3.98
0649
2.62
E−
072.
20E−
072.
42E−
08
400.
5−1
5.71
948−1.6
1706
55.
9475
69−1
5.71
948−1.6
171
5.94
7569
4.37
E−
073.
78E−
073.
33E−
08
480.
6−2
2.39
142−4.2
7788
88.
1531
85−2
2.39
142−4.2
779
8.15
3185
7.03
E−
076.
20E−
074.
53E−
08
560.
7−3
1.18
51−8.3
3347
910.6
8602
−31.
1851
−8.3
335
10.6
8602
1.10
E−
069.
87E−
076.
12E−
08
640.
8−4
2.88
132−1
4.37
451
13.6
4772
−42.
8813
3−1
4.37
513.6
4772
1.70
E−
061.
54E−
068.
22E−
08
720.
9−5
8.52
713−2
3.22
104
17.1
5715
−58.
5271
3−2
3.22
117.1
5715
2.57
E−
062.
36E−
061.
10E−
07
801
−79.
5301
3−3
6.00
781
21.3
5516
−79.
5301
4−3
6.00
821.3
5516
3.86
E−
063.
57E−
061.
47E−
07
0 0.2 0.4 0.6 0.8 1−80
−60
−40
−20
0
20
40
h
u,v,
w
App1App2App3 Exact1Exact2Exact3
Figure 11. Graph of approximated solution and exact solution by using Explicit RK4method with h = 0.0125
120
Tabl
e12
.Fou
rth
Ord
erR
unge
Kut
tam
etho
dw
ithh=
0.00
625
forn=
160
ih
u app
( x)
v app
( x)
wap
p( x
)u
( x)
v(x)
w( x
)∣ ∣ ∣ u( x)
−u a
pp( x
)∣ ∣ ∣∣ ∣ ∣ v( x)−
v app
( x)∣ ∣ ∣∣ ∣ ∣ w( x)
−w
app
( x)∣ ∣ ∣
00
22
−3
160.
1−0.4
8705
071.
9289
81−1.2
4817
6−0.4
8705
071.
929
−1.2
4817
61.
84E−
091.
35E−
093.
50E−
10
320.
2−3.2
6655
51.
6624
730.
4535
538−3.2
6655
51.
6625
0.45
3553
84.
77E−
093.
71E−
096.
91E−
10
480.
3−6.5
4554
31.
0943
2.17
3487
−6.5
4554
31.
0943
2.17
3487
9.38
E−
097.
66E−
091.
07E−
09
640.
4−1
0.58
449
0.07
2777
893.
9806
49−1
0.58
449
0.07
2778
3.98
0649
1.66
E−
081.
40E−
081.
52E−
09
800.
5−1
5.71
948−1.6
1706
55.
9475
69−1
5.71
948−1.6
171
5.94
7569
2.77
E−
082.
40E−
082.
10E−
09
960.
6−2
2.39
142−4.2
7788
88.
1531
85−2
2.39
142−4.2
779
8.15
3185
4.46
E−
083.
94E−
082.
85E−
09
112
0.7
−31.
1851
−8.3
3348
10.6
8602
−31.
1851
−8.3
335
10.6
8602
7.00
E−
086.
27E−
083.
86E−
09
128
0.8−4
2.88
133−1
4.37
451
13.6
4772
−42.
8813
3−1
4.37
513.6
4772
1.08
E−
079.
77E−
085.
19E−
09
144
0.9−5
8.52
713−2
3.22
104
17.1
5715
−58.
5271
3−2
3.22
117.1
5715
1.63
E−
071.
50E−
076.
94E−
09
160
1−7
9.53
014−3
6.00
781
21.3
5516
−79.
5301
4−3
6.00
821.3
5516
2.45
E−
072.
27E−
079.
26E−
09
0 0.2 0.4 0.6 0.8 1−80
−60
−40
−20
0
20
40
h
u,v,
w
App1App2App3 Exact1Exact2Exact3
Figure 12. Graph of approximated solution and exact solution by using Explicit RK4method with h = 0.00625
122