UNIVERSITI PUTRA MALAYSIA
DIAGONALLY IMPLICIT RUNGE-KUTTA METHODS FOR SOLVING
LINEAR ORDINARY DIFFERENTIAL EQUATIONS
NUR IZZATI BINTI CHE JAWIAS
DIAGONALLY IMPLICIT RUNGE-KUTTA METHODS FOR SOLVING LINEAR ORDINARY DIFFERENTIAL EQUATIONS
By
NUR IZZATI BINTI CHE JAWIAS
Thesis Submitted to the School of Graduate Studies, Universiti Putra Malaysia, in Fulfilment of the Requirements for the Degree of Master of
Science
Abstract of thesis presented to the Senate of Universiti Putra Malaysia in fulfilment of the requirement for the degree of Master of Science
DIAGONALLY IMPLICIT RUNGE-KUTTA METHODS FOR SOLVING LINEAR ORDINARY DIFFERENTIAL EQUATIONS
By
NUR IZZATI BINTI CHE JAWIAS
July 2009
Chairman : Fudziah Binti Ismail, PhD Faculty : Faculty of Science
This thesis deals with the derivation of diagonally implicit Runge-Kutta (DIRK) methods which are specially designed for the integration of linear ordinary differential equations (LODEs). The restriction to LODEs with constant coefficients reduces the number of order equations which the coefficients of Runge-Kutta (RK) methods must satisfy. This freedom is used to construct new methods which are more efficient compared to the conventional RK methods.
Having achieved a particular order of accuracy, the best strategy for practical purposes would be to choose the coefficients of the RK methods such that the error norm is minimized. The free parameters chosen are obtained from the
minimized error norm. This resulted in methods which are almost one order higher than the actual order. In this thesis we construct a fourth order DIRK method without taking into account the error norm. We also construct fourth and fifth order DIRK methods using the minimized error norm.
The stability aspects of the methods are investigated by finding the stability polynomials of the methods, which are then solved to obtain the stability regions using MATHEMATICA package. The methods are found to have bigger regions of stability compared to the explicit Runge-Kutta (ERK) methods of the same type (designed for the integration of LODEs). Later, we built codes using C++ programming based on the methods. Sets of test problems on linear ordinary differential equations are used to validate the methods and numerical results show that the new methods produce smaller global error compared to ERK methods. From the stability regions and numerical results obtained, we can conclude that the new DIRK methods are more stable and more accurate compared to the explicit one. Higher order methods also gives better result compared to lower order methods.
Abstrak tesis yang dikemukakan kepada Senat Universiti Putra Malaysia sebagai memenuhi keperluan untuk ijazah Master Sains
KAEDAH RUNGE-KUTTA PEPENJURU TERSIRAT UNTUK MENYELESAIKAN PERSAMAAN PEMBEZAAN PERINGKAT BIASA
YANG LINEAR
Oleh
NUR IZZATI BINTI CHE JAWIAS
Julai 2009
Pengerusi : Fudziah Binti Ismail, PhD Fakulti : Fakulti Sains
Tesis ini membincang tentang penerbitan kaedah Runge-Kutta pepenjuru tersirat yang diterbitkan khas untuk menyelesaikan persamaan perbezaan peringkat biasa (PPB) yang linear. Pembatasan kepada PPB yang linear sahaja dengan pekali-pekali tetap mengurangkan jumlah persamaan peringkat yang perlu dipenuhi oleh kaedah Runge-Kutta (RK). Kelonggaran ini digunakan untuk menerbitkan kaedah baru yang lebih efisien berbanding kaedah RK yang biasa.
Dengan mencapai peringkat kejituan yang khusus, strategi terbaik untuk tujuan praktikal adalah pemilihan pekali-pekali bagi kaedah RK contohnya dengan meminimumkan ralat norma. Parameter bebas dipilih hasil daripada kaedah
meminimumkan ralat norma ini. Ini menghasilkan kaedah yang hampir mempunyai satu peringkat lebih tinggi daripada peringkat yang sebenarnya. Dalam tesis ini, kami telah menerbitkan kaedah RK pepenjuru tersirat peringkat keempat tanpa mengambil kira ralat normanya. Kami juga telah menerbitkan kaedah RK pepenjuru tersirat peringkat keempat dan kelima dengan meminimumkan ralat normanya terlebih dahulu.
Aspek kestabilan untuk setiap kaedah diselidik dengan mencari polinomial kestabilan dan menyelesaikannya untuk mendapatkan rantau kestabilan dengan menggunakan pakej MATHEMATICA. Kaedah yang baru diterbitkan ini didapati mempunyai rantau kestabilan yang lebih besar berbanding kaedah RK tak tersirat dalam jenis yang sama (digunakan untuk menyelesaikan PPB yang linear). Kemudian, kod-kod berasaskan kaedah ini dibina menggunakan pengaturcaraan C++. Beberapa set masalah persamaan pembezaan biasa yang linear digunakan untuk menentusahkan kaedah-kaedah dan keputusan berangka menunjukkan kaedah baru ini menghasilkan ralat global yang lebih kecil berbanding kaedah RK tak tersirat. Daripada rantau kestabilan dan keputusan berangka yang diperolehi tersebut, kita dapat membuat kesimpulan bahawa kaedah RK pepenjuru tersirat yang baru ini lebih stabil dan lebih jitu berbanding kaedah RK tak tersirat. Kaedah peringkat lebih tinggi juga memberikan keputusan yang lebih baik berbanding kaedah peringkat rendah.
ACKNOWLEDGEMENTS
First and foremost, praise to Allah S.W.T. for giving me strength, courage and patience in completing this research. My heartfelt thanks, unending gratitude and appreciation goes to my husband, Mohamad Hanuzul Mohamad Azam, mum, Hasnah Daud and dad, Che Jawias Che Mat, for their patience, understanding, encouragement and prays for my success without which this thesis would not have been materialized.
I would like to express my sincere and deepest gratitude to the chairman of the supervisory committee, Associate Professor Dr Fudziah Ismail, for her wise council, guidance, invaluable advice and constant encouragement, which always led me to the right research direction. This work could not have been carried out without both direct and indirect help and support from her. Thanks to my supervisory committee members, Professor Dato’ Dr Mohamed Suleiman and Associate Professor Dr Azmi Jaafar for their advice and motivation towards the completion of this thesis.
Special thanks due to Universiti Malaysia Terengganu for providing me the financial support in the form of Academic Training Scheme for Bumiputera (SLAB) under the Ministry of Higher Education, throughout the duration of my studies.
Finally, my deepest appreciation goes to all my friends especially Ummul Khair Salma Din and Ahmad Fadly Nurullah Rasedee who have helped me most in doing my programming. Thank you also to everyone in the Mathematics Department Universiti Putra Malaysia who has helped in one way or another, and made my master research duration a very memorable and challenging one.
I certify that a Thesis Examination Committee has met on 6 July 2009 to conduct the final examination of Nur Izzati Binti Che Jawias on her thesis entitled “Diagonally Implicit Runge-Kutta Methods for Solving Linear Ordinary Differential Equations” in accordance with the Universities and University Colleges Act 1971 and the Constitution of the Universiti Putra Malaysia [P.U.(A) 106] 15 March 1998. The Committee recommends that the student be awarded the Master of Science.
Members of the Thesis Examination Committee were as follows: Malik Bin Hj Abu Hassan, PhD
Professor
Faculty of Science
Universiti Putra Malaysia (Chairman)
Mohd Noor Bin Saad, PhD Faculty of Science
Universiti Putra Malaysia (Internal Examiner)
Norihan Binti Md. Arifin, PhD Associate Professor
Faculty of Science
Universiti Putra Malaysia (Internal Examiner)
Jumat Bin Sulaiman, PhD Associate Professor
Pusat Remote Sensing dan GIS Universiti Malaysia Sabah (External Examiner)
________________________ BUJANG KIM HUAT, PhD Professor and Deputy Dean School of Graduate Studies Universiti Putra Malaysia
Date: 27 August 2009
This thesis was submitted to the Senate of Universiti Putra Malaysia and has been accepted as fulfillment of the requirement for the degree of Master of Science. The members of the Supervisory Committee were as follows:
Fudziah Binti Ismail, PhD Associate Professor
Faculty of Science
Universiti Putra Malaysia (Chairman)
Mohamed Bin Suleiman, PhD Professor
Faculty of Science
Universiti Putra Malaysia (Member)
Azmi Bin Jaafar, PhD Associate Professor
Faculty of Science Computer and Information Technology Universiti Putra Malaysia
(Member)
________________________________ HASANAH MOHD. GHAZALI, PhD Professor and Dean
School of Graduate Studies Universiti Putra Malaysia Date: 11 September 2009
DECLARATION
I declare that the thesis is my original work except for quotations and citations which have been duly acknowledged. I also declare that it has not been previously, and is not concurrently, submitted for any other degree at Universiti Putra Malaysia or at any other institution.
______________________________ NUR IZZATI BINTI CHE JAWIAS
Date: 23 July 2009
TABLE OF CONTENTS Page ABSTRACT ii ABSTRAK iv ACKNOWLEDGEMENTS vi APPROVAL viii DECLARATION x
LIST OF TABLES xiii
LIST OF FIGURES xv
LIST OF ABBREVIATIONS xvi
CHAPTER 1 INTRODUCTION AND OBJECTIVES 1.1 Introduction 1
1.2 Numerical Methods 2
1.3 Runge-Kutta Methods 4
1.4 Ordinary Differential Equations 7
1.4.1 Definitions 8
1.4.2 Reduction to a First Order System 10
1.5 Linear Ordinary Differential Equations 12
1.5.1 Homogeneous Equations 12
1.5.2 Non-homogeneous Equations 13
1.5.3 Fundamental Systems for Homogeneous Equations with Constant Coefficients 14
1.5.4 Examples of Differential Equations 15
1.6 Objectives of the Studies 20
1.7 Planning of the Thesis 21
2 LITERATURE REVIEW 2.1 Background to Diagonally Implicit Runge-Kutta Methods 23
2.2 Review on Runge-Kutta Methods for Linear Ordinary Differential Equations 24
2.3 Review on Runge-Kutta Methods with Minimized Error Norm 25
2.4 Literature on Stability of Runge-Kutta Methods 26
2.5 Background to Mildly Stiff Systems 29
3 DIAGONALLY IMPLICIT RUNGE-KUTTA METHOD FOR LINEAR ORDINARY DIFFERENTIAL EQUATIONS 3.1 Introduction 31
3.2 Derivation of Fourth Order Four-Stage Diagonally Implicit Runge-Kutta Method 35
3.3 Stability Analysis of the Method 39
3.4 Stability Region of Fourth Order Four-Stage Explicit Runge-Kutta Method 42
3.5 Test Problems 44
3.6 Numerical Results 48
3.7 Discussion and Conclusion 55
4 FOURTH ORDER FOUR-STAGE DIAGONALLY IMPLICIT RUNGE-KUTTA METHOD FOR LINEAR ORDINARY DIFFERENTIAL EQUATIONS WITH MINIMIZED ERROR NORM 4.1 Introduction 57
4.2 Derivation of Fourth Order Four-Stage Diagonally Implicit Runge-Kutta Method with Minimized Error Norm 60
4.3 Stability Analysis of the Method 67
4.4 Test Problems 69
4.5 Numerical Results 72
4.6 Discussion and Conclusion 80
5 FIFTH ORDER FIVE-STAGE DIAGONALLY IMPLICIT RUNGE-KUTTA METHOD FOR LINEAR ORDINARY DIFFERENTIAL EQUATIONS WITH MINIMIZED ERROR NORM 5.1 Introduction 81
5.2 Derivation of Fifth Order Five-Stage Diagonally Implicit Runge-Kutta Method with Minimized Error Norm 82
5.3 Stability Analysis of the Method 90
5.4 Stability Region of Fifth Order Five-Stage Explicit Runge-Kutta Method 93
5.5 Test Problems 95
5.6 Numerical Results 98
5.7 Discussion and Conclusion 105
6 CONCLUSION 6.1 Introduction 106
6.2 Comparison of Stability Region 106
6.3 Comparison of Error 108
6.4 Overall Conclusion 109
6.5 Recommendations for Future Research 110
REFERENCES 111
APPENDICES 114
BIODATA OF STUDENT 134
LIST OF PUBLICATIONS 135
LIST OF TABLES
Table Page
3.1 Runge-Kutta order equations for order 1 to 6 32 3.2 New DIRK4 method for LODEs with ߛ 0.20 ൌ 38
ߛ ൌ
3.3 Performance of comparison between New DIRK4, ERK4 and ERK4(II) for solving Problem 3.1 for values of
H = 0.1 to 0.001 49
3.4 Performance of comparison between New DIRK4, ERK4 and ERK4(II) for solving Problem 3.2 for values of
H = 0.1 to 0.001 50
3.5 Performance of comparison between New DIRK4, ERK4 and ERK4(II) for solving Problem 3.3 for values of
H = 0.1 to 0.001 51
3.6 Performance of comparison between New DIRK4, ERK4 and ERK4(II) for solving Problem 3.4 for values of
H = 0.1 to 0.001 52
3.7 Performance of comparison between New DIRK4, ERK4 and ERK4(II) for solving Problem 3.5 for values of
H = 0.1 to 0.0001 53
3.8 Performance of comparison between New DIRK4, ERK4 and ERK4(II) for solving Problem 3.6 for values of
H = 0.025 to 0.001 54 3.9 Performance of comparison between New DIRK4, ERK4
and ERK4(II) for solving Problem 3.7 for values of
H = 0.005 to 0.0001 54 4.1 New DIRKM4 method for LODEs with
0.091291733465251 66
4.2 Performance of comparison between New DIRKM4, ERK4 and SDIRK44 for solving Problem 4.1 for values of
H = 0.1 to 0.001 74
4.3 Performance of comparison between New DIRKM4, ERK4 and SDIRK44 for solving Problem 4.2 for values of
H = 0.1 to 0.001 75
4.4 Performance of comparison between New DIRKM4, ERK4 and SDIRK44 for solving Problem 4.3 for values of
H = 0.1 to 0.001 76
4.5 Performance of comparison between New DIRKM4, ERK4 and SDIRK44 for solving Problem 4.4 for values of
H = 0.1 to 0.001 77
4.6 Performance of comparison between New DIRKM4, ERK4 and SDIRK44 for solving Problem 4.5 for values of
H = 0.1 to 0.001 78
4.7 Performance of comparison between New DIRKM4, ERK4 and SDIRK44 for solving Problem 4.6 for values of
H = 0.1 to 0.001 79
5.1 Numbers of RK error coefficients for orders up to 10 81 5.2 Performance of comparison between New DIRKM5,
ERK5 and SDIRK45 for solving Problem 5.1 for values of
H = 0.1 to 0.001 99
5.3 Performance of comparison between New DIRKM5, ERK5 and SDIRK45 for solving Problem 5.2 for values of
H = 0.1 to 0.001 100
5.4 Performance of comparison between New DIRKM5, ERK5 and SDIRK45 for solving Problem 5.3 for values of
H = 0.1 to 0.001 101
5.5 Performance of comparison between New DIRKM5, ERK5 and SDIRK45 for solving Problem 5.4 for values of
H = 0.1 to 0.001 102
5.6 Performance of comparison between New DIRKM5, ERK5 and SDIRK45 for solving Problem 5.5 for values of
H = 0.1 to 0.001 103
5.7 Performance of comparison between New DIRKM5, ERK5 and SDIRK45 for solving Problem 5.6 for values of
H = 0.1 to 0.0001 104
6.1 Comparison on the number of error coefficients for the new
RK methods and the classical RK methods 109
LIST OF FIGURES
Figure Page
3.1 The stability region for new DIRK4 method 42 3.2 The stability region for ERK4 method 43 4.1 The stability region for new DIRKM4 method 68 5.1 The stability region for new DIRKM5 method 92 5.2 The stability region for ERK5 method 94 6.1 Comparison of stability regions between ERK4, new DIRK4 and
new DIRKM4 106
6.2 Comparison of stability regions between ERK5 and new DIRKM5 107
xvi
LIST OF ABBREVIATIONS
DIRK : Diagonally Implicit Runge-Kutta
DIRK4 : Fourth Order Four-Stage Diagonally Implicit Runge-Kutta
DIRKM4 : Fourth Order Four-Stage Diagonally Implicit Runge-Kutta With Minimized Error Norm
DIRKM5 : Fifth Order Five-Stage Diagonally Implicit Runge-Kutta With Minimized Error Norm
ERK : Explicit Runge-Kutta
ERK4 : Fourth Order Four-Stage Explicit Runge-Kutta ERK5 : Fifth Order Five-Stage Explicit Runge-Kutta IRK : Implicit Runge-Kutta
IVP : Initial Value Problem
LODE : Linear Ordinary Differential Equation LODEs : Linear Ordinary Differential Equations ODE : Ordinary Differential Equation
ODEs : Ordinary Differential Equations PDE : Partial Differential Equation PDEs : Partial Differential Equations RK : Runge-Kutta
SDIRK : Singly Diagonally Implicit Runge-Kutta
SDIRK44 : Fourth Order Four-Stage Singly Diagonally Implicit Runge-Kutta SDIRK45 : Fourth Order Five-Stage Singly Diagonally Implicit Runge-Kutta
CHAPTER 1
INTRODUCTION AND OBJECTIVES
1.1 Introduction
Many problems of science and engineering are reduced to quantifiable form through the process of mathematical modeling. The equations arising often are expressed in terms of the unknown quantities and their derivatives. Such equations are called differential equations. The solutions of these equations have exercised the ingenuity of great mathematicians since the time of Newton, resulting in many powerful analytical techniques are available to the modern scientist. However, prior to the development of sophisticated computing machinery, only a small fraction of the differential equations of applied mathematics were accurately solved. Although a model equations based on established physical laws may be constructed, analytical tools frequently are inadequate for its solutions. Such a restriction makes impossible any long term predictions which might be sought. In order to achieve any solution it was necessary to simplify the differential equations, thus compromising the validity of the mathematical modeling which had been applied.
Differential equation is an equation involving an unknown function and one or more of its derivatives. Differential equations can be classified either as ordinary or as partial. An ordinary differential equation (ODE) is a differential equation in
which the function in question is a function of only one variable. A partial differential equation (PDE) is a differential equation in which the function of interest depends on two or more variables. Differential equations also are classified by their order. The order of a differential equation is simply the order of the highest order derivative explicitly appearing in the equation.
Some mathematical problems are very difficult or impossible to solve analytically, therefore numerical methods are the only way to deal with these kinds of problems. Nearly every area of modern industry, science and engineering relies heavily on numerical methods to solve its problems.
1.2 Numerical methods
Since analytical methods are not adequate for finding accurate solutions to most differential equations, numerical methods are required. The ideal objective, in employing a numerical method, is to compute a solution of specified accuracy to the differential equation. Sometimes this is achieved by computing several solutions using a method which has known error characteristics. Rather than a mathematical formula, the numerical method yields a sequence of points close to the solution curve for the problem. Classical techniques sample the solution at equally spaced (in the independent variable) points but modern processes generally yield solutions at intervals depending on the control of truncation error. Of course, it is expected that these processes will be implemented on computers rather than being dependent on hand calculation.
Numerical methods for the solution of ordinary differential equations (ODEs) of initial value type are usually categorized as single step or multistep processes. The first method used information provided about the solution at a single initial point to yield an approximation to the solution at a new one. In contrast, multistep processes are based on a sequence of previous solution and derivative values. Each of these schemes has its advantages and disadvantages, and many practitioners prefer one or the other technique. Such a preference may arise from the requirements of the problem being solved. The general view is that different types of numerical processes should be matched to the user’s objectives.
These is a common tendency for engineers and scientists employing numerical procedures to select an easy looking method on the grounds that it is mathematically consistent, and that raw computing power will deliver the appropriate results. This attitude is somewhat contradictory since the methods usually found in text books were developed many years ago when the most advanced computing machine available was dependent literally on manual power. The assumption that such processes can be efficient in modern circumstances is dangerously flawed and quite often it leads to hopelessly inaccurate solutions. A major aim of the present thesis is to present powerful, up-to-date, numerical methods for differential equations in a form which is accessible to non-specialists.
1.3 Runge-Kutta Methods
In numerical analysis, the Runge–Kutta (RK) methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. These techniques were developed around 1900 by the German mathematicians C. Runge and M.W. Kutta. The idea of generalizing the Euler method, by allowing for a number of evaluations of the derivative to take place in a step, is generally attributed to Runge (1895).
Further contributions were made by Huen (1900), and by Kutta (1901). The latter completely characterized the set of RK methods of order 4, and proposed the first methods of order 5. Special methods for second-order differential equations were proposed by Nystrom (1925), who also contributed to the development of methods for first-order equations. It was not until the work of Huta (1957) that sixth-order methods were introduced.
Then, Butcher (1963) did the advances in the development and simplification of RK error coefficients. It is very hard to find the error coefficients and local truncation error for higher order. So, Butcher introduced the convenient way to display the coefficients, known as Butcher array using Butcher’s order conditions.
Since the advent of digital computers, fresh interest has been focused on RK methods, and a large number of research workers have contributed to recent
extensions to the theory, and to the development of particular methods. Although early studies were devoted entirely in explicit Runge-Kutta (ERK) methods, interest has now moved to include implicit methods, which have become recognized as appropriate for the solution of stiff differential equations.
The general s-stage RK method for any initial value problems
(1.1) , , ∑ , ∑ , 1,2,… , ∑ , 1,2,… , is defined by (1.2) where .
We shall always assume that the row-sum condition holds;
. (1.3)
It is convenient to display the coefficients occurring in the general RK form, known as Butcher tableau;
6
, , … , , , , … , ,
If in (1.2) we have that 0 for , 1,2,… , then each of is given explicitly in term of previously computed , 1,2,… 1, and the method is
then an explicit or classical RK method. If this is not the case then the method is implicit, and in general, it is necessary to solve at each step of the computation an implicit system for . Summarizing, we have;
Explicit method:
0, , 1,2,… , strictly lower triangular.
Semi-implicit method:
0, , 1,2,… , lower triangular.
Implicit method:
0 for some not lower triangular.
Diagonally implicit method:
, , , 1,2,… , .
Clearly, an -stage RK method is completely specified by its Butcher’s tableau;
and we define the -dimensional vectors and and the matrix by
. (1.4)
A remark that can be made about RK methods is that they constitute a clever and
, going to be affected by the behavior of neighbouring integral curves. RK methods deliberately try to gather information about this family of curves.
.4 Ordinary Differential Equations
t contains functions of only one independent variable, and one or more of its derivatives with respect to that variable. A simple example is Newton’s second law of motion, which leads to the differential equation
sensible idea. The unique solution of a well-posed initial value problem can be thought of as a single integral curve in ; but, due to truncation and round-off error, any numerical solution is, in effect
1
In mathematics, an ODE is a relation tha
,
for the motion of a particle of mass . In general, the force depends upon the position of the particle at time , and thus the unknown function appears on both sides of the differential equation, as is indicated in the notation .
ODEs are distinguished from partial differential equations (PDEs), which involve partial derivatives of several variables. ODEs arise in many different contexts including geometry, mechanics, astronomy and population modeling. Many famous mathematicians have studied differential equations and contributed to the
field, including Newton, Leibniz, the Bernoulli family, d’Alembert and Euler. Much study has been devoted to the solution of ODEs. In the case where the equation is linear, it can be solved by analytical methods. Unfortunately, most of the interesting differential equations are non-linear and with a few exceptions, cannot be solved exactly.
1.4.1 Definitions
Let be an unknown function
in with the derivative of , then an equation of the form
, , , … ,
is called an ODE of order ; for vector valued function,
it is called a system of ODEs of dimension . When a differential equation of order has the form
differential equation whereas the form
, , , , … ,
, , , , … , 0
it is called an implicit
is called an explicit differential equation.