Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
75 views

Kreyszig, Numeric Methods

Uploaded by

Koal ferdl
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
75 views

Kreyszig, Numeric Methods

Uploaded by

Koal ferdl
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
Advanced Engineering Mathematics ERWIN KREYSZIG TENTH EDITION 996 CHAP, 20 Numeric Lines Algebra TAIJA“*Lo€ As age, then he system Ax = b is i-conitioned (Sec. 204), and sill residual r = b ~ AX docs not imply thats elose to the exact solution “The fing of «polynomial ps) = by + Byx + =~ + By ™ dough given data (points in the ayplne) (4,94), Oe Sq) by the method of least squares is Ascussed in Sec. 20.5 (and in statics fn See. 25.9). If m = n the least squmes polynomial will be the same as an interpolating polynomial (onkquees). genvalues 4 (values 2 for which AX = AX has a solution x # 0, called an cigenvecor) canbe characterized by inequalities (See. 20.7), in Gersehuorin’s theorem, which gives » crear disks which contin the whole spectrum (all cigenalues of Av of centers ag and adi (sum over K from 1 tom. k#* “Approximations of eigeavates ean be obained hy eration, stating fom an ap #0 and computing = Ao. $2 — AXn.~%q = Akai In this power method (See. 208) the Rayleigh quotient andy o Gam) ives an approximation ofan eigenvale (usually that of the greatest absolute vale) fand, i Ae symmetric, a enor bound is « is (ayes - ‘Convergence maybe slow but ean be improved by a spectra shift For determining all the eigenvalues of a symmetic matrix A it s best to fit tridiagonaize A and then vo apply the QR-metbod (See, 20), which is based on 8 factorization A = QR with ochogonal Q and upper triangular R and wses similarity transformations, CHAPTER 2 ] Numerics for ODEs and PDEs Ontinary differenti] equations (ODES) and pata differential equations (PDEs) play a ental tole in modeling problems of engineering, mathematics, physies, aeronautics, astronomy, dynamics, elasticity, biology, medicine, chemistry, environmental science, economies, and many other areas. Chapes 1-6 and 12 explained the major approaches ‘o solving ODEs ane PDEs snytclly However, in your carer as an engineer, applied ‘mathematicians, or physicist you will encounter ODES and PDES that caanor be solved by those analytic methods or whose soltions are so dificult hat other approaches are ceded, 11s precisely in these real-world projects that numeric meth for ODES and Es are use, often as prt ofa software package. Indeed, numeric software hus become an indispensable too forthe engines. “This chapter is evenly divided berween numerics for ODES and numerics for PDEs. ‘We start with ODES and discuss, in Soe. 21, methods for frst-cnder ODES. The main Intal idea is that we can obtain approximations to the salution of sich an ODE at points that are a distance apart by using the Fs we terns of Tayl's Formula from eal, We use these approximations to construct the iteration formula fora method known 35 Euler's method. While this metod is rather unstable and of ile pric ws, eserves 351 pedagogical tool and starting poin toward understanding more sophisticated methods such she Runge-Kutta mcthou adits variant the Runga-Kutta-Fehlherg (RKF) method, ‘hich are popular and usefal in practice. As is usual in mathematics, one tends (0 generalize mathematical ideas. The methods of Se. 211 ae one-step mathods, this, the cureat approximation uses only the approximation from the previous sep. Muliste> ‘methods such sth Adams-Bashfonth mathos anal Adans- Mouton methods, use values compued from several previous steps. We conclude numerics for ODES with applying Runge-Kiuta-Nystm methods an ether methods higher dee ODEs and systems of Obes, "Numerics for PDES ate peshaps even move exiting and ingenious than those for ODEs We first consider PDEs ofthe elliptic type (Laplace, Poisson), Again, Taylors formula serves asa starting point and lets us replace pari derivatives by difference quotients, “The end rerlt lead Yo a mesh and an evaltation scheme that uses the Gass Seid! ‘method here also know a5 Liebmann’s method). We continue with methods that use grids to solve Neuman and mixed problems (See. 21.5) and conchae with the important CCank-Nicholson metho fr parabolic PDES in Se. 21.6, ‘Sections 21.1 and 21.2 may be studied immediately after Chap. 1 and See. 213, Immediiel after Chaps. 2-4, because thase sctons we independent of Chaps. 19 ad 2. Sections 214-21.7 on PDES may be studied immediately after Chap. 12 if students have some knowledge of liner systoms of algebraic equations Prerequisite: Ses, 11-15 for ODEs, Secs. 12.1-12.3, 12.5, 12.10 for PDEs, References and Answers to Problems: App. 1 Past E (sce also Pats A and C), App. 2. 097 CCHAP.21 Numerics fr ODES and PDEs 21.1 Methods for First-Order ODEs ‘Take a Took at Se. 1.2, where we briefly inroducod Euler's method with an example We shal! develop Euler's method more eigarusly, Pay close attention tothe derivation that uses Taylor's Formula from caleulus 1 approximate the solution toa first-order ODE at points that are a distance apt. If you understand this approach, which wpa for numeri for ODES, then you will understand other methods meve casi From Chap. 1 we know that an ODE ofthe first order is ofthe form FU 359") = 0 and can often be writen in the explicit form y this equation is ofthe frm o LY. se) where xo and yp are given and we assume thatthe problem hs @unigue solution on some ‘pap inerval a x = b containing this setion we shal discuss methods of computing approximate numeric values of the solaton sof (1) atthe equidistant points onthe ans ro +24, xo +3, ‘where the step size hi a fixed number, for instance, 0.2 or 0.1 oF 0.01, whose choice we 4iscuss later inthis section, Those methods are step-by-step methods, using the same formula in each step, Such formulas are suggested by the Taylor series o wen =0 sha +B ste + Formula (2) isthe Key idea that lets us develop Bets metho and its variant called you guessed it—improved Buler method, also known a8 Hens method Lt us att by ‘erving Euler's method For small the higher powers 1 2,---in (2) ane very small. Dropping all of them aves the crude approximation pe A) = 919) + hy) 0) + Hfte.y) ‘nd the coresponding Kuler method (or Wuler-Cauchy method) @ Yuet = Fat Aly) (= O12) Aiscussed in Sec. 1.2. Geometrically, this isan approximation of the curve of s(x) by & polygon whose first sie is tangeatt this curve at tp (se Fig, 8 in Sex. 12), Error of the Euler Method. Recall from callus that Taylor's feral with remainder hs the form e+ 1) = ye) + ay’) + Bay@) Methods for Fist Order Obes 209 (overex = € 5x). shows dha, in the Buler method th tnincation error in each step ot local teuncation error is propostinal 01, vitlen OH), where O sugeests order {ee also Sec. 20.1). Now, over axed interval in which we want fo solve an ODE the ‘number of steps proportional to Ih Hence the total error global errors proportional (© W7(1/h) = I". Foe this eason, the Euler method i called a first-order method. In ation, there are roundoff errors in this an other snetods, which may affect the ccuraey ofthe values yy), more and more as» increases, Automatic Variable Step Size Selection in Modem Software. The idea of ‘aptve integration, 26 motivated and explained in See, 195, applies equally ell othe ‘numeric soltion of ODES. I now coneens automatically changing he sep size h depending fon the variability of y" = f determined by ae, YP het he! fe + Il ‘moder software automaticaly selects viable tp sie hy tha he enor ‘ofthe soltion wil not exceed given maxim size TOL (suggesting tolerance. Now for the Euler method, when the step size is ~ fs the local co a. i about 2 Ly") ‘We reguie thar this be equal a given tolerance TOL, To, a @) b= (EE a @) Aaly"al "(must not be zero om the interval J:.p Sx © sy om which the solution fs wanted Let K be the minimum of |y"G| on J and assume thal K> 0. Minimum |p") omesponds to maximum k= = V2 TOLIR by (4). Thus, VETOL = HVE. We can Inset this into (6), obsaining by straightforward agers o elo where eb) Viel For other methods, automatic step size selection is based om the sume principe Improved Euler Method, Predictor, Corrector. Euler's methods generally much {oo inaccurate. For large (0.2) this is ilustrated in See, 1.2 bythe computation for o Yeyts =o And for small the computation becomes prohibitive; als, roundoff in so many steps "may reslt in meaningless results, Clearly, methods of higher order and precision ate ‘binned by taking more terms in (2) nto aecoun, Bu this ivalves an important practical robles. Numely, if we substttey' = fy) into 2), we hive co) HOO) =) PEMA + ag Now inf depends on x, so that we have as shown in 4") and", f even much more ‘cumbersome. The general strategy now is (0 avai the computation ofthese derivatives and to replace it by computing for one or several suitably chosen suilary values of (9). "Suitably" means dat these values ate chosen to make the order ofthe method as CCHAP.21- Numerics for ODES and PES igh as posse (to have high accuracy). Let us discuss two such methods that are of| prtical importance, namely, che improved Baler method and the (lassiea Runge-Kutta ‘method Incach step ofthe improved Euler method we compute hin values, frst the predictor 79) ven = Yn + Mle sud Which i an auxiary value, and then the new y-valuc, the corrector om) Yuen = Int BATA) + earthed Hence the improved Buler metod isa predictor-comector method In each sep we predict 4 value (7a) and then we correct it by (7). I algorithmic form, sng the notations ky = Aft Ya) in (7a) ad ke = Wnts yh.) In (7), we ean writ this method as shown in Table 211, Table 7L1_ Improved Euler Method (Heun’s Method) ALGORITHM EULER (f Yo) selene se shnont ae eet that is pelem as unig sono he trv ay ae S183 INPUT: In vals ys ep ie A, nuke of ses OUTPUT: Approxinton ys the okiton rune wee n=O. = 1s f= Weed fa-Werwsn ya +k) Dura =a Hs th) OUTPUT syste sot +h Improved Eulr Method. Cmparizon with Euler Method. Ary he img ule mtd he eal a rt (5) chosing = 02a i See 12 Solution. ror pen poten we nein Tle 2. SEC. 211. Methods fr First-Order ODES 90 PRooF Table 712 improved Euler Method for (6). Errors haet Valse Ever of Baorof 7 apy Improved Euler Euler 2.0000 000 0.0000 0.000 ‘0200 non noo oat ous ons ont 052 aise o221 oon. ood 4153 14255 oi as oat ons 0156 0230 Error of the Improved Kuler Method. The lca err is of order Hand se global ‘errr of onder Ho that the met isa second-order meth. Setting fs = form sq) and using (29) (ater (6)), we have 8a) Hm + AY ~ Wiad = hah + MPR + BOPP + Aroximating the expression i th brackets in (1H) hy Fy + Fu and agin using the ‘Taylor expansion, we obain from (7b) Yast Ya Bhat Fur] (8b) Din + Gat af + ARR] = hint MET + amie (where ” = etn ete.) Subtraction af (8b) fom (8a) gives the Tol enor e Pon eh-4 Snes the numberof steps over aftedx-interval i proportional to I/h the global eroe ‘is of onder 8¥/h = A, so thatthe method is of second order . Since the Euler method wat an atrctive pedagogic too! to tach the beginning of ‘solving fistenfer ODEs numicaly but had its danbucks in terms of accuracy and cea fen produce wrong answers, We sted the improved Esler method and thre intodaced the idea of a predictor-comector method. Although improved Euler i bene, {han ler thee ae beter methods that ate used in industrial sings Tithe atc ‘engineer has to know about the Runga-Kutia methods andi waren Runge-Kutta Methods (RK Methods) ‘A mettod of great protical importance and much greater accuracy than that of the improved Buler method isthe classical Runge-Kutta method of fourth ander which we 2 (CHAP. 21 Numeles for ODES and POEs call briefly the Runge-Kutta method! ti shown in Table 21.3. We see tht in each ‘Sep we Hist comput four auxiliary quantities ky, fA, andthe the new vale Jn “The method i wel suited t the computer because it needs no special starting proved, rakes ight demand on storage, and repeatedly uses the same straightforward eompu- taonat procedire, Its namercally stable. [Note that, iff depends only on x, this method reduces to Simpson's rule of Iteration (ee. 19.5) Note further that," 4 depend oa m and generally change from step to sep. Table 713 Classical Runge-Kutta Method of Fourth Order ALGORITHM RUNGE-KUTTA (J, so: “Tie agocitun comptes th wlaton ofthe inital valve problem y' = (x9. st susan points » y= ap + hha 40+ 2h rat Nie ee is sch hat his problem has unique ston on dna [iy] (Se 17). INPUT: Basction finial values ty, tp sire, number of tps 8 OUTPUT: Approximation yn, 10 the Soltion tq,9) at syst = Ao + + Dh where w= 0,-2.4 — 1 ffoen + Ban + He) ka — hfe + By + Bad Ka= Mein + ayn + kad +h ort =a + Rls + 2kp + 2ha + ko) OUTPUT qs iePuet End Stop ind RUNGE-KUTTA "Rm othe German thesia KARL RUNG (S194) WILMELMUKUTTA (1867-1988) ‘une for 4 (195) 167-17) he Gorman merci KARL HEUX 148-109) [Zc Ik gs $800) 2029, Nats ac Mah Pps, 46091) 95-40) develope Yani sa ‘etd mother ety many our mtd wing onto wes prey. TH tdi at poplar tl epoca rym fos ad iS ‘Sc soins we en Wy Kt SEC. 2L1 Methods for First Order ODEs 903 EXAMPLE 2 Classe Runge-Kutta Method Solution. orb pom pobies weve fy) «+ 9 Hee Tate 24st esol sas, which alr ae 10 on 10h et Baler chet See ato Tate 25. We mcton ie peing that se he pee mete sng persizn re sed by otining by to Khe It hy ee he fie foal som (Ck cae 214 Keep min hat we hve or famcto aon ach p 7 “Table 214 Range-Katta Method Applied to (4) a : 02214, +) Exact Valves 6D) 10" X Exor = + ous erst 00 o 00 0 oo2t400 ‘00000 0 102 noni gms 021403 3 2 04 nopisis 30259 onmises 7 306 nza2i07 oats 222119 2 4 08 aazssa ——o2saT30 oaasst1 20 510 _unisesi o.7usane Table 215 Comparison ofthe Accuracy ofthe Three Methods under Comiration| in the Cato ofthe Initial Valve Probl (with h = 0.2 oe * fel ler Improved Boker Runge-Kusta (Table 24.1) able 213) lable 21.5), 02 om2ia0s ont ‘004 ‘0.000003 4 ooi82s 082 1.034 ‘oneona7 a6 oazati9 04 1.0068 ‘0.000011 og oaassii 0182 oro. ‘onnonan 10 o7is2e2 230 noise 000031 Error and Step Size Control. RKF (Runge-Kutta-Fehlberg) “he idea of sdapive integration (Se. 19.5) has anslogs foe Runge-Kuut (and other) metho. Tale 2.3 for RK (Runge-Kutta). we compute in each sep approximations Sand with step sizes hand 2, respectively, heater has err perstep equal to" ~ 32 Simos haf the former however, ice we have ony bal any step for 2, he at factor i 29/2 = 16, hats a 6 anditus — y® — y= eH cag — He

You might also like