Project on Runge Kutta method

Size: px
Start display at page:

Download "Project on Runge Kutta method"

Transcription

1 Project on Runge Kutta method Nguyen Quan Ba Hong Doan Tran Nguyen Tung Nguyen An Thinh 3 Students at Faculty of Math and Computer Science Ho Chi Minh University of Science, Vietnam nguyenquanbahong@gmail.com dtrngtung@live.com blog. 4 October, 06 Student ID. 403 Student ID Student ID Copyright c 06 by Nguyen Quan Ba Hong, Student at Ho Chi Minh University of Science, Vietnam. This document may be copied freely for the purposes of education and non-commercial research. Visit my site com to get more.

2 Contents List of Figures iii Introduction. Initial Value Problems Mesh General Runge Kutta method Runge Kutta Order Method Runge Kutta order method 4. Derivation of Runge Kutta Order Method Runge Kutta Order Formula Taylor Series Expansion Formula Derivation of System of Equations Solutions of System of Equations Some Cases Matlab Implementation Runge Kutta order 3 method 8 3. Derivation of Runge Kutta Order 3 Method Runge Kutta Order 3 Formula Taylor Series Expansion Formula Derivation of System of Equations Solutions of System of Equations Some Cases Matlab Implementation Runge Kutta Order 4 Method 0 4. Derivation of Runge Kutta Order 4 Method Runge Kutta Order 4 Formula Taylor Series Expansion Formula Derivation of System of Equations Solutions of System of Equations Some Cases Matlab Implementation Curtiss-Hirchfelder Equation Subroutine s.m Subroutine f.m Subroutine x.m i

3 CONTENTS ii Main Routine RK Results Brusselator Equation Subroutine f.m Subroutine x.m Main Routine RK4.m Results Examples Subroutine s.m Subroutine f.m Subroutine x.m Main Routine RK4ex.m Results

4 List of Figures 4. Numerical Solutions Absolute Errors Relative Errors Numerical Solutions Dependency of y with respect to y Absolute Errors Relative Errors Numerical Solutions Numerical Solutions Dependency of y with respect to y Absolute Errors Relative Errors iii

5 Chapter Introduction. Initial Value Problems The Runge Kutta methods are an important family of iterative methods for the approximation of solutions of ODE s, that were developed around 900 by the German mathematicians Carl Runge (856-97) and Martin. W. Kutta ( ). Modern developments are mostly due to John Butcher in the 960s. We consider initial value problems expressed in autonomous form. Starting with the non-autonomous, we assume that f (x, y) is a continuous function with domain [a, b] R n where t [a, b] and y R n. Consider the initial value problem where We assume that dy (t) = f (t, y (t)) dt (.) y (x 0 ) = y 0 (.) y (t) = (y (t), y (t),..., y n (t)) T (.3) f : [a, b] R n R n (.4) f (t, y ) f (t, y ) L (R n ) L y y L (R n ) (.5) for all t [a, b], y R n, y R n. Thus the IVP (.) has a unique solution. For convenience, we write (.) briefly as y t = f (.6) Most efforts to increases the order of the Runge Kutta methods have been accomplished by increasing the number of Taylor s series terms used and thus the number of functional evaluations, e.g. Butcher 987, Gear 97. The use of higher order derivative terms has been proposed for stiff problems, e.g. Rosenbrock 963, Enright 974. Our method add higher order derivative terms to the Runge Kutta k i terms (i > ) to achieve a higher order of accuracy. We are interested in a numerical approximation of the continuously differentiable solution y (t) of the IVP (.) over the time interval t [a, b].

6 CHAPTER. INTRODUCTION. Mesh We subdivide the interval [a, b] into M equal subintervals and select the mesh points t j t j = a + jh, j = 0,,..., M (.7) where is called a step size. h = b a M (.8).3 General Runge Kutta method The family of explicit Runge Kutta (RK) methods of the mth stage is given by where s y (n+) = y (n) + h b i k i (.9) i= k i = f (τ i, η i ), i =,,..., s (.0) and τ i = t n + c i h (.) i η i = y n + h a ij k j (.) j= i = y n + h a ij f (τ j, η j ) (.3) j= We use the notation f n := f (t n, y n ) (.4) To specify a particular method, we need to provide the integer s (the number of stages), and the coefficients c i, i =,..., s, a ij, j < i m and b i, i =,,..., s. These data are usually arranged in a so-called Butcher tableau (after John C. Butcher) 0 c a c 3 a 3 a c s a s a s a ss b b b s b s (.5)

7 CHAPTER. INTRODUCTION 3.4 Runge Kutta Order Method We consider the Runge Kutta order method here because it is very short and easy. There is no need to represent this into a separated chapter. For s =, (.0) becomes and (.0) becomes On the other hand, the Taylor expansion yields k = f (t n, x n ) (.6) y (n+) = y (n) + hb k (.7) = y (n) + hb f n (.8) y (n+) = y (n) + hy t tn + O ( h ) (.9) Comparing (.8) and (.0), we obtain easily = y (n) + hf n + O ( h ) (.0) b = (.) Hence, The Butcher table in this case has the following form 0 (.) Remark.. The Runge Kutta order method is equivalent to the explicit Euler s method. Note that the Euler s method is of the first order of accuracy. Hence, we get the name Runge Kutta method of the first order as above.

8 Chapter Runge Kutta order method. Derivation of Runge Kutta Order Method To set up the Runge Kutta order method, we need to do 4 steps.. Write down Runge Kutta order formula described by (.9) and (.0).. Write down Taylor series expansion. 3. Compare the coefficients of two formulas above to obtain a system of equations. 4. Solve the system of equation or find some its solutions. Remark.. This process is also applied for Runge Kutta method of higher orders. Therefore, we can regard it as the standard process for derivation of the general Runge Kutta method in this context. After these steps, with some solutions of the derived system of equations, we can simulate some IVPs easily... Runge Kutta Order Formula For s =, (.0) becomes and (.9) becomes k = f n (.) k = f (t n + c h, y n + ha f n ) (.) y (n+) = y (n) + hb k + hb k (.3) = y (n) + hb f n + hb f (t n + c h, y n + ha f n ) (.4) Now we write down the Taylor series expansion O ( h ) for k k = f (t n + c h, y n + ha f n ) (.5) = f n + c hf t + ha f n f y + O ( h ) (.6) 4

9 CHAPTER. RUNGE KUTTA ORDER METHOD 5 Inserting (.6) into (.4), we obtain y (n+) = y (n) + hb f n + hb [ fn + c hf t + ha f n f y + O ( h )] (.7) = y (n) + h (b + b ) f n + h b c f t + h b a f n f y + O ( h 3) (.8).. Taylor Series Expansion Formula We need to compute y tt for Taylor series expansion below. y tt = df dt = f t t t + f y y t (.9) (.0) = f t + ff y (.) Now we write down the Taylor series expansion of y in the neighborhood of t n with O ( h 3). y (n+) = y (n) + hy t tn + h y tt tn + O ( h 3) (.) = y (n) + hf n + h y tt tn + O ( h 3) (.3) = y (n) + hf n + h (f t + ff y ) tn + O ( h 3) (.4) = y (n) + hf n + h f t + h tn f n f y tn + O ( h 3) (.5) Remark.. (Important) From here to later, if nothing is misundertood, we can abbreviate notation f t α y for β f t α y β tn (.6) in the Taylor series expansion. For example, under this abbreviation, (.5) can be rewritten briefly as y (n+) = y (n) + hf n + h f t + h f nf y + O ( h 3) (.7) This abbreviation reduces the complexity of the formulas in this context. As you will see later, this abbreviation is really essential...3 Derivation of System of Equations Return to our problem, as usual, comparing (.8) and (.7), we obtain hf n : = b + b (.8) h f t : = b c (.9) h f n f y : = b a (.0)

10 CHAPTER. RUNGE KUTTA ORDER METHOD 6 Hence, we obtain the system of equations b + b = (.) b c = b a = (.) (.3)..4 Solutions of System of Equations We can solve the above system of equations easily. Here, the authors represent two solutions. The idea behind these two solutions will be use later for higher order Runge Kutta method. Solution. The system involves four unknowns in three equations. Taking b = α is free variable. Due to (.3) we must have α 0. Then we can easily obtain the general solution for (.)-(.3) is b = α (.4) b = α (.5) c = a = (.6) α where α is an arbitrary real number. Butcher tableau in this case becomes 0 α α α α (.7) Solution. Due to (.) and (.), we must have c = a. So, we can take c = a = β (.8) as a free variable. And the remaining is very easy, we obtain Butcher tableau in this case becomes 0 β This Butcher tableau appears in [5]. b = β (.9) b = β (.30) c = a = β (.3) β β β (.3) Remark.3. Since Runge Kutta order is still simple, you can not see the differences between two solutions. With Runge Kutta of higher order, you will see that the first choice of free variables is very important in entire solution.

11 CHAPTER. RUNGE KUTTA ORDER METHOD 7..5 Some Cases We discuss two useful choices Case α =. In this case, (.6) becomes b = (.33) The corresponding Butchet tableau reads b = (.34) c = a = (.35) 0 (.36) Thus, in this case the Runge Kutta method of second order takes the form y (n+) = y (n) + h [f n + f (t n + h, y n + hf n )] (.37) and is equivalent to the Heun s method. Case α =. In this case, (.6) becomes b = (.38) b = 0 (.39) c = a = (.40) The corresponding Butcher tableau reads 0 0 (.4) In this case Runge Kutta method of second order can be written as ( y (n+) = y (n) + hf t n + h, y n + h ) f n (.4) and is called the RK method. Remember α R, so there is infinite many choices of solution for (.)-(.3).. Matlab Implementation See section 4. for general code.

12 Chapter 3 Runge Kutta order 3 method 3. Derivation of Runge Kutta Order 3 Method 3.. Runge Kutta Order 3 Formula For s = 3, (.0) becomes k = f n (3.) k = f (t n + c h, y n + ha f n ) (3.) k 3 = f (t n + c 3 h, y n + ha 3 k + ha 3 k ) (3.3) = f (t n + c 3 h, y n + ha 3 f n + ha 3 f (t n + c h, y n + ha 3 k + ha 3 k )) (3.4) and (.9) becomes y (n+) = y (n) + hb k + hb k + hb 3 k 3 (3.5) Now we write down the Taylor series expansion O ( h 3) for k. k = f (t n + c h, y n + ha f n ) (3.6) = f n + c hf t + ha f n f y + h c f tt + h c a f n f ty + h a f nf yy (3.7) + O ( h 3) (3.8) And we also write down the Taylor series expansion O ( h 3) for k 3. k 3 = f (t n + c 3 h, y n + ha 3 f n + ha 3 k ) (3.9) = f n + c 3 hf t + h (a 3 f n + a 3 k ) f y (3.0) + h c 3 f tt + c 3 h (a 3 f n + a 3 k ) f ty + h (a 3f n + a 3 k ) f yy (3.) + O ( h 3) (3.) 8

13 CHAPTER 3. RUNGE KUTTA ORDER 3 METHOD 9 Inserting (3.8) into (3.) k 3 = f (t n + c 3 h, y n + ha 3 f n + ha 3 k ) (3.3) = f n + c 3 hf t + ha 3 f n f y (3.4) + ha 3 f y (f n + hc f t + ha f n f y ) (3.5) + h c 3 f tt + c 3 h (a 3 f n + a 3 f n ) f ty (3.6) ( ) a + h 3 fn + a 3fn + a 3 a 3 fn f yy (3.7) + O ( h 3) (3.8) Collecting terms respect to exponents of h k 3 = f n + h (c 3 f t + a 3 f n f y + a 3 f y f n ) (3.9) a 3 c f t f y + a a 3 f n fy + c 3 f tt + h +c 3 a 3 f n f ty + c 3 a 3 f n f ty + a 3 f nf yy (3.0) + a 3 f nf yy + a 3 a 3 fnf yy + O ( h 3) (3.) Inserting (3.) and (3.) into (3.5) y (n+) = y (n) + hb f n (3.) f n + hc f t + ha f n f y + h c f tt + hb +h c a f n f ty + h a f nf yy f n + h (c 3 f t + a 3 f n f y + a 3 f y f n ) a 3 c f t f y + a a 3 f n fy + c 3 f tt + hb 3 +h +c 3 a 3 f n f ty + c 3 a 3 f n f ty + a 3 f nf yy + a 3 (3.3) (3.4) f nf yy + a 3 a 3 fnf yy + O ( h 4) (3.5) Collecting terms respect to exponents of h y (n+) = y (n) + h (b f n + b f n + b 3 f n ) (3.6) + h (b c f t + a b f n f y + b 3 c 3 f t + a 3 b 3 f n f y + a 3 b 3 f y f n ) (3.7) b c f tt + a b c f n f ty + a b f nf yy +a 3 b 3 c f t f y + a a 3 b 3 f n f + h 3 y + b 3c 3 f tt +a 3 b 3 c 3 f n f ty + a 3 b 3 c 3 f n f ty + a 3b 3 f (3.8) nf yy + a 3b 3 f nf yy + a 3 a 3 b 3 fnf yy + O ( h 4) (3.9)

14 CHAPTER 3. RUNGE KUTTA ORDER 3 METHOD Taylor Series Expansion Formula We need to compute y ttt for Taylor series expansion below. y ttt = d dt (f t + ff y ) (3.30) = (f t + ff y ) t + f(f t + ff y ) y (3.3) = f tt + f t f y + ff ty + ff ty + ff y + f f yy (3.3) = f tt + f t f y + ff ty + ff y + f f yy (3.33) Now we write down the Taylor series expansion of y in the neighborhood of t n with O ( h 4). y (n+) = y (n) + hy t + h y tt + h3 6 y ttt + O ( h 4) (3.34) = y (n) + hf n + h (f t + f n f y ) (3.35) + h3 ( ftt + f t f y + f n f ty + f n fy + f ) ( 6 nf yy + O h 4 ) (3.36) 3..3 Derivation of System of Equations Comparing (3.9) and (3.36) hf n : = b + b + b 3 (3.37) h f t : = b c + b 3 c 3 (3.38) h f n f y : = a b + a 3 b 3 + a 3 b 3 (3.39) h 3 f tt : 6 = b c + b 3c 3 (3.40) h 3 f t f y : 6 = a 3b 3 c (3.4) h 3 f n f ty : 3 = a b c + a 3 b 3 c 3 + a 3 b 3 c 3 (3.4) h 3 f n f y : 6 = a a 3 b 3 (3.43) h 3 f nf yy : 6 = a b + a 3b 3 + a 3b 3 + a 3 a 3 b 3 (3.44)

15 CHAPTER 3. RUNGE KUTTA ORDER 3 METHOD Hence, we obtain the system of 8 equations with 8 unknowns. b + b + b 3 = (3.45) b c + b 3 c 3 = b a + b 3 (a 3 + a 3 ) = b c + b 3 c 3 = 3 b 3 a 3 c = 6 b c a + b 3 c 3 (a 3 + a 3 ) = 3 b 3 a 3 a = 6 b a + b 3 (a 3 + a 3 ) = 3 (3.46) (3.47) (3.48) (3.49) (3.50) (3.5) (3.5) 3..4 Solutions of System of Equations We now solve the above system of equations in two different ways. Solution. We take b = α, b 3 = β as two free variables, then b = α β (3.53) our task remains to solve αc + βc 3 = αa + β (a 3 + a 3 ) = αc + βc 3 = 3 βa 3 c = 6 αc a + βc 3 (a 3 + a 3 ) = 3 βa 3 a = 6 αa + β(a 3 + a 3 ) = 3 (3.54) (3.55) (3.56) (3.57) (3.58) (3.59) (3.60) We can solve c and c 3 by using two equations αc + βc 3 = αc + βc 3 = 3 (3.6) (3.6) Since (3.59), we must have β 0.

16 CHAPTER 3. RUNGE KUTTA ORDER 3 METHOD Then we can take c 3 = β α β c from (3.6) and insert into (3.6) to obtain the following equation respect to c. Consider two following cases. α (α + β) c αc + 3 4β = 0 (3.63). Case α (α + β) = 0. Consider two subcases. (a) Case α = 0. Then we have immediately b = 4 β = 3 4 c 3 = 3 (3.64) (3.65) (3.66) and the system of equations remains a 3 + a 3 = 3 (3.67) a 3 c = a 3a = 6 (3.68) (3.69) To solve this remaining system of equations, we can take a 3 = γ 0 as a free variable. Then Hence, we obtain the solutions a 3 = 3 γ (3.70) c = 9γ a = 9γ (3.7) (3.7) b = 4 (3.73) b = 0 (3.74) b 3 = 3 4 c = 9γ c 3 = 3 a = 9γ (3.75) (3.76) (3.77) (3.78) a 3 = 3 γ (3.79) a 3 = γ (3.80)

17 CHAPTER 3. RUNGE KUTTA ORDER 3 METHOD 3 where γ is an arbitrary nonzero real number, in this subcase. Butcher tableau becomes 0 9γ 3 9γ 3 γ γ (3.8) (b) Case α + β = 0, α 0. Then we have immediately and the system of equations remains b = (3.8) b = α (3.83) b 3 = α (3.84) c = 3 + 4α (3.85) We again have immediately c c 3 = α a (a 3 + a 3 ) = α c c 3 = 3α a 3 c = 6α c a c 3 (a 3 + a 3 ) = 3α a 3 a = 6α a (a 3 + a 3 ) = 3α c 3 = 3 4α a 3 = 4α + 3 a = 3 + 4α a 3 = 6α + 4α 9 α (4α + 3) (3.86) (3.87) (3.88) (3.89) (3.90) (3.9) (3.9) (3.93) (3.94) (3.95) (3.96)

18 CHAPTER 3. RUNGE KUTTA ORDER 3 METHOD 4 Hence, we obtain the solution b = (3.97) b = α (3.98) b 3 = α (3.99) c = 3 + 4α (3.00) c 3 = 3 4α (3.0) a = 3 + 4α (3.0) a 3 = 6α + 4α 9 α (4α + 3) (3.03) a 3 = 4α + 3 (3.04) where α is an arbitrary nonzero real number, in this subcase. Butcher tableau becomes α 3 4α 3 + 4α 6α + 4α 9 α (4α + 3) 4α + 3 α α (3.05). Case α (α + β) 0. (3.63) is a quadratic equation respect to c. Computing the determinant of (3.63) = 36α + α (α + β) (4β 3) (3.06) = αβ (4α + 4β 3) (3.07) Hence, we have to make the assumption αβ (4α + 4β 3) 0 (3.08) so that (3.63) has roots in this case. Under this assumption, (3.63) have two roots c = 3α ± 3αβ (4α + 4β 3) 6α (α + β) (3.09) Consider two subcases respect to c. (a) Case c = 3α + 3αβ (4α + 4β 3). We easily solve the remaining 6α (α + β)

19 CHAPTER 3. RUNGE KUTTA ORDER 3 METHOD 5 system of equations to get b = α β (3.0) b = α (3.) b 3 = β (3.) c = 3α + 3αβ (4α + 4β 3) 6α (α + β) c 3 = 3β 3αβ (4α + 4β 3) 6β (α + β) (3.3) (3.4) a = 3α + 3αβ (4α + 4β 3) (3.5) 6α (α + β) a 3 = β 3α + 3αβ (4α + 4β 3) (3.6) 6β (α + β) α (α + β) ( β 3α + ) (3.7) 3αβ (4α + 4β 3) α (α + β) a 3 = ( β 3α + ) (3.8) 3αβ (4α + 4β 3) Butcher tableau reads all obtained coefficients. (b) Case c = 3α 3αβ (4α + 4β 3). We also easily solve the remaining system of equations to 6α (α + β) get b = α β (3.9) b = α (3.0) b 3 = β (3.) c = 3α 3αβ (4α + 4β 3) 6α (α + β) c 3 = 3β + 3αβ (4α + 4β 3) 6β (α + β) (3.) (3.3) a = 3α 3αβ (4α + 4β 3) (3.4) 6α (α + β) a 3 = β 3α 3αβ (4α + 4β 3) (3.5) 6β (α + β) α (α + β) ( β 3α ) (3.6) 3αβ (4α + 4β 3) α (α + β) a 3 = ( β 3α ) (3.7) 3αβ (4α + 4β 3) Butcher tableau reads all obtained coefficients. We have solved the system of equations (3.45)-(3.5) completely.

20 CHAPTER 3. RUNGE KUTTA ORDER 3 METHOD 6 Remark 3.. In the first solution, we have used b and b 3 as two free variables. This choice makes square roots appear in the solutions. This is quite easy to understand. Because of choice of b, b 3 as free variables, we have to solve a quadratic equation. This quadratic equation make square roots appear obviously. Now, we solve our system of equation by alternative ways. The idea is very simple. It is just a matter of the first choice. More explicitly, instead of choosing b, b 3 as two free variables, we will choose c, c 3 as two free variables. Let us see the differences between two solutions through the following second one. Solution. We take c = α, c 3 = β as two free variables and focus on the following two equations of our system of equations. b c + b 3 c 3 = b c + b 3 c 3 3 = 3 (3.8) (3.9) We consider two cases respect to c and c 3.. Case c = c 3 = α. Due to (3.57), we must have α 0. Then the above sub-system of equations becomes Hence b + b 3 = α (3.30) b + b 3 = 3α (3.3) c = c 3 = α = 3 (3.3) The remaining system of equations is b + b + b 3 = (3.33) b + b 3 = 3 4 b a + b 3 (a 3 + a 3 ) = b 3 a 3 = 4 b 3 a 3 a = 6 b a + b 3 (a 3 + a 3 ) = 3 (3.34) (3.35) (3.36) (3.37) (3.38) We obtain immediately b = 4 a = 3 (3.39) (3.40)

21 CHAPTER 3. RUNGE KUTTA ORDER 3 METHOD 7 and the remaining system of equations is We now choose b 3 = γ then b + b 3 = b + b 3 (a 3 + a 3 ) = b 3 a 3 = b + b 3 (a 3 + a 3 ) = 3 (3.4) (3.4) (3.43) (3.44) b = 3 4 γ (3.45) a 3 = 3 4γ a 3 = 4γ (3.46) (3.47) Therefore, c = 3 c 3 = 3 b = 4 (3.48) (3.49) (3.50) b = 3 4 γ (3.5) b 3 = γ (3.5) a = 3 a 3 = 3 4γ a 3 = 4γ (3.53) (3.54) (3.55) where γ is an arbitrary nonzero real number, is the solution of (3.45)-(3.5) in this case.. Case c c 3. Due to (3.49) and (3.5), we have immediately Due to (3.8) and (3.9), we obtain a = c = α (3.56) b = 3β 6α (β α) b 3 = 3α 6β (α β) (3.57) (3.58)

22 CHAPTER 3. RUNGE KUTTA ORDER 3 METHOD 8 Hence, b = The remaining system of equations is 6αβ 3α 3β + 6αβ 3β 6α (β α) α + 3α 6β (α β) (a 3 + a 3 ) = 3α 6β (α β) a 3α = 6 3β 6 (β α) α + 3α 6 (α β) (a 3 + a 3 ) = 3 3β 6α (β α) α + 3α 6β (α β) (a 3 + a 3 ) = 3 We easily solve this and obtain (3.59) (3.60) (3.6) (3.6) (3.63) Therefore, a = α (3.64) β (α β) a 3 = β α (3α ) β (α β) a 3 = α (3α ) (3.65) (3.66) c = α (3.67) c 3 = β (3.68) 6αβ 3α 3β + b = 6αβ b = 3β 6α (β α) b 3 = 3α 6β (α β) (3.69) (3.70) (3.7) a = α (3.7) β (α β) a 3 = β α (3α ) β (α β) a 3 = α (3α ) (3.73) (3.74) where α β, α are two arbitrary nonzero real numbers, is the solution 3 of (3.45)-(3.5) in this case. We have solved (3.45)-(3.5) completely. Remark 3.. In the second solution,nth roots do not appear in the solution because we does not need to solve any polynomial equations. Since this way is more easy and effective, it will be used for Runge Kutta method of higher orders.

23 CHAPTER 3. RUNGE KUTTA ORDER 3 METHOD Some Cases We consider some cases of Runge Kutta order 3 method respect to some solutions of its associated system of equations. Case α = 3, β = 6. We use case.(b) above to obtain (3.75) This Butcher tableau appears in [6] - Kutta s third order method and in [4], p.8. Case α = 3 8, β = This Butcher tableau appears in [4], p.8. Case α = 3 4, β = (3.76) This Butcher tableau appears in [4], p (3.77) 3. Matlab Implementation See section 4. for general code.

24 Chapter 4 Runge Kutta Order 4 Method 4. Derivation of Runge Kutta Order 4 Method 4.. Runge Kutta Order 4 Formula For s = 4, (.0) becomes and (.9) becomes k = f n (4.) k = f (t n + c h, y n + ha f n ) (4.) k 3 = f (t n + c 3 h, y n + ha 3 f n + ha 3 k ) (4.3) k 4 = f (t n + c 4 h, y n + ha 4 f n + ha 4 k + ha 43 k 3 ) (4.4) y (n+) = y (n) + hb k + hb k + hb 3 k 3 + hb 4 k 4 (4.5) Now we write down the Taylor series expansion O ( h 4) for k. k = f (t n + c h, y n + ha f n ) (4.6) = f n + hc f t + ha f n f y + h c f tt + h a c f n f ty + h a f n (4.7) + h 3 c3 6 f ttt + h 3 a c f nf tty + h 3 a c f nf tyy + h 3 a3 6 f nf 3 yyy + O ( h 4) (4.8) ( ) c = f n + h (c f t + a f n f y ) + h f tt + a c f n f ty + a f n (4.9) ( c + h f ttt + a c ) f nf tty + a c f nf tyy + a3 6 f nf 3 yyy + O ( h 4) (4.0) 0

25 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD We write down the Taylor series expansion O ( h 4) for k 3. k 3 = f (t n + c 3 h, y n + ha 3 f n + ha 3 k ) (4.) = f n + hc 3 f t + h (a 3 f n + a 3 k ) f y (4.) + h c 3 f tt + h c 3 (a 3 f n + a 3 k ) f ty + h (a 3 f n + a 3 k ) f yy (4.3) + c3 3h 3 6 f ttt + h3 c 3 (a 3f n + a 3 k ) f tty + h3 c 3 (a 3f n + a 3 k ) f tyy (4.4) + h3 6 (a 3f n + a 3 k ) 3 f yyy + O ( h 4) (4.5) Inserting (4.0) into (4.5) k 3 = f n + hc 3 f t + ha 3 f n f y (4.6) [ ( )] c + ha 3 f y f n + h (c f t + a f n f y ) + h f tt + a c f n f ty + a f n (4.7) + h c 3 f tt + h c 3 a 3 f n f ty + h c 3 a 3 f ty [f n + h (c f t + a f n f y )] (4.8) + h a 3f nf yy + h a 3a 3 f n f yy [f n + h (c f t + a f n f y )] (4.9) + h a 3f yy [f n + h (c f t + a f n f y )] (4.0) + c3 3h 3 6 f ttt + h3 c 3 (a 3f n + a 3 f n ) f tty (4.) + h3 c 3 ( a 3 fn + a 3 a 3 fn + a 3fn ) ftyy (4.) + h3 6 ( a 3 3 fn 3 + 3a 3a 3 fn 3 + 3a 3 a 3fn 3 + a 3 3fn 3 ) fyyy + O ( h 4) (4.3) Collecting terms respect to exponents of h k 3 = f n + h (c 3 f t + a 3 f n f y + a 3 f n f y ) (4.4) + h a 3 c f t f y + a a 3 f n fy + c 3 f tt + a 3 c 3 f n f ty (4.5) +c 3 a 3 f n f ty + a 3 f nf yy + a 3 a 3 fnf yy + a 3 f nf yy a 3 c f yf tt + a 3 a c f n f y f ty + a a 3 f nf y +a 3 c c 3 f t f ty + a a 3 c 3 f n f y f ty + a 3 a 3 c f n f t f yy +a a 3 a 3 f nf y f yy + a 3c f n ff yyt + a a 3fnf y f yy + h 3 + c3 3 6 f ttt + a 3c 3 f nf tty + a 3c 3 f nf tty + a 3c 3 f nf tyy (4.6) +a 3 a 3 c 3 fnf tyy + a 3c 3 f nf tyy + a3 3 6 f nf 3 yyy + a 3a 3 f 3 nf yyy + a 3a 3 f 3 nf yyy + a3 3 6 f nf 3 yyy + O ( h 4) (4.7)

26 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD We continue to write down the Taylor series expansion O ( h 4) for k 4. k 4 = f (t n + c 4 h, y n + ha 4 f n + ha 4 k + ha 43 k 3 ) (4.8) = f n + c 4 hf t + h (a 4 f n + a 4 k + a 43 k 3 ) f y (4.9) + c 4h f tt + c 4 h (a 4 f n + a 4 k + a 43 k 3 ) f ty (4.30) + h (a 4 f n + a 4 k + a 43 k 3 ) f yy + c3 4h 3 6 f ttt (4.3) + c 4 h3 (a 4 f n + a 4 k + a 43 k 3 ) f tty (4.3) + c 4h 3 (a 4f n + a 4 k + a 43 k 3 ) f tyy (4.33) + 6 h (a 4 f n + a 4 k + a 43 k 3 ) 3 f yyy + O ( h 4) (4.34)

27 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 3 Inserting (4.5) and (4.7) to (4.34) k 4 = f n + hc 4 f t + ha 4 f n f y (4.35) f n + ( h (c f t + a f n f y ) ) + ha 4 f y c +h f tt + a c f n f ty + a f n (4.36) f n + h (c 3 f t + a 3 f n f y + a 3 f n f y ) a 3 c f t f y + a a 3 f n fy + c 3 f tt + ha 43 f y +h +a 3 c 3 f n f ty + c 3 a 3 f n f ty + a 3 f nf (4.37) yy +a 3 a 3 fnf yy + a 3 f nf yy + h c 4 f tt + h a 4 c 4 f n f ty + h a 4 c 4 f ty [f n + h (c f t + a f n f y )] (4.38) + h a 43 c 4 f ty [f n + h (c 3 f t + a 3 f n f y + a 3 f n f y )] (4.39) + h a 4 f nf yy + h a 4 f yy[f n + h (c f t + a f n f y )] (4.40) + h a 43 f yy[f n + h (c 3 f t + a 3 f n f y + a 3 f n f y )] (4.4) + h a 4 a 4 f n f yy [f n + h (c f t + a f n f y )] (4.4) + h a 4 a 43 f yy [f n + h (c f t + a f n f y )] (4.43) [f n + h (c 3 f t + a 3 f n f y + a 3 f n f y )] (4.44) + h a 4 a 43 f n f yy [f n + h (c 3 f t + a 3 f n f y + a 3 f n f y )] (4.45) + h 3 c3 4 6 f ttt + h 3 c 4 (a 4f n + a 4 f n + a 43 f n ) f tty (4.46) + h 3 c ( ) 4 a 4 fn + a 4fn + a 43fn + a 4 a 4 fn +a 4 a 43 fn + a 4 a 43 fn f tyy (4.47) a f n 3 + a3 4 6 f n 3 + a f n 3 + a 4a 4 fn 3 + h 3 + a 4a 43 fn 3 + a 4a 4 fn 3 + a 4a 43 fn 3 + a 43a 4 f 3 n f yyy (4.48) + a 43a 4 fn 3 + a 4 a 4 a 43 fn 3 + O ( h 4) (4.49)

28 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 4 Collecting terms respect to exponents of h k 4 = f n + h (c 4 f t + a 4 f n f y + a 4 f n f y + a 43 f n f y ) (4.50) a 4 c f t f y + a a 4 f n fy + a 43 c 3 f t f y + a 3 a 43 f n f y + h +a 3 a 43 f n fy + c 4 f tt + c 4 a 4 f n f ty + c 4 a 4 f n f ty (4.5) +c 4 a 43 f n f ty + a 4 f nf yy + a 4 f nf yy + a 43 f nf yy +a 4 a 4 fnf yy + a 4 a 43 fnf yy + a 4 a 43 fnf yy a 4 c f yf tt + a a 4 c f n f y f ty + a 4a f nf y f yy +a 43 a 3 c f t fy + a a 3 a 43 f n fy 3 + a 43c 3 f yf tt +a 3 a 43 c 3 f n f y f ty + a 3 a 43 c 3 f n f y f ty + a 3a 43 f nf y f yy +a 3 a 3 a 43 fnf y f yy + a 3a 43 f nf y f yy + a 4 c c 4 f t f ty +a a 4 c 4 f n f y f ty + a 43 c 3 c 4 f t f ty + a 3 a 43 c 4 f n f y f ty +a 3 a 43 c 4 f n f y f ty + a 4c f n f t f yy + a a 4f nf y f yy +a 43c 3 f n f t f yy + a 3 a 43fnf y f yy + a 3 a 43f nf y f yy +a 4 a 4 c f n f t f yy + a a 4 a 4 f nf y f yy + a 4 a 43 c 3 f n f t f yy +a 3 a 4 a 43 fnf y f yy + a 3 a 4 a 43 f nf y f yy + a 4 a 43 c f n f t f yy + h 3 +a a 4 a 43 fnf y f yy + a 4 a 43 c 3 f n f t f yy + a 3 a 4 a 43 fnf y f yy +a 3 a 4 a 43 fnf y f yy + c3 4 6 f ttt + a 4c 4 f nf tty + a 4c 4 f nf tty + a 43c 4 f nf tty + a 4c 4 f nf tyy + a 4c 4 f nf tyy + a 43c 4 f nf tyy + a 4 a 4 c 4 fnf tyy + a 4 a 43 c 4 fnf tyy +a 4 a 43 c 4 fnf tyy + a3 4 6 f nf 3 yyy + a3 4 6 f nf 3 yyy + a f nf 3 yyy + a 4a 4 f 3 nf yyy + a 4a 43 f 3 nf yyy + a 4a 4 f 3 nf yyy + a 4a 43 f 3 nf yyy + a 4a 43 f 3 nf yyy + a 4a 43 f 3 nf yyy + a 4 a 4 a 43 fnf 3 yyy (4.5) + O ( h 4) (4.53)

29 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 5 Inserting (4.0), (4.7) and (4.53) into (4.5) y (n+) (4.54) = y (n) + h (b f n + b f n + b 3 f n + b 4 f n ) (4.55) ( ) + h b c f t + a b f n f y + b 3 c 3 f t + a 3 b 3 f n f y + a 3 b 3 f n f y (4.56) +b 4 c 4 f t + a 4 b 4 f n f y + a 4 b 4 f n f y + a 43 b 4 f n f y b c f tt + b c a f n f ty + a b f nf yy + a 3 b 3 c f t f y +a 3 b 3 a f n f y f y + b 3c 3 f tt + c 3 b 3 a 3 f n f ty + c 3 b 3 a 3 f n f ty + a 3b 3 + h 3 f nf yy + a 3 a 3 b 3 f n f n f yy + a 3b 3 f nf yy + a 4 b 4 c f t f y +a 4 b 4 f y a f n f y + a 43 b 4 c 3 f t f y + a 43 a 3 b 4 f n fy + +a 43 a 3 b 4 f n fy + b 4c 4 f tt + c 4 b 4 a 4 f n f ty + c 4 b 4 a 4 f ty f n + c 4 b 4 a 43 f ty f n + a 4b 4 f nf yy + a 4b 4 f nf yy + a 43b 4 f nf yy + a 4 a 4 b 4 f yy fn +a 4 a 43 b 4 f yy fn + a 4 a 43 b 4 f yy fn (4.57) b c 3 6 f ttt + b c a f n f tty + b c a f nf tyy + a3 b 6 f nf 3 yyy + a 3b 3 c f tt f y + a 3 b 3 c a f n f ty f y + a 3a b 3 f nf yy f y +c 3 a 3 b 3 c f t f ty + c 3 a 3 b 3 a f n f y f ty + a 3 a 3 b 3 c f n f t f yy +a 3 a 3 a b 3 f n f n f y f yy + a 3b 3 f n c f t f yy + a 3b 3 f n a f n f y f yy + b 3c f ttt + b 3c 3 (a 3 + a 3 ) f n f tty + b 3c 3 a 3 f nf tyy +b 3 c 3 a 3 a 3 f n f n f tyy + b 3c 3 a 3 f nf tyy + b 3a f 3 nf yyy + b 3a 3a 3 f nf 3 yyy + b 3a 3 a 3 f nf 3 yyy + b 3a f 3 nf yyy + a 4b 4 c f y f tt + a 4 b 4 c a f n f y f ty + a 4a b 4 f nf y f yy +a 43 a 3 b 4 c f t fy + a 43 a 3 a b 4 f n fy 3 + a 43b 4 c 3 f y f tt +a 43 b 4 c 3 a 3 f n f y f ty + a 43 b 4 c 3 a 3 f n f y f ty + a 43a 3b 4 f nf y f yy + h 4 +a 43 a 3 a 3 b 4 fnf y f yy + a 43a 3b 4 f nf y f yy + c 4 a 4 b 4 c f t f ty +c 4 a 4 a b 4 f n f y f ty + c 4 a 43 c 3 b 4 f t f ty + c 4 a 43 a 3 b 4 f n f y f ty +c 4 a 43 a 3 b 4 f n f y f ty + a 4b 4 c f n f t f yy + a 4a b 4 fnf y f yy +a 43b 4 c 3 f n f t f yy + a 43a 3 b 4 fnf y f yy + a 43a 3 b 4 fnf y f yy +a 4 a 4 b 4 c f n f t f yy + a 4 a a 4 b 4 fnf y f yy + a 4 a 43 b 4 c 3 f n f t f yy +a 4 a 43 a 3 b 4 fnf y f yy + a 4 a 43 a 3 b 4 fnf y f yy + a 4 a 43 b 4 c f n f t f yy +a 4 a 43 a b 4 fnf y f yy + a 4 a 43 b 4 c 3 f n f t f yy + a 4 a 43 a 3 b 4 fnf y f yy +a 4 a 43 a 3 b 4 fnf y f yy + b 4c f ttt + b 4c 4a 4 f n f tty + b 4c 4a 4 f n f tty + b 4c 4a 43 f n f tty + c 4b 4 a 4 f nf tyy + c 4b 4 a 4 f nf tyy + c 4b 4 a 43 f nf tyy +c 4 b 4 a 4 a 4 f nf tyy + c 4 a 4 a 43 b 4 fnf tyy + c 4 a 4 a 43 b 4 fnf tyy + a3 4b 4 6 f nf 3 yyy + a3 4b 4 6 f nf 3 yyy + a3 43b 4 6 f nf 3 yyy + a 4a 4 b 4 f 3 nf yyy + a 4a 43 b 4 f 3 nf yyy + a 4a 4 b 4 f 3 nf yyy + a 4a 43 b 4 f 3 nf yyy + a 43a 4 b 4 f 3 nf yyy + a 43a 4 b 4 f 3 nf yyy + a 4 a 4 a 43 b 4 fnf 3 yyy (4.58) + O ( h 5) (4.59)

30 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD Taylor Series Expansion Formula We need to compute y tttt for Taylor series expansion below. y tttt = d ( ftt + f t f y + ff ty + ffy + f ) f yy dt = ( f tt + f t f y + ff ty + ffy + f ) f yy + f ( f tt + f t f y + ff ty + ff y + f f yy ) t y (4.60) (4.6) (4.6) = f ttt + f y f tt + f t f ty + f t f ty + ff tty + f t f y + ff y f ty (4.63) + ff t f yy + f f tyy + ff tty + ff y f ty + ff t f yy + ff y f ty (4.64) + f f tyy + ff 3 y + f f y f yy + f f y f yy + f 3 f yyy (4.65) = f ttt + f y f tt + 3f t f ty + 3ff tty + f t f y + 5ff y f ty + 3ff t f yy (4.66) + 3f f tyy + ff 3 y + 4f f y f yy + f 3 f yyy (4.67) Now we write down the Taylor series expansion of y in the neighborhood of t n with O ( h 5). y n+ = y n + hf n + h (f t + f n f y ) (4.68) + h3 ( ftt + f t f y + f n f ty + f n fy + f ) 6 nf yy (4.69) ( ) + h4 fttt + f y f tt + 3f t f ty + 3f n f tty + f t fy + 5f n f y f ty 4 +3f n f t f yy + 3fnf tyy + f n fy 3 + 4fnf y f yy + fnf 3 (4.70) yyy + O ( h 5) (4.7) 4..3 Derivation of System of Equations Compare the coefficients of (4.68) and (4.59)

31 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 7 hf n : = b + b + b 3 + b 4 (4.7) h f t : = b c + b 3 c 3 + b 4 c 4 (4.73) h f n f y : = b a + b 3 a 3 + b 3 a 3 + a 4 b 4 + a 4 b 4 + a 43 b 4 (4.74) h 3 f tt : 6 = b c + b 3c 3 + b 4c 4 (4.75) h 3 f t f y : 6 = a 3b 3 c + a 4 b 4 c + a 43 b 4 c 3 (4.76) h 3 f n f ty : 3 = b c a + c 3 b 3 a 3 + c 3 b 3 a 3 (4.77) + c 4 b 4 a 4 + c 4 b 4 a 4 + c 4 b 4 a 43 (4.78) h 3 f n f y : 6 = a 3b 3 a + a 4 b 4 a + a 43 a 3 b 4 + a 43 a 3 b 4 (4.79) h 3 f nf yy : 6 = a b + a 3b 3 + a 3 a 3 b 3 + a 3b 3 + a 4b 4 (4.80) + a 4b 4 + a 43b 4 + a 4 a 4 b 4 + a 4 a 43 b 4 + a 4 a 43 b 4 (4.8) h 4 f ttt : 4 = b c b 3c b 4c (4.8) h 4 f y f tt : 4 = a 3b 3 c + a 4b 4 c + a 43b 4 c 3 (4.83) h 4 f t f ty : 8 = c 3a 3 b 3 c + c 4 a 4 b 4 c + c 4 a 43 c 3 b 4 (4.84) h 4 f n f tty : 8 = b c a h 4 f n f y f ty : + b 4c 4a 4 + b 3c 3 (a 3 + a 3 ) + b 4c 4a 43 + b 4c 4a 4 (4.85) (4.86) h 4 f t fy : 4 = a 43a 3 b 4 c (4.87) 5 4 = a 3b 3 c a + c 3 a 3 b 3 a + a 4 b 4 c a (4.88) + c 4 a 4 a b 4 + c 4 a 43 a 3 b 4 + a 43 b 4 c 3 a 3 (4.89) + a 43 b 4 c 3 a 3 + c 4 a 43 a 3 b 4 (4.90) h 4 f n f t f yy : 8 = a 3a 3 b 3 c + a 3b 3 c + a 4b 4 c + a 43b 4 c 3 (4.9) h 4 f nf tyy : 8 = b c a + a 4 a 4 b 4 c + a 4 a 43 b 4 c 3 + a 4 a 43 b 4 c + a 4 a 43 b 4 c 3 (4.9) + b 3c 3 a 3 + b 3 c 3 a 3 a 3 + b 3c 3 a 3 (4.93) + c 4b 4 a 4 + c 4b 4 a 4 + c 4b 4 a 43 + c 4 b 4 a 4 a 4 (4.94) + c 4 a 4 a 43 b 4 + c 4 a 4 a 43 b 4 (4.95) h 4 f n fy 3 : 4 = a 43a 3 a b 4 (4.96)

32 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 8 h 4 f nf y f yy : 6 = a 3a b 3 h 4 f 3 nf yyy : + a 3 a 3 a b 3 + a 3b 3 a + a 4a b 4 (4.97) + a 43a 3b 4 + a 43 a 3 a 3 b 4 + a 43a 3b 4 + a 4a b 4 (4.98) + a 43a 3 b 4 + a 43a 3 b 4 + a 4 a a 4 b 4 + a 4 a 43 a 3 b 4 (4.99) + a 4 a 43 a 3 b 4 + a 4 a 43 a b 4 + a 4 a 43 a 3 b 4 (4.00) + a 4 a 43 a 3 b 4 (4.0) 4 = a3 b + b 3a b 3a 3a 3 + b 3a 3 a 3 + b 3a a3 4b a 4a 4 b 4 + a 43a 4 b 4 + a3 4b a3 43b a 4a 43 b 4 + a 4a 4 b 4 + a 43a 4 b 4 + a 4a 43 b 4 (4.0) (4.03) (4.04) + a 4 a 4 a 43 b 4 (4.05)

33 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 9 Hence, we obtain the system of equations b + b + b 3 + b 4 = (4.06) b c + b 3 c 3 + b 4 c 4 = b a + b 3 (a 3 + a 3 ) + b 4 (a 4 + a 4 + a 43 ) = b c + b 3 c 3 + b 4 c 4 = 3 b 3 a 3 c + b 4 (a 4 c + a 43 c 3 ) = 6 b c a + b 3 c 3 (a 3 + a 3 ) + b 4 c 4 (a 4 + a 4 + a 43 ) = 3 b 3 a 3 a + b 4 [a 4 a + a 43 (a 3 + a 3 )] = 6 b a + b 3 (a 3 + a 3 ) + b 4 (a 4 + a 4 + a 43 ) = 3 b c 3 + b 3 c b 4 c 3 4 = 4 b 3 a 3 c ( + b 4 a4 c + a 43 c ) 3 = b 3 c 3 a 3 c + b 4 c 4 (a 4 c + a 43 c 3 ) = 8 b c a + b 3 c 3 (a 3 + a 3 ) + b 4 c 4 (a 4 + a 4 + a 43 ) = 4 b 4 a 43 a 3 c = { } 4 b3 a 3 a (c + c 3 ) = 5 +b 4 [a 4 a (c + c 4 ) + a 43 (a 3 + a 3 ) (c 3 + c 4 )] 4 b 3 a 3 c (a 3 + a 3 ) + b 4 (a 4 c + a 43 c 3 ) (a 4 + a 4 + a 43 ) = 8 b c a + b 3 c 3 (a 3 + a 3 ) + b 4 c 4 (a 4 + a 4 + a 43 ) = 4 b 4 a 43 a 3 a = 4 b 3 a 3 a [a + (a 3 + a 3 )] +b 4 a 4 a [a + (a 4 + a 4 + a 43 )] +b 4 a 43 (a 3 + a 3 ) [a 3 + a 3 + (a 43 + a 4 + a 4 )] = 3 b a 3 + b 3 (a 3 + a 3 ) 3 + b 4 (a 4 + a 4 + a 43 ) 3 = 4 (4.07) (4.08) (4.09) (4.0) (4.) (4.) (4.3) (4.4) (4.5) (4.6) (4.7) (4.8) (4.9) (4.0) (4.) (4.) (4.3) (4.4) 4..4 Solutions of System of Equations We now solve the above system of equations. We take c = α (4.5) c 3 = β (4.6) c 4 = γ (4.7)

34 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 30 as three free variables. Then, our system of equations becomes b + b + b 3 + b 4 = (4.8) αb + βb 3 + γb 4 = b a + b 3 (a 3 + a 3 ) + b 4 (a 4 + a 4 + a 43 ) = α b + β b 3 + γ b 4 = 3 αb 3 a 3 + b 4 (αa 4 + βa 43 ) = 6 αb a + βb 3 (a 3 + a 3 ) + γb 4 (a 4 + a 4 + a 43 ) = 3 b 3 a 3 a + b 4 [a 4 a + a 43 (a 3 + a 3 )] = 6 b a + b 3 (a 3 + a 3 ) + b 4 (a 4 + a 4 + a 43 ) = 3 α 3 b + β 3 b 3 + γ 3 b 4 = 4 α ( b 3 a 3 + b 4 α a 4 + β ) a 43 = αβb 3 a 3 + γb 4 (αa 4 + βa 43 ) = 8 α b a + β b 3 (a 3 + a 3 ) + γ b 4 (a 4 + a 4 + a 43 ) = 4 αb 4 a 43 a 3 = { } 4 b3 a 3 a (α + β) = 5 +b 4 [a 4 a (α + γ) + a 43 (a 3 + a 3 ) (β + γ)] 4 αb 3 a 3 (a 3 + a 3 ) + b 4 (αa 4 + βa 43 ) (a 4 + a 4 + a 43 ) = 8 αb a + βb 3 (a 3 + a 3 ) + γb 4 (a 4 + a 4 + a 43 ) = 4 b 4 a 43 a 3 a = 4 b 3 a 3 a [a + (a 3 + a 3 )] +b 4 a 4 a [a + (a 4 + a 4 + a 43 )] +b 4 a 43 (a 3 + a 3 ) [a 3 + a 3 + (a 43 + a 4 + a 4 )] = 3 a 3 b + b 3 (a 3 + a 3 ) 3 + b 4 (a 4 + a 4 + a 43 ) 3 = 4 (4.9) (4.30) (4.3) (4.3) (4.33) (4.34) (4.35) (4.36) (4.37) (4.38) (4.39) (4.40) (4.4) (4.4) (4.43) (4.44) (4.45) (4.46) We now need to focus on three special equations of the above system. αb + βb 3 + γb 4 = α b + β b 3 + γ b 4 = 3 α 3 b + β 3 b 3 + γ 3 b 4 = 4 (4.47) (4.48) (4.49)

35 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 3 Case (α = β) (β = γ) (γ = α). Reader do this case as exercises. Case α, β, γ are pairwise distinct. Solving this system of three equations respect to b, b 3, b 4, we obtain 4β + 4γ 6βγ 3 b = α (α β) (α γ) 4γ + 4α 6γα 3 b 3 = β (β γ) (β α) 4α + 4β 6αβ 3 b 4 = γ (γ α) (γ β) (4.50) (4.5) (4.5) Then we use (4.8) to obtain b = 4 (α + β + γ) 6 (αβ + βγ + γα) + αβγ 3 αβγ (4.53) Now using b, b, b 3, b 4, we need to focus on the following three equations of the remaining system. αb 3 a 3 + b 4 (αa 4 + βa 43 ) = 6 α ( b 3 a 3 + b 4 α a 4 + β ) a 43 = αβb 3 a 3 + γb 4 (αa 4 + βa 43 ) = 8 (4.54) (4.55) (4.56) Solving this system of three equations respect to a 3, a 4, a 43, we obtain β (4γ 3) (α β) a 3 = α (4α + 4γ 6αγ 3) a 4 = γ (α γ) ( 4β 5β + 3α + γ 4αγ ) α (6α β 4α 6αβ + 3α + 4β 3β) γ ( α) (γ α) (γ β) a 43 = β (6α β 4α 6αβ + 3α + 4β 3β) (4.57) (4.58) (4.59) Now, we only need to solve a, a 3, a 4. To do this, we need to focus on the following three equations of the remaining system. b a + b 3 a 3 + b 4 a 4 = b 3a 3 b 4 a 4 b 4 a 43 (4.60) αb a + βb 3 a 3 + γb 4 a 4 = 3 βb 3a 3 γb 4 a 4 γb 4 a 43 (4.6) (b 3 a 3 + b 4 a 4 ) a + b 4 a 43 a 3 = 6 b 4a 43 a 3 (4.6) We solve this system of three equations respect to a, a 3, a 4 by the following Matlab routine because the formulas are quite long. format long

36 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 3 syms a b c; % a=alpha, b=beta, c=gamma A = [a b c; a^ b^ c^; a^3 b^3 c^3]; v=[/;/3;/4]; B = A^-*v; b = B(); b3 = B(); b4 = B(3); A = [a*b3 a*b4 b*b4; a^*b3 a^*b4 b^*b4; a*b*b3 c*b4*a c*b4*b]; v = [/6;/;/8]; B = A^-*v; a3 = B() a4 = B() a43 = B(3) A = [b b3 b4;a*b b*b3 c*b4;(b3*a3+b4*a4) b4*a43 0]; v = [/-b3*3-b4*a4-b4*a43; /3-b*b3*a3-c*b4*a4-c*b4*a43; /6-b4*a43*a3]; B = A^-*v; a = B() a3 = B() a4 = B(3) This Matlab routine returns the formulas of a, a 3, a 4 in terms of α, β, γ. Hence, we obtain the solutions of our system of equations in terms of α, β, γ. Checking whether this solutions satisfies the remaining system of equations is just computation matter. Although those computations is quite complicated by hand, checking by Matlab is quite easy and there is no benefit to represent those computations here. You should check yourself. In practice, we don t need to know the final three formulas of a, a 3, a 4 in terms of α, β, γ. For each 3 tuples α, β, γ, we can easily solve the other unknowns by the process described above. We have solved (4.06)-(4.4) completely Some Cases Case α =, β =, γ =. Using the above process, we obtain This Butcher tableau appears in [4], p (4.63)

37 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 33 Case α = 3, β = 3, γ = This Butcher tableau appears in [5] (4.64) 4. Matlab Implementation 4.. Curtiss-Hirchfelder Equation In this subsection, we will use Runge Kutta order 4 method to solve numerically the Curtiss-Hirchfelder equation. Definition 4.. The Curtiss-Hirchfelder equation is an ordinary differential equation (ODE) which has the following form In general, The following Matlab routines aims at dy = 50 (y cos t) dt (4.65) y (0) = (4.66) dy = f (t, y) dt (4.67) y (x 0 ) = y 0 (4.68). Approximating solution of (4.65) by using Runge Kutta order 4 method.. Compute absolute errors and relative errors and plot the obtained numerical solutions and errors Subroutine s.m This subroutine provides the exact solution of (4.65). function s = s(t) s = 50/50*(50*cos(t)+sin(t)) + exp(-50*t)/50; 4... Subroutine f.m This subroutine provides the function f in RHS of (4.65). Users can modify these functions later. function f = f(t,y) f = -50*y + 50*cos(t);

38 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD Subroutine x.m This subroutine provides the Runge Kutta order 4 method. function x = x(a,b,c,h,t,y) k = f(t,y); k = f(t+c()*h,y+h*a(,)*k); k3 = f(t+c(3)*h,y+h*(a(3,)*k+a(3,)*k)); k4 = f(t+c(4)*h,y+h*(a(4,)*k+a(4,)*k+a(4,3)*k3)); x = h*(b()*k+b()*k+b(3)*k3+b(4)*k4); Main Routine RK4 close all clear all clc format long tic %% Initial. A() = ; A() = ; % A3() = ; N=000; h=5/n; t = 0:h:5; %% Coefficients a = [ ; / ; 0 / 0 0 ; 0 0 0]; b = [/6 /3 /3 /6]; c = [0 / / ]; a = [ ; / ; -/3 0 0 ; - 0]; b = [/8 3/8 3/8 /8]; c = [0 /3 /3 ]; %% Numerical Solution. for n=:n A(n+) = A(n) + x(a,b,c,h,t(n),a(n)); A(n+) = A(n) + x(a,b,c,h,t(n),a(n)); end %% Plot Numerical Solution

39 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 35 figure() hold on plot(t,s(t), b ); plot(t,a, r ); legend( Exact Solution, Numerical Solution ); title( Numerical Solution (Butcher Table ) ); figure() hold on plot(t,s(t), b ); plot(t,a, r ); legend( Exact Solution, Numerical Solution ); title( Numerical Solution (Butcher Table ) ); %% Absolute Error. display( Absolute Error ) ae = h*sum(abs(a-s(t))) display( Absolute Error ) ae = h*sum(abs(a-s(t))) figure(3) hold on plot(t,abs(a-s(t)), g ); plot(t,abs(a-s(t)), b ); legend( a b c, a b c ); title( Absolute Error ); %% Relative Error. display( Relative Error ) re = h*sum(abs((a-s(t))./s(t))) display( Relative Error ) re = h*sum(abs((a-s(t))./s(t))) figure(4) hold on plot(t,abs((a-s(t))./a), g ); plot(t,abs((a-s(t))./a), b ); legend( a b c, a b c ); title( Relative Error ); toc

40 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD Results Figure 4.: Numerical Solutions.

41 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD Brusselator Equation Figure 4.: Absolute Errors. Definition 4.. The Brusselator equation is the following system of equations In general, In vector form y = (y, y ), dy dt = 4y + yy (4.69) dy dt = 3y yy (4.70) dy dt = f (t, y, y ) (4.7) dy dt = f (t, y, y ) (4.7) dy dt = f (t, y) (4.73) 4... Subroutine f.m This subroutine provides f and f in the RHS of (4.7) and (4.7). Users can modify these functions later. function f = f(t,y) f() = -4*y()+y()^*y(); f() = 3*y()-y()^*y();

42 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 38 Figure 4.3: Relative Errors Subroutine x.m This subroutine provides the Runge Kutta order 4 method. function x = x(a,b,c,h,t,y) k = f(t,y); k = f(t+c()*h,y+h*a(,)*k); k3 = f(t+c(3)*h,y+h*(a(3,)*k+a(3,)*k)); k4 = f(t+c(4)*h,y+h*(a(4,)*k+a(4,)*k+a(4,3)*k3)); x = h*(b()*k+b()*k+b(3)*k3+b(4)*k4); Main Routine RK4.m clear all close all clc format long tic %% Initial for Reference Solutions. N0 = 0^6; h0= 0/N0; t0 = 0:h0:0; B = zeros(n0,);

43 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 39 B(,) =.5; B(,) = 3; B = zeros(n0,); B(,) =.5; B(,) = 3; %% Initial for Numerical Solutions. N = 0^4; h = 0/N; t = 0:h:0; A = zeros(n,); A(,) =.5; A(,) = 3; A = zeros(n,); A(,) =.5; A(,) = 3; A3 = zeros(n,); A3(,) =.5; A3(,) = 3; % Step step = N0/N; %% Runge Kutta initials. % Coefficients a = [ ; / ; 0 / 0 0 ; 0 0 0]; b = [/6 /3 /3 /6]; c = [0 / / ]; a = [ ; / ; -/3 0 0 ; - 0]; b = [/8 3/8 3/8 /8]; c = [0 /3 /3 ]; %% Reference Solutions. for n=:n0 B(n+,:) = B(n,:) + x(a,b,c,h0,t0(n),b(n,:)); B(n+,:) = B(n,:) + x(a,b,c,h0,t0(n),b(n,:)); end %% Numerical Solutions, Absolute Errors and Relative Errors.

44 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 40 ae = zeros(n+,); ae = zeros(n+,); re = zeros(n+,); re = zeros(n+,); for n=:n % Numerical Solutions A(n+,:) = A(n,:) + x(a,b,c,h,t(n),a(n,:)); A(n+,:) = A(n,:) + x(a,b,c,h,t(n),a(n,:)); % Absolute Errors ae(n,:) = h.*abs(a(n,:)-b(step*(n-)+,:)); ae(n,:) = h.*abs(a(n,:)-b(step*(n-)+,:)); % ae(n,) = abs((a(n,)-s(,t)); % ae(n,) = abs((a(n,)-s(,t)); % ae(n,) = abs((a(n,i)-s(,t)); % ae(n,) = abs((a(n,i)-s(,t)); % Relative Errors re(n,:) = h.*abs((a(n,:)... -B(step*(n-)+,:))./B(step*(n-)+,:)); re(n,:) = h.*abs((a(n,:)... -B(step*(n-)+,:))./B(step*(n-)+,:)); % re(n,) = abs((a(n,)-s(,t))./s(i,t)); % re(n,) = abs((a(n,)-s(,t))./s(i,t)); % re(n,) = abs((a(n,i)-s(,t))./s(i,t)); % re(n,) = abs((a(n,i)-s(,t))./s(i,t)); end % Absolute Errors display( Absolute Error of Table ) ae_y = h*sum(ae(:,)) ae_y = h*sum(ae(:,)) display( Absolute Error of Table ) ae_y = h*sum(ae(:,)) ae_y = h*sum(ae(:,)) % Relative Errors display( Relative Error of Table ) re_y = h*sum(re(:,)) re_y = h*sum(re(:,)) display( Relative Error of Table ) re_y = h*sum(re(:,)) re_y = h*sum(re(:,))

45 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 4 %% Plot Numerical Solution figure() subplot(,,) hold on % plot(t,s(,t), b ) plot(t0,b(:,), b ) plot(t,a(:,), r ) legend( Exact/Reference, Numerical Solution ); title( Numerical Solution for Y (Butcher Table ) ); subplot(,,) hold on % plot(t,s(,t), b ) plot(t0,b(:,), b ) plot(t,a(:,), r ) legend( Exact/Reference, Numerical Solution ); title( Numerical Solution for Y (Butcher Table ) ); figure() subplot(,,) hold on % plot(t,s(,t), b ) plot(t0,b(:,), b ) plot(t,a(:,), r ) legend( Exact/Reference, Numerical Solution ); title( Numerical Solution for Y (Butcher Table ) ); subplot(,,) hold on % plot(t,s(,t), b ) plot(t0,b(:,), b ) plot(t,a(:,), r ) legend( Exact/Reference, Numerical Solution ); title( Numerical Solution for Y (Butcher Table ) ); %% Plot: Dependency of y with respect to y. figure(3) hold on plot(a(:,),a(:,), b ); plot(a(:,),a(:,), g ); % plot(a3(:,),a3(:,), r ); legend( a b c, a b c ); title( Dependency of y with respect to y ); %% Plot Absolute Errors. figure(4) subplot(,,) hold on plot(t,ae(:,), b );

46 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 4 plot(t,ae(:,), g ); % plot(t,ae3(:,), r ); legend( a b c, a b c ); title( Absolute Errors Y ); subplot(,,) hold on plot(t,ae(:,), b ); plot(t,ae(:,), g ); % plot(t,ae3(:,), r ); legend( a b c, a b c ); title( Absolute Errors Y ); %% Plot Relative Errors. figure(5) subplot(,,) hold on plot(t,re(:,), b ); plot(t,re(:,), g ); % plot(t,re3(:,), r ); legend( a b c, a b c ); title( Relative Errors Y ); subplot(,,) hold on plot(t,re(:,), b ); plot(t,re(:,), g ); % plot(t,re3(:,), r ); legend( a b c, a b c ); title( Relative Errors Y ); toc

47 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD Results Figure 4.4: Numerical Solutions.

48 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 44 Figure 4.5: Dependency of y with respect to y Examples Subroutine s.m function s = s(t) s = [3*exp(*t)-*exp(3*t);-3*exp(*t)+4*exp(3*t)]; Subroutine f.m function f = f(t,y) % f=[y()-y(),*y()+4*y()]; f() = y()-y(); f() = *y()+4*y(); Subroutine x.m function x = x(a,b,c,h,t,y) k = f(t,y); k = f(t+c()*h,y+h*a(,)*k); k3 = f(t+c(3)*h,y+h*(a(3,)*k+a(3,)*k)); k4 = f(t+c(4)*h,y+h*(a(4,)*k+a(4,)*k+a(4,3)*k3)); x = h*(b()*k+b()*k+b(3)*k3+b(4)*k4); Main Routine RK4ex.m clear all

49 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 45 Figure 4.6: Absolute Errors. close all clc format long tic % %% Initial for Reference Solutions. % N0 = 0^6; % h0= 0/N0; % t0 = 0:h0:0; % % B = zeros(n0,); % B(,) = ; % B(,) = ; % % B = zeros(n0,); % B(,) = ; % B(,) = ; %% Initial for Numerical Solutions. N = 0^4; h = /N; t = 0:h:; A = zeros(n+,);

50 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 46 Figure 4.7: Relative Errors. A(,) = ; A(,) = ; A = zeros(n+,); A(,) = ; A(,) = ; A3 = zeros(n+,); A3(,) = ; A3(,) = ; % Step % step = N0/N; %% Runge Kutta initials. % Coefficients a = [ ; / ; 0 / 0 0 ; 0 0 0]; b = [/6 /3 /3 /6]; c = [0 / / ]; a = [ ;

51 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 47 / ; -/3 0 0 ; - 0]; b = [/8 3/8 3/8 /8]; c = [0 /3 /3 ]; % %% Reference Solutions. % for n=:n0 % B(n+,:) = B(n,:) + x(a,b,c,h0,t0(n),b(n,:)); % B(n+,:) = B(n,:) + x(a,b,c,h0,t0(n),b(n,:)); % end s=s(t) ; %% Numerical Solutions, Absolute Errors and Relative Errors. ae = zeros(n+,); ae = zeros(n+,); re = zeros(n+,); re = zeros(n+,); for n=:n % Numerical Solutions A(n+,:) = A(n,:) + x(a,b,c,h,t(n),a(n,:)); A(n+,:) = A(n,:) + x(a,b,c,h,t(n),a(n,:)); % Absolute Errors % ae(n,:) = h.*abs(a(n,:)-b(step*(n-)+,:)); ae = (abs(a-s)); % ae(n,:) = h.*abs(a(n,:)-b(step*(n-)+,:)); ae = (abs(a-s)); % ae(n,) = abs((a(n,)-s(,t)); % ae(n,) = abs((a(n,)-s(,t)); % ae(n,) = abs((a(n,i)-s(,t)); % ae(n,) = abs((a(n,i)-s(,t)); % Relative Errors % re(n,:) = h.*abs((a(n,:)-b(step*(n-)+,:))./b(step*(n-)+,:)); re = (abs((a-s)./s)); % re(n,:) = h.*abs((a(n,:)-b(step*(n-)+,:))./b(step*(n-)+,:)); re = (abs((a-s)./s)); % re(n,) = abs((a(n,)-s(,t))./s(i,t)); % re(n,) = abs((a(n,)-s(,t))./s(i,t)); % re(n,) = abs((a(n,i)-s(,t))./s(i,t)); % re(n,) = abs((a(n,i)-s(,t))./s(i,t)); end % Absolute Errors display( Absolute Error of Table ) ae_y = h*sum(ae(:,))

52 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 48 ae_y = h*sum(ae(:,)) display( Absolute Error of Table ) ae_y = h*sum(ae(:,)) ae_y = h*sum(ae(:,)) % Relative Errors display( Relative Error of Table ) re_y = h*sum(re(:,)) re_y = h*sum(re(:,)) display( Relative Error of Table ) re_y = h*sum(re(:,)) re_y = h*sum(re(:,)) %% Plot Numerical Solution figure() subplot(,,) hold on % plot(t,s(,t), b ) plot(t,s(:,), b ) plot(t,a(:,), r ) legend( Exact/Reference, Numerical Solution ); title( Numerical Solution for Y (Butcher Table ) ); subplot(,,) hold on % plot(t,s(,t), b ) plot(t,s(:,), b ) plot(t,a(:,), r ) legend( Exact/Reference, Numerical Solution ); title( Numerical Solution for Y (Butcher Table ) ); figure() subplot(,,) hold on % plot(t,s(,t), b ) plot(t,s(:,), b ) plot(t,a(:,), r ) legend( Exact/Reference, Numerical Solution ); title( Numerical Solution for Y (Butcher Table ) ); subplot(,,) hold on % plot(t,s(,t), b ) plot(t,s(:,), b ) plot(t,a(:,), r ) legend( Exact/Reference, Numerical Solution ); title( Numerical Solution for Y (Butcher Table ) );

53 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 49 %% Plot: Dependency of y with respect to y. figure(3) hold on plot(a(:,),a(:,), b ); plot(a(:,),a(:,), g ); % plot(a3(:,),a3(:,), r ); legend( Butcher Table, Butcher Table ); title( Dependency of y with respect to y ); %% Plot Absolute Errors. figure(4) subplot(,,) hold on plot(t,ae(:,), b ); plot(t,ae(:,), g ); % plot(t,ae3(:,), r ); legend( Butcher Table, Butcher Table ); title( Absolute Errors Y ); subplot(,,) hold on plot(t,ae(:,), b ); plot(t,ae(:,), g ); % plot(t,ae3(:,), r ); legend( Butcher Table, Butcher Table ); title( Absolute Errors Y ); %% Plot Relative Errors. figure(5) subplot(,,) hold on plot(t,re(:,), b ); plot(t,re(:,), g ); % plot(t,re3(:,), r ); legend( Butcher Table, Butcher Table ); title( Relative Errors Y ); subplot(,,) hold on plot(t,re(:,), b ); plot(t,re(:,), g ); % plot(t,re3(:,), r ); legend( Butcher Table, Butcher Table ); title( Relative Errors Y ); toc

54 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD Results Figure 4.8: Numerical Solutions.

55 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 5 Figure 4.9: Numerical Solutions. Figure 4.0: Dependency of y with respect to y.

56 CHAPTER 4. RUNGE KUTTA ORDER 4 METHOD 5 Figure 4.: Absolute Errors. Figure 4.: Relative Errors.

57 Alphabetical Index A absolute errors 33 autonomous form B Brusselator equation 37 Butcher table 3 Butcher tableau C Curtiss-Hirchfelder equation 33 E Euler s method 3 explicit Euler s method 3 F family of explicit Runge Kutta methods I initial value problems iterative method K Kutta s third order method 9 M mesh N non-autonomous form O order of accuracy R relative errors 33 Runge Kutta method Runge Kutta method of second order 7 Runge Kutta order method 3 Runge Kutta order method 4 Runge Kutta order 3 method 8 Runge Kutta order 4 method 0, 33 S step size stiff problems T Taylor s series 53

Numerical Linea Algebra Assignment 009

Numerical Linea Algebra Assignment 009 Numerical Linea Algebra Assignment 009 Nguyen Quan Ba Hong Students at Faculty of Math and Computer Science, Ho Chi Minh University of Science, Vietnam email. nguyenquanbahong@gmail.com blog. http://hongnguyenquanba.wordpress.com

More information

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of Scientific Computing with Case Studies SIAM Press, 2009 http://www.cs.umd.edu/users/oleary/sccswebpage Lecture Notes for Unit V Solution of Differential Equations Part 1 Dianne P. O Leary c 2008 1 The

More information

Initial value problems for ordinary differential equations

Initial value problems for ordinary differential equations AMSC/CMSC 660 Scientific Computing I Fall 2008 UNIT 5: Numerical Solution of Ordinary Differential Equations Part 1 Dianne P. O Leary c 2008 The Plan Initial value problems (ivps) for ordinary differential

More information

Numerical Differential Equations: IVP

Numerical Differential Equations: IVP Chapter 11 Numerical Differential Equations: IVP **** 4/16/13 EC (Incomplete) 11.1 Initial Value Problem for Ordinary Differential Equations We consider the problem of numerically solving a differential

More information

Applied Math for Engineers

Applied Math for Engineers Applied Math for Engineers Ming Zhong Lecture 15 March 28, 2018 Ming Zhong (JHU) AMS Spring 2018 1 / 28 Recap Table of Contents 1 Recap 2 Numerical ODEs: Single Step Methods 3 Multistep Methods 4 Method

More information

A short presentation on Newton-Raphson method

A short presentation on Newton-Raphson method A short presentation on Newton-Raphson method Doan Tran Nguyen Tung 5 Nguyen Quan Ba Hong 6 Students at Faculty of Math and Computer Science. Ho Chi Minh University of Science, Vietnam email. nguyenquanbahong@gmail.com

More information

Ordinary differential equations - Initial value problems

Ordinary differential equations - Initial value problems Education has produced a vast population able to read but unable to distinguish what is worth reading. G.M. TREVELYAN Chapter 6 Ordinary differential equations - Initial value problems In this chapter

More information

Mini project ODE, TANA22

Mini project ODE, TANA22 Mini project ODE, TANA22 Filip Berglund (filbe882) Linh Nguyen (linng299) Amanda Åkesson (amaak531) October 2018 1 1 Introduction Carl David Tohmé Runge (1856 1927) was a German mathematician and a prominent

More information

Numerical Methods for Differential Equations

Numerical Methods for Differential Equations Numerical Methods for Differential Equations Chapter 2: Runge Kutta and Linear Multistep methods Gustaf Söderlind and Carmen Arévalo Numerical Analysis, Lund University Textbooks: A First Course in the

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 6 Chapter 20 Initial-Value Problems PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 6 Chapter 20 Initial-Value Problems PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

Solving Ordinary Differential equations

Solving Ordinary Differential equations Solving Ordinary Differential equations Taylor methods can be used to build explicit methods with higher order of convergence than Euler s method. The main difficult of these methods is the computation

More information

Ordinary Differential Equations

Ordinary Differential Equations CHAPTER 8 Ordinary Differential Equations 8.1. Introduction My section 8.1 will cover the material in sections 8.1 and 8.2 in the book. Read the book sections on your own. I don t like the order of things

More information

Initial value problems for ordinary differential equations

Initial value problems for ordinary differential equations Initial value problems for ordinary differential equations Xiaojing Ye, Math & Stat, Georgia State University Spring 2019 Numerical Analysis II Xiaojing Ye, Math & Stat, Georgia State University 1 IVP

More information

Ordinary Differential Equations

Ordinary Differential Equations Chapter 7 Ordinary Differential Equations Differential equations are an extremely important tool in various science and engineering disciplines. Laws of nature are most often expressed as different equations.

More information

Numerical Methods for Differential Equations

Numerical Methods for Differential Equations Numerical Methods for Differential Equations Chapter 2: Runge Kutta and Multistep Methods Gustaf Söderlind Numerical Analysis, Lund University Contents V4.16 1. Runge Kutta methods 2. Embedded RK methods

More information

Multistep Methods for IVPs. t 0 < t < T

Multistep Methods for IVPs. t 0 < t < T Multistep Methods for IVPs We are still considering the IVP dy dt = f(t,y) t 0 < t < T y(t 0 ) = y 0 So far we have looked at Euler s method, which was a first order method and Runge Kutta (RK) methods

More information

Physics 584 Computational Methods

Physics 584 Computational Methods Physics 584 Computational Methods Introduction to Matlab and Numerical Solutions to Ordinary Differential Equations Ryan Ogliore April 18 th, 2016 Lecture Outline Introduction to Matlab Numerical Solutions

More information

Numerical solution of ODEs

Numerical solution of ODEs Numerical solution of ODEs Arne Morten Kvarving Department of Mathematical Sciences Norwegian University of Science and Technology November 5 2007 Problem and solution strategy We want to find an approximation

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 5 Chapter 21 Numerical Differentiation PowerPoints organized by Dr. Michael R. Gustafson II, Duke University 1 All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations Introduction: first order ODE We are given a function f(t,y) which describes a direction field in the (t,y) plane an initial point (t 0,y 0 ) We want to find a function

More information

Solving Delay Differential Equations (DDEs) using Nakashima s 2 Stages 4 th Order Pseudo-Runge-Kutta Method

Solving Delay Differential Equations (DDEs) using Nakashima s 2 Stages 4 th Order Pseudo-Runge-Kutta Method World Applied Sciences Journal (Special Issue of Applied Math): 8-86, 3 ISSN 88-495; IDOSI Publications, 3 DOI:.589/idosi.wasj.3..am.43 Solving Delay Differential Equations (DDEs) using Naashima s Stages

More information

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 1. Runge-Kutta Methods

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 1. Runge-Kutta Methods Numerical Analysis by Dr. Anita Pal Assistant Professor Department of Mathematics National Institute of Technology Durgapur Durgapur-71309 email: anita.buie@gmail.com 1 . Chapter 8 Numerical Solution of

More information

Fourth Order RK-Method

Fourth Order RK-Method Fourth Order RK-Method The most commonly used method is Runge-Kutta fourth order method. The fourth order RK-method is y i+1 = y i + 1 6 (k 1 + 2k 2 + 2k 3 + k 4 ), Ordinary Differential Equations (ODE)

More information

Extended Runge Kutta-like formulae

Extended Runge Kutta-like formulae Applied Numerical Mathematics 56 006 584 605 www.elsevier.com/locate/apnum Extended Runge Kutta-like formulae Xinyuan Wu a Jianlin Xia b a State Key Laboratory for Novel Software Technology Department

More information

Solving scalar IVP s : Runge-Kutta Methods

Solving scalar IVP s : Runge-Kutta Methods Solving scalar IVP s : Runge-Kutta Methods Josh Engwer Texas Tech University March 7, NOTATION: h step size x n xt) t n+ t + h x n+ xt n+ ) xt + h) dx = ft, x) SCALAR IVP ASSUMED THROUGHOUT: dt xt ) =

More information

4.4 Computing π, ln 2 and e

4.4 Computing π, ln 2 and e 252 4.4 Computing π, ln 2 and e The approximations π 3.1415927, ln 2 0.69314718, e 2.7182818 can be obtained by numerical methods applied to the following initial value problems: (1) y = 4, 1 + x2 y(0)

More information

ACCELERATION OF RUNGE-KUTTA INTEGRATION SCHEMES

ACCELERATION OF RUNGE-KUTTA INTEGRATION SCHEMES ACCELERATION OF RUNGE-KUTTA INTEGRATION SCHEMES PHAILAUNG PHOHOMSIRI AND FIRDAUS E. UDWADIA Received 24 November 2003 A simple accelerated third-order Runge-Kutta-type, fixed time step, integration scheme

More information

Numerical Methods - Initial Value Problems for ODEs

Numerical Methods - Initial Value Problems for ODEs Numerical Methods - Initial Value Problems for ODEs Y. K. Goh Universiti Tunku Abdul Rahman 2013 Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs 2013 1 / 43 Outline 1 Initial Value

More information

Introduction to standard and non-standard Numerical Methods

Introduction to standard and non-standard Numerical Methods Introduction to standard and non-standard Numerical Methods Dr. Mountaga LAM AMS : African Mathematic School 2018 May 23, 2018 One-step methods Runge-Kutta Methods Nonstandard Finite Difference Scheme

More information

Lecture Notes on Numerical Differential Equations: IVP

Lecture Notes on Numerical Differential Equations: IVP Lecture Notes on Numerical Differential Equations: IVP Professor Biswa Nath Datta Department of Mathematical Sciences Northern Illinois University DeKalb, IL. 60115 USA E mail: dattab@math.niu.edu URL:

More information

Solving Ordinary Differential Equations

Solving Ordinary Differential Equations Solving Ordinary Differential Equations Sanzheng Qiao Department of Computing and Software McMaster University March, 2014 Outline 1 Initial Value Problem Euler s Method Runge-Kutta Methods Multistep Methods

More information

Improved Extended Runge-Kutta-like Method for Solving First Order IVPs

Improved Extended Runge-Kutta-like Method for Solving First Order IVPs Indian Journal of Science and Technology, Vol 9(48), DOI: 0.7485/ijst/06/v9i48/0938, December 06 ISSN (Print) : 0974-6846 ISSN (Online) : 0974-5645 Improved Extended Runge-Kutta-like Method for Solving

More information

Mathematics for chemical engineers. Numerical solution of ordinary differential equations

Mathematics for chemical engineers. Numerical solution of ordinary differential equations Mathematics for chemical engineers Drahoslava Janovská Numerical solution of ordinary differential equations Initial value problem Winter Semester 2015-2016 Outline 1 Introduction 2 One step methods Euler

More information

Project on Newton-Raphson Method

Project on Newton-Raphson Method Project on Newton-Raphson Method Nguyen Quan Ba Hong Doan Tran Nguyen Tung Students at Faculty of Math and Computer Science, Ho Chi Minh University of Science, Vietnam email. email. dtrngtung@live.com

More information

Multistage Methods I: Runge-Kutta Methods

Multistage Methods I: Runge-Kutta Methods Multistage Methods I: Runge-Kutta Methods Varun Shankar January, 0 Introduction Previously, we saw that explicit multistep methods (AB methods) have shrinking stability regions as their orders are increased.

More information

Numerical Analysis II. Problem Sheet 9

Numerical Analysis II. Problem Sheet 9 H. Ammari W. Wu S. Yu Spring Term 08 Numerical Analysis II ETH Zürich D-MATH Problem Sheet 9 Problem 9. Extrapolation of the Implicit Mid-Point Rule. Taking the implicit mid-point rule as a basis method,

More information

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20 2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20 REVIEW Lecture 19: Finite Volume Methods Review: Basic elements of a FV scheme and steps to step-up a FV scheme One Dimensional examples d x j x j 1/2

More information

Chap. 20: Initial-Value Problems

Chap. 20: Initial-Value Problems Chap. 20: Initial-Value Problems Ordinary Differential Equations Goal: to solve differential equations of the form: dy dt f t, y The methods in this chapter are all one-step methods and have the general

More information

Notes on Continued Fractions for Math 4400

Notes on Continued Fractions for Math 4400 . Continued fractions. Notes on Continued Fractions for Math 4400 The continued fraction expansion converts a positive real number α into a sequence of natural numbers. Conversely, a sequence of natural

More information

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations ECE257 Numerical Methods and Scientific Computing Ordinary Differential Equations Today s s class: Stiffness Multistep Methods Stiff Equations Stiffness occurs in a problem where two or more independent

More information

Ordinary Differential Equations II: Runge-Kutta and Advanced Methods

Ordinary Differential Equations II: Runge-Kutta and Advanced Methods Ordinary Differential Equations II: Runge-Kutta and Advanced Methods Sam Sinayoko Numerical Methods 3 Contents 1 Learning Outcomes 2 2 Introduction 2 2.1 Note................................ 4 2.2 Limitations

More information

Integration of Ordinary Differential Equations

Integration of Ordinary Differential Equations Integration of Ordinary Differential Equations Com S 477/577 Nov 7, 00 1 Introduction The solution of differential equations is an important problem that arises in a host of areas. Many differential equations

More information

THEODORE VORONOV DIFFERENTIABLE MANIFOLDS. Fall Last updated: November 26, (Under construction.)

THEODORE VORONOV DIFFERENTIABLE MANIFOLDS. Fall Last updated: November 26, (Under construction.) 4 Vector fields Last updated: November 26, 2009. (Under construction.) 4.1 Tangent vectors as derivations After we have introduced topological notions, we can come back to analysis on manifolds. Let M

More information

COSC 3361 Numerical Analysis I Ordinary Differential Equations (II) - Multistep methods

COSC 3361 Numerical Analysis I Ordinary Differential Equations (II) - Multistep methods COSC 336 Numerical Analysis I Ordinary Differential Equations (II) - Multistep methods Fall 2005 Repetition from the last lecture (I) Initial value problems: dy = f ( t, y) dt y ( a) = y 0 a t b Goal:

More information

Validated Explicit and Implicit Runge-Kutta Methods

Validated Explicit and Implicit Runge-Kutta Methods Validated Explicit and Implicit Runge-Kutta Methods Alexandre Chapoutot joint work with Julien Alexandre dit Sandretto and Olivier Mullier U2IS, ENSTA ParisTech 8th Small Workshop on Interval Methods,

More information

MTH 452/552 Homework 3

MTH 452/552 Homework 3 MTH 452/552 Homework 3 Do either 1 or 2. 1. (40 points) [Use of ode113 and ode45] This problem can be solved by a modifying the m-files odesample.m and odesampletest.m available from the author s webpage.

More information

On the reliability and stability of direct explicit Runge-Kutta integrators

On the reliability and stability of direct explicit Runge-Kutta integrators Global Journal of Pure and Applied Mathematics. ISSN 973-78 Volume, Number 4 (), pp. 3959-3975 Research India Publications http://www.ripublication.com/gjpam.htm On the reliability and stability of direct

More information

arxiv: v1 [math.na] 17 Feb 2014

arxiv: v1 [math.na] 17 Feb 2014 DEVELOPING EXPLICIT RUNGE-KUTTA FORMULAS USING OPEN-SOURCE SOFTWARE ALASDAIR MCANDREW arxiv:4.v [math.na] 7 Feb 4 Abstract. Runge-Kutta formulas are some of the workhorses of numerical solving of differential

More information

Explicit One-Step Methods

Explicit One-Step Methods Chapter 1 Explicit One-Step Methods Remark 11 Contents This class presents methods for the numerical solution of explicit systems of initial value problems for ordinary differential equations of first

More information

Initial Value Problems

Initial Value Problems Numerical Analysis, lecture 13: Initial Value Problems (textbook sections 10.1-4, 10.7) differential equations standard form existence & uniqueness y 0 y 2 solution methods x 0 x 1 h h x 2 y1 Euler, Heun,

More information

MA108 ODE: Picard s Theorem

MA108 ODE: Picard s Theorem MA18 ODE: Picard s Theorem Preeti Raman IIT Bombay MA18 Existence and Uniqueness The IVP s that we have considered usually have unique solutions. This need not always be the case. MA18 Example Example:

More information

The family of Runge Kutta methods with two intermediate evaluations is defined by

The family of Runge Kutta methods with two intermediate evaluations is defined by AM 205: lecture 13 Last time: Numerical solution of ordinary differential equations Today: Additional ODE methods, boundary value problems Thursday s lecture will be given by Thomas Fai Assignment 3 will

More information

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo 2008-11-07 Graded Project #1 Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo This homework is due to be handed in on Wednesday 12 November 2008 before 13:00 in the post box of the numerical

More information

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester HIGHER ORDER METHODS School of Mathematics Semester 1 2008 OUTLINE 1 REVIEW 2 HIGHER ORDER METHODS 3 MULTISTEP METHODS 4 SUMMARY OUTLINE 1 REVIEW 2 HIGHER ORDER METHODS 3 MULTISTEP METHODS 4 SUMMARY OUTLINE

More information

Definition 5.1. A vector field v on a manifold M is map M T M such that for all x M, v(x) T x M.

Definition 5.1. A vector field v on a manifold M is map M T M such that for all x M, v(x) T x M. 5 Vector fields Last updated: March 12, 2012. 5.1 Definition and general properties We first need to define what a vector field is. Definition 5.1. A vector field v on a manifold M is map M T M such that

More information

5.2 - Euler s Method

5.2 - Euler s Method 5. - Euler s Method Consider solving the initial-value problem for ordinary differential equation: (*) y t f t, y, a t b, y a. Let y t be the unique solution of the initial-value problem. In the previous

More information

1 Ordinary differential equations

1 Ordinary differential equations Numerical Analysis Seminar Frühjahrssemester 08 Lecturers: Prof. M. Torrilhon, Prof. D. Kressner The Störmer-Verlet method F. Crivelli (flcrivel@student.ethz.ch May 8, 2008 Introduction During this talk

More information

FORTRAN 77 Lesson 7. Reese Haywood Ayan Paul

FORTRAN 77 Lesson 7. Reese Haywood Ayan Paul FORTRAN 77 Lesson 7 Reese Haywood Ayan Paul 1 Numerical Integration A general all purpose Numerical Integration technique is the Trapezoidal Method. For most functions, this method is fast and accurate.

More information

Fifth-Order Improved Runge-Kutta Method With Reduced Number of Function Evaluations

Fifth-Order Improved Runge-Kutta Method With Reduced Number of Function Evaluations Australian Journal of Basic and Applied Sciences, 6(3): 9-5, 22 ISSN 99-88 Fifth-Order Improved Runge-Kutta Method With Reduced Number of Function Evaluations Faranak Rabiei, Fudziah Ismail Department

More information

2 Numerical Methods for Initial Value Problems

2 Numerical Methods for Initial Value Problems Numerical Analysis of Differential Equations 44 2 Numerical Methods for Initial Value Problems Contents 2.1 Some Simple Methods 2.2 One-Step Methods Definition and Properties 2.3 Runge-Kutta-Methods 2.4

More information

Lecture 42 Determining Internal Node Values

Lecture 42 Determining Internal Node Values Lecture 42 Determining Internal Node Values As seen in the previous section, a finite element solution of a boundary value problem boils down to finding the best values of the constants {C j } n, which

More information

You may not use your books, notes; calculators are highly recommended.

You may not use your books, notes; calculators are highly recommended. Math 301 Winter 2013-14 Midterm 1 02/06/2014 Time Limit: 60 Minutes Name (Print): Instructor This exam contains 8 pages (including this cover page) and 6 problems. Check to see if any pages are missing.

More information

Higher Order Taylor Methods

Higher Order Taylor Methods Higher Order Taylor Methods Marcelo Julio Alvisio & Lisa Marie Danz May 6, 2007 Introduction Differential equations are one of the building blocks in science or engineering. Scientists aim to obtain numerical

More information

Runge-Kutta and Collocation Methods Florian Landis

Runge-Kutta and Collocation Methods Florian Landis Runge-Kutta and Collocation Methods Florian Landis Geometrical Numetric Integration p.1 Overview Define Runge-Kutta methods. Introduce collocation methods. Identify collocation methods as Runge-Kutta methods.

More information

7 Planar systems of linear ODE

7 Planar systems of linear ODE 7 Planar systems of linear ODE Here I restrict my attention to a very special class of autonomous ODE: linear ODE with constant coefficients This is arguably the only class of ODE for which explicit solution

More information

A SYMBOLIC-NUMERIC APPROACH TO THE SOLUTION OF THE BUTCHER EQUATIONS

A SYMBOLIC-NUMERIC APPROACH TO THE SOLUTION OF THE BUTCHER EQUATIONS CANADIAN APPLIED MATHEMATICS QUARTERLY Volume 17, Number 3, Fall 2009 A SYMBOLIC-NUMERIC APPROACH TO THE SOLUTION OF THE BUTCHER EQUATIONS SERGEY KHASHIN ABSTRACT. A new approach based on the use of new

More information

Ordinary Differential Equations. Monday, October 10, 11

Ordinary Differential Equations. Monday, October 10, 11 Ordinary Differential Equations Monday, October 10, 11 Problems involving ODEs can always be reduced to a set of first order differential equations. For example, By introducing a new variable z, this can

More information

A Study on Linear and Nonlinear Stiff Problems. Using Single-Term Haar Wavelet Series Technique

A Study on Linear and Nonlinear Stiff Problems. Using Single-Term Haar Wavelet Series Technique Int. Journal of Math. Analysis, Vol. 7, 3, no. 53, 65-636 HIKARI Ltd, www.m-hikari.com http://dx.doi.org/.988/ijma.3.3894 A Study on Linear and Nonlinear Stiff Problems Using Single-Term Haar Wavelet Series

More information

Improved Starting Methods for Two-Step Runge Kutta Methods of Stage-Order p 3

Improved Starting Methods for Two-Step Runge Kutta Methods of Stage-Order p 3 Improved Starting Methods for Two-Step Runge Kutta Methods of Stage-Order p 3 J.H. Verner August 3, 2004 Abstract. In [5], Jackiewicz and Verner derived formulas for, and tested the implementation of two-step

More information

A NOTE ON EXPLICIT THREE-DERIVATIVE RUNGE-KUTTA METHODS (ThDRK)

A NOTE ON EXPLICIT THREE-DERIVATIVE RUNGE-KUTTA METHODS (ThDRK) BULLETIN OF THE INTERNATIONAL MATHEMATICAL VIRTUAL INSTITUTE ISSN 303-4874 (p), ISSN (o) 303-4955 www.imvibl.org / JOURNALS / BULLETIN Vol. 5(015), 65-7 Former BULLETIN OF THE SOCIETY OF MATHEMATICIANS

More information

Advanced methods for ODEs and DAEs

Advanced methods for ODEs and DAEs Advanced methods for ODEs and DAEs Lecture 8: Dirk and Rosenbrock Wanner methods Bojana Rosic, 14 Juni 2016 General implicit Runge Kutta method Runge Kutta method is presented by Butcher table: c1 a11

More information

Exercises, module A (ODEs, numerical integration etc)

Exercises, module A (ODEs, numerical integration etc) FYTN HT18 Dept. of Astronomy and Theoretical Physics Lund University, Sweden Exercises, module A (ODEs, numerical integration etc) 1. Use Euler s method to solve y (x) = y(x), y() = 1. (a) Determine y

More information

Section 7.4 Runge-Kutta Methods

Section 7.4 Runge-Kutta Methods Section 7.4 Runge-Kutta Methods Key terms: Taylor methods Taylor series Runge-Kutta; methods linear combinations of function values at intermediate points Alternatives to second order Taylor methods Fourth

More information

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations We call Ordinary Differential Equation (ODE) of nth order in the variable x, a relation of the kind: where L is an operator. If it is a linear operator, we call the equation

More information

Checking the Radioactive Decay Euler Algorithm

Checking the Radioactive Decay Euler Algorithm Lecture 2: Checking Numerical Results Review of the first example: radioactive decay The radioactive decay equation dn/dt = N τ has a well known solution in terms of the initial number of nuclei present

More information

Backward error analysis

Backward error analysis Backward error analysis Brynjulf Owren July 28, 2015 Introduction. The main source for these notes is the monograph by Hairer, Lubich and Wanner [2]. Consider ODEs in R d of the form ẏ = f(y), y(0) = y

More information

1 Ordinary Differential Equations

1 Ordinary Differential Equations Ordinary Differential Equations.0 Mathematical Background.0. Smoothness Definition. A function f defined on [a, b] is continuous at ξ [a, b] if lim x ξ f(x) = f(ξ). Remark Note that this implies existence

More information

Discrete Structures Lecture Solving Congruences. mathematician of the eighteenth century). Also, the equation gggggg(aa, bb) =

Discrete Structures Lecture Solving Congruences. mathematician of the eighteenth century). Also, the equation gggggg(aa, bb) = First Introduction Our goal is to solve equations having the form aaaa bb (mmmmmm mm). However, first we must discuss the last part of the previous section titled gcds as Linear Combinations THEOREM 6

More information

Math Numerical Analysis Homework #4 Due End of term. y = 2y t 3y2 t 3, 1 t 2, y(1) = 1. n=(b-a)/h+1; % the number of steps we need to take

Math Numerical Analysis Homework #4 Due End of term. y = 2y t 3y2 t 3, 1 t 2, y(1) = 1. n=(b-a)/h+1; % the number of steps we need to take Math 32 - Numerical Analysis Homework #4 Due End of term Note: In the following y i is approximation of y(t i ) and f i is f(t i,y i ).. Consider the initial value problem, y = 2y t 3y2 t 3, t 2, y() =.

More information

A First Course on Kinetics and Reaction Engineering Supplemental Unit S5. Solving Initial Value Differential Equations

A First Course on Kinetics and Reaction Engineering Supplemental Unit S5. Solving Initial Value Differential Equations Supplemental Unit S5. Solving Initial Value Differential Equations Defining the Problem This supplemental unit describes how to solve a set of initial value ordinary differential equations (ODEs) numerically.

More information

Chapter 5 Exercises. (a) Determine the best possible Lipschitz constant for this function over 2 u <. u (t) = log(u(t)), u(0) = 2.

Chapter 5 Exercises. (a) Determine the best possible Lipschitz constant for this function over 2 u <. u (t) = log(u(t)), u(0) = 2. Chapter 5 Exercises From: Finite Difference Methods for Ordinary and Partial Differential Equations by R. J. LeVeque, SIAM, 2007. http://www.amath.washington.edu/ rjl/fdmbook Exercise 5. (Uniqueness for

More information

Numerical Methods for the Solution of Differential Equations

Numerical Methods for the Solution of Differential Equations Numerical Methods for the Solution of Differential Equations Markus Grasmair Vienna, winter term 2011 2012 Analytical Solutions of Ordinary Differential Equations 1. Find the general solution of the differential

More information

Section 2.1 Differential Equation and Solutions

Section 2.1 Differential Equation and Solutions Section 2.1 Differential Equation and Solutions Key Terms: Ordinary Differential Equation (ODE) Independent Variable Order of a DE Partial Differential Equation (PDE) Normal Form Solution General Solution

More information

Math Midterm Solutions

Math Midterm Solutions Math 145 - Midterm Solutions Problem 1. (10 points.) Let n 2, and let S = {a 1,..., a n } be a finite set with n elements in A 1. (i) Show that the quasi-affine set A 1 \ S is isomorphic to an affine set.

More information

α = Permutation groups

α = Permutation groups Permutation groups A permutation of a set A is another name for a bijection from A to A, that is, any function ϕ: A A which is both one-to-one and onto. When A is a finite set with n objects, it is customary

More information

The Initial Value Problem for Ordinary Differential Equations

The Initial Value Problem for Ordinary Differential Equations Chapter 5 The Initial Value Problem for Ordinary Differential Equations In this chapter we begin a study of time-dependent differential equations, beginning with the initial value problem (IVP) for a time-dependent

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 9 Initial Value Problems for Ordinary Differential Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign

More information

Series Solutions Near an Ordinary Point

Series Solutions Near an Ordinary Point Series Solutions Near an Ordinary Point MATH 365 Ordinary Differential Equations J. Robert Buchanan Department of Mathematics Spring 2018 Ordinary Points (1 of 2) Consider the second order linear homogeneous

More information

Euler s Method, cont d

Euler s Method, cont d Jim Lambers MAT 461/561 Spring Semester 009-10 Lecture 3 Notes These notes correspond to Sections 5. and 5.4 in the text. Euler s Method, cont d We conclude our discussion of Euler s method with an example

More information

Lecture 4: Numerical solution of ordinary differential equations

Lecture 4: Numerical solution of ordinary differential equations Lecture 4: Numerical solution of ordinary differential equations Department of Mathematics, ETH Zürich General explicit one-step method: Consistency; Stability; Convergence. High-order methods: Taylor

More information

CHAPTER 10: Numerical Methods for DAEs

CHAPTER 10: Numerical Methods for DAEs CHAPTER 10: Numerical Methods for DAEs Numerical approaches for the solution of DAEs divide roughly into two classes: 1. direct discretization 2. reformulation (index reduction) plus discretization Direct

More information

Series Solutions. 8.1 Taylor Polynomials

Series Solutions. 8.1 Taylor Polynomials 8 Series Solutions 8.1 Taylor Polynomials Polynomial functions, as we have seen, are well behaved. They are continuous everywhere, and have continuous derivatives of all orders everywhere. It also turns

More information

8.1 Introduction. Consider the initial value problem (IVP):

8.1 Introduction. Consider the initial value problem (IVP): 8.1 Introduction Consider the initial value problem (IVP): y dy dt = f(t, y), y(t 0)=y 0, t 0 t T. Geometrically: solutions are a one parameter family of curves y = y(t) in(t, y)-plane. Assume solution

More information

NUMERICAL SOLUTION OF ODE IVPs. Overview

NUMERICAL SOLUTION OF ODE IVPs. Overview NUMERICAL SOLUTION OF ODE IVPs 1 Quick review of direction fields Overview 2 A reminder about and 3 Important test: Is the ODE initial value problem? 4 Fundamental concepts: Euler s Method 5 Fundamental

More information

Numerical Integration of SDEs: A Short Tutorial

Numerical Integration of SDEs: A Short Tutorial Numerical Integration of SDEs: A Short Tutorial Thomas Schaffter January 19, 010 1 Introduction 1.1 Itô and Stratonovich SDEs 1-dimensional stochastic differentiable equation (SDE) is given by [6, 7] dx

More information

Introduction to the Numerical Solution of IVP for ODE

Introduction to the Numerical Solution of IVP for ODE Introduction to the Numerical Solution of IVP for ODE 45 Introduction to the Numerical Solution of IVP for ODE Consider the IVP: DE x = f(t, x), IC x(a) = x a. For simplicity, we will assume here that

More information

ONE- AND TWO-STAGE IMPLICIT INTERVAL METHODS OF RUNGE-KUTTA TYPE

ONE- AND TWO-STAGE IMPLICIT INTERVAL METHODS OF RUNGE-KUTTA TYPE COMPUTATIONAL METHODS IN SCIENCE AND TECHNOLOGY 5,53-65 (1999) ONE- AND TWO-STAGE IMPLICIT INTERVAL METHODS OF RUNGE-KUTTA TYPE ANDRZEJ MARCINIAK 1, BARBARA SZYSZKA 2 1 Institute of Computing Science,

More information

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9 Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T. Heath Chapter 9 Initial Value Problems for Ordinary Differential Equations Copyright c 2001. Reproduction

More information

Solution: (a) Before opening the parachute, the differential equation is given by: dv dt. = v. v(0) = 0

Solution: (a) Before opening the parachute, the differential equation is given by: dv dt. = v. v(0) = 0 Math 2250 Lab 4 Name/Unid: 1. (35 points) Leslie Leroy Irvin bails out of an airplane at the altitude of 16,000 ft, falls freely for 20 s, then opens his parachute. Assuming linear air resistance ρv ft/s

More information