Leonado Jounal of Sciences ISSN 1583-0233 Issue 18, Januay-June 2011 p. 1-10 On Eo Estimation in Runge-Kutta Methods Ochoche ABRAHAM 1,*, Gbolahan BOLARIN 2 1 Depatment of Infomation Technology, 2 Depatment of Mathematics & Statistics Fedeal Univesity of Technology, Minna, Nigeia E-mails: abahamo@membe.ams.og, gbolahan.bolain@gmail.com * Coesponding autho: abahamo@membe.ams.og Received: 16 Decembe 2010/ Accepted: 17 Mach 2011 / Published: 24 June 2011 Abstact It is common knowledge that the bounds fo the local tuncation eos in Runge-Kutta methods do not fom a suitable basis fo monitoing the local tuncation eo. In this pape, we have pesented an established pocess by which a eadily computable estimate of the local tuncation eo can be obtained without need to obtain exact solutions o solve poblems analytically. Keywods Eo; Estimation; Runge-Kutta; Richadson Extapolation; Exact, Appoximate. Intoduction Histoically, diffeential equations have oiginated in chemisty, physics and engineeing. Moe ecently, they have also aisen in medicine, biology, anthopology, and the like. Howeve, we ae going to estict ouselves to Odinay Diffeential Equations (ODE), with special emphasis on Initial Value Poblems (IVP), so called because the condition on the solution of the diffeential equation, ae all specified at the stat of the tajectoy i.e. they ae initial conditions [1]. In [2], it was stated that among the models using diffeential equations, odinay diffeential equations (ODE) ae fequently used to descibe vaious physical poblems, fo http://ljs.academicdiect.og 1
On Eo Estimation in Runge-Kutta Methods Ochoche ABRAHAM and Gbolahan BOLARIN example, motions of the planets in a gavity field like the Keple poblem, the simple pendulum, electical cicuits and chemical kinetics poblem. An ODE has the fom: y (x) = f(x, y(x)) (1) whee x is the independent vaiable which often efes to time in a physical poblem and the dependent vaiable y(x), is the solution. Since y(x) could be an N dimensional vecto valued function, the domain and ange of the odinay diffeential equation, f and the solution y ae given by: N N f : R R R, (2) N y : R R The above ODE is called non-autonomous because f is a function of both x and y. howeve, by simply intoducing an exta vaiable, which is always exactly equal to x, it can be easily ewitten in an equivalent autonomous fom as: y (x) = f(y(x)) whee f is a function of y only. Unfotunately, many poblems involving ODE cannot be solved exactly. This is why the ability to numeically appoximate these methods is so impotant [2]. Numeical solution of ODEs is the most impotant technique eve developed in continuous time dynamics. Since most ODEs ae not soluble analytically, numeical integation is the only way to obtain infomation about the tajectoy. Many diffeent methods have been poposed and used in an attempt to solve accuately, vaious types of ODEs. Howeve, thee is a handful of methods known and used univesally (i.e. Runge-Kutta, Adam- Bashfoth-Moulton and Backwad Diffeence Fomulae). All these discetise the diffeential system to poduce a diffeence equation o map [3]. The methods, obtain diffeent maps fom the same equation, but they have the same aim; that the dynamics of the maps, should coespond closely, to the dynamics of the diffeential equation. Fom the Runge-Kutta family of algoithms, come the most well-known and used methods fo numeical integation [4]. With the advent of computes, numeical methods ae now an inceasingly attactive and efficient way to obtain appoximate solutions to diffeential equations that had hitheto poved difficult, even impossible to solve analytically. Howeve, fo this wok, we ae paticulaly inteested in the class of methods fist poposed by David Runge (1856-1927) [5], a Geman mathematician and physicist, and futhe extended by anothe Geman 2
Leonado Jounal of Sciences ISSN 1583-0233 Issue 18, Januay-June 2011 p. 1-10 mathematician called Wilhelm Kutta (1867-1944) [6] to systems of equation; a method commonly efeed to as the Runge-Kutta method. Mateial and Method The Dynamics of Runge-Kutta Methods We conside the IVP: y = f(x, y), y(a) = α (3) The Runge-Kutta methods fo the solution of Equation (3), ae one-step methods designed to appoximate Taylo seies methods but have the advantage of not equiing explicit evaluation of the deivatives of f(x, y), whee x often epesents time (t). The basic idea is to use a linea combination of values of f(x, y) to appoximate y(x). This linea combination is matched up as closely as possible, with a Taylo seies fo y(x) to obtain methods of the highest possible ode. It will be supposed that the initial value (x 0, y 0 ) is not singula with espect to the equation and that a solution exists, which can be developed in Taylo seies. [7] Accoding to [8], [9], the geneal S-stage Runge-Kutta method is defined by: yn+ 1 yn = hφ(x n, yn,h) (4) abscissa. φ(x, y;h) = c = 1 s= 1 a s s = 1 b k, k M k 1, = 2,3, L, S = f (x, y), = f (x + c h, y + h 1 s= 1 a s ks), = 2,3, L,S Call k=[k 1, k 2,,k s ] the slopes, b=[b 1, b 2,,b s ] the weights, and c=[c 1, c 2,,c s ] the An s-stage R-K method equies s functions evaluation pe step. Each of the functions k = (x, y, h), = 1, 2 s may be intepeted as an appoximation to the deivative y (x) and (5) (6) 3
On Eo Estimation in Runge-Kutta Methods Ochoche ABRAHAM and Gbolahan BOLARIN the function φ(x, y, h) as a weighted mean of these appoximations. Consistency, demands that s =1b = 1. Deivation of an s-stage Runge-Kutta Method Accoding to [1], thee ae thee ways of deiving Runge-Kutta methods: Taylo seies expansion; The algebaic concept of ooted tees; Compute algeba. In this pape, ou discussions would be on the Taylo seies expansion method. The pocess of deiving a given R-K method by Taylo seies expansion can be summaized into the following thee steps: Step1: Obtain the Taylo seies expansion of k (the slopes) defined by: k = f(z, y n +h s<j=1 a j k j ) (7) whee: z = x n + c h, =1(1)s about the point (x n, y n ) in the solution space. Step 2: Inset these expansions and c (c = s j=1a j,=1(1) into the expession fo the geneal S- stage R-K method, given as: φ RK = s<j=1 b j k j, s 1 (8) Step 3: Compae the coefficients in powes of h fo both the incement function φ RK of the Runge-Kutta method given by Equation (8) above and the incement function φ T fo the Taylo expansion method specified by: φ h h p 1 p 1 γ (p 1) ( γ) + T ( x, y,h) f (x, y) f (x, y) +... + f (x, y) = f (x n, yn ) 2! p! γ= 0 ( + 1)! h (9) It has been shown [8], [9] and [10], that if these functions agee up to tems in h p, then the pocess is of ode p. The totality of the unknown coefficients {b j, c, a j, j=1(1s)} nomally exceeds the numbe of equations, leaving us with some fee paametes to which we can assign values, [11]. 4
Leonado Jounal of Sciences ISSN 1583-0233 Issue 18, Januay-June 2011 p. 1-10 Richadson Extapolation One majo flaw in the Runge-Kutta methods is that it is quite difficult and complicated to watch eos. Accoding to [8], bounds fo the local tuncation eos do not fom a suitable basis fo monitoing the local tuncation eo, with a view to constucting a stepcontol policy simila to that developed fo Pedicto-Coecto methods. What is needed, in place of a bound, is a eadily computable estimate of the local tuncation eo, simila to that obtained by Milne s device fo pedicto-coecto pais. The estimate we ae pesenting aises fom an application of the pocess of defeed appoach to the limit, othewise known as Richadson extapolation. This involves solving a poblem twice using step sizes h and 2h. Unde the localizing assumption that no pevious eos have been made, we may wite: y(x n+1 ) y n+1 = T n+1 = φ(x n, y(x n ))h p+1 +o(h p+2 ) (10) whee p is the ode of the Runge-Kutta method, φ(x n, y(x n ))h p+1 is the pincipal local tuncation eo. Next, we will compute y * n+1, a second appoximation to y(x n+1 ), obtained by applying the same method at x n-1 with steplenght 2h. Unde the same localizing assumption, it follows that: y(x n+1 ) y * n+1 = φ(x n-1, y(x n-1 ))(2h) p+1 +o(h p+2 ) (11) and on expanding φ(x n-1, y(x n-1 )) about (x n, y n ): y(x n+1 ) y * n+1 = φ(x n, y(x n )) (2h) p+1 +o(h p+2 ) (12) On subtacting (10) fom (12), we obtain: y(x n+1 ) y * n+1 = (2 p+1 1)φ(x n, y(x n ))h p+1 +o(h p+2 ) Theefoe, the pincipal local tuncation eo that is taken as an estimate fo the local tuncation eo may be witten as: φ(x n, y(x n ))h p+1 = Tn+1 = (y(x n+1 ) y * n+1)/(2 p+1 1) (13) => T n+1 =(y(x n+1 )-y * n+1)/(2 p+1 1) (14) Equation (14) is a mean of obtaining quick estimates of the local tuncation eos in computations using any S-stage Runge-Kutta, without having to obtain the exact solution fist. 5
Numeical Expeiments On Eo Estimation in Runge-Kutta Methods Ochoche ABRAHAM and Gbolahan BOLARIN We will illustate the viability of Richadson Extapolation technique epesented by Equation (14) by solving the autonomous initial value poblem: at steplenghts h = 0.1 and h = 0.2. y =x+y; y(0)=1 (Exact solution: y E =2e x -x-1) The method we will use fo ou investigation, is the vey efficient six-stage Runge- Kutta method of ode five with Butche tableau: 0 1 1 1 181 545 2 906 727 c A 1 409 387 14 = T 5 583 691 41 b 1 208 43 215 233 4 809 954 609 575 3 625 16 267 257 4 828 55 805 189 7 7 2 0 90 90 15 Fom now on we will efe to this method as RK65. 117 245 16 45 16 45 Results and Discussions The esults ae as pesented below: Table 1. Results fo the Numeical Expeiment h x RK65 Exact Actual Eo 0.0 1.0 1.0 0.0 0.1 0.1 1.110341796 1.110341836 4.01513E-08 0.2 1.242805427 1.242805516 8.93203E-08 0.3 1.399717467 1.399717615 1.48152E-07 0.4 1.583649177 1.583649395 2.18283E-07 0.5 1.79744224 1.797442541 3.014E-07 0.6 2.044237201 2.044237601 3.99781E-07 0.7 2.327504899 2.327505415 5.15941E-07 0.8 2.651081205 2.651081857 6.51985E-07 0.9 3.019205412 3.019206222 8.10314E-07 1.0 3.436562662 3.436563657 9.94918E-07 0.0 1.000000000 1.000000000 0.000000000 0.2 0.2 1.242803057 1.242805516 2.45932E-06 0.4 1.583643388 1.583649395 6.00728E-06 0.6 2.044226595 2.044237601 1.10058E-05 0.8 2.651063934 2.651081857 1.7923E-05 1.0 3.436536293 3.436563657 2.73639E-05 6
Leonado Jounal of Sciences ISSN 1583-0233 Issue 18, Januay-June 2011 p. 1-10 Usually to obtain eos, the exact solutions as well as the numeical appoximations ae obtained and thei diffeence at each step gives the eo at each step. Ou intention in this pape is to show that it is indeed possible to obtain such eos without the need to obtain the exact solutions fist. Next, Equation (14) will be used to obtain eo estimates that do not depend on the exact solutions. Recall Equation (14): T n+1 =(y(x n+1 )-y * n+1)/(2 p+1 1) whee: y n+1 is the appoximate solution with h = 0.1; y * n+1 is the appoximate solutions with h = 0.2; p is the ode of the method i.e. p = 5. Hence, Equation (14) becomes: T n+1 =(y(x n+1 )-y * n+1)/63 It must be pointed out that what Equation (14) povides, ae estimates, but these estimates give us an idea of the natue and ode of the eos we ae dealing with and when analytical solutions cannot be obtained, this method is the only option available. At x = 0.2 : T n+1 = 1.242805427-1.242803057/63=3.7619E-08 At x = 0.4 : T n+1 = 1.583649177-1.583643388/63 = 9.189E - 08 At x = 0.6 : T n+1 = 2.044237201-2.044226595/63 = 1.684E - 07 At x = 0.8 : T n+1 = 2.651081205-2.651063934/63 = 2.74E 07 At x = 1.0 : T n+1 = 3.43656362-3.436536293/63 = 4.186E - 07 A compaison of the estimated eo and the actual eo is given in Table 2 below: Table 2. Summay of Results fo Actual Eos and Estimated Eos x Actual Eo Eo Estimate 0.2 8.90E-08 3.76E-08 0.4 2.18E-07 9.19E-08 0.6 4.00E-07 1.68E-07 0.8 6.52E-07 2.74E-07 1.0 9.95E-07 4.19E-07 7
On Eo Estimation in Runge-Kutta Methods Ochoche ABRAHAM and Gbolahan BOLARIN Figue 1. Gaph compaing the Actual Eos and Estimated Eos Fom Figue 1 we can see fom the solution cuves that the cuve fo the eo estimates using Richadson extapolation is vey close to the cuve of the numeical solution fo RK65 fo h = 0.1. The exponents of ou estimates compae favouably with that of the actual eos fo h = 0.1 (between 10-7 - 10-8 ). Howeve, fo h = 0.2, ou eo estimates as well as the solution fo h = 0.1, ae both vey fa fom the actual eos which is a good thing as accuacy is supposed to deceases with incease in steplenght. Theefoe ou esult confoms to eality. Conclusions We can thus conclude that when using Runge-Kutta methods to solve non-stiff poblems, we do not as necessities need to compute the exact solutions befoe we can compute eos. Richadson extapolation povides a viable eo estimato that is capable of giving a wokable idea of the natue and degee of eos. 8
Leonado Jounal of Sciences ISSN 1583-0233 Issue 18, Januay-June 2011 p. 1-10 As most diffeential equations ae not soluble analytically, exact solutions cannot be obtained and hence it would not be possible to obtain eos fo such poblems. Howeve, Richadson extapolation povides an excellent means to get aound this poblem since exact solutions ae not equied to obtain eo estimates. Refeences 1. Julyan E.H.C., Pio O., The Dynamics of Runge-Kutta Methods, Intenational Jounal of Bifucation and Chaos, 1992, 2, p. 427-449. 2. Lee J.H.J., Numeical Methods fo Odinay Diffeential Equations: A Suvey of Some Standad Methods, 2004, MSc. Thesis, Univ. of Auckland, New Zeeland. 3. Rattenbuy N., Almost Runge-Kutta Methods fo Non-Stiff Poblems, 2005, Ph.D. Thesis, The Univ. of Auckland, New Zeeland. 4. Butche J.C., Coefficients fo the Study of Runge-Kutta Integation Pocesses, Jounal of the Austalian Mathematical Society, 1963, 3, p. 185-201. 5. Runge C., Uebe Die Nuumeische Auflösung von Diffeentialgleichungen, Math. Ann, 1895, 46, p. 167-178. 6. Kutta W., Beitag fu N Aheungsweisen Integation Totale Diffeentialgleichungen, Z. Math. Phys., 1901, 46, p. 435-453. 7. Fatunla S.O., Numeical Methods fo Initial Value Poblems in Odinay Diffeential Equations, Compute Science and Scientific Computing, Academic Pess, Inc., Boston, 1988. 8. Lambet J.D., Computational Methods in Odinay Diffeential Equations, John Wiley and Sons, USA, 1973, p. 114-116. 9. Lambet J.D., Numeical Methods fo Odinay Diffeential Systems, John Wiley and Sons, USA, 1991, p. 149-150. 10. Butche J.C., On the Attainable Ode of Runge-Kutta Methods, Mathematics of Computation, 1965, 19(91), p. 408. 9
On Eo Estimation in Runge-Kutta Methods Ochoche ABRAHAM and Gbolahan BOLARIN 11. Uma A.E., Numeical Teatment of Singula & Discontinuous Initial Value Poblems, M. Tech Dissetation, Fedeal Univesity of Technology, Minna, Nigeia, 1998. 10