NUMERICAL SOLUTIONS TO ORDINARY DIFFERENTIAL EQUATIONS If e eqao coas dervaves of a - order s sad o be a - order dffereal eqao. For eample a secod-order eqao descrbg e oscllao of a weg aced po b a sprg w ressace moo proporoal o e sqare of e veloc mg be d 4.6 d were s e dsplaceme ad s me. d d Te solo o a dffereal eqao s e fco a sasfes e dffereal eqao ad a also sasfes cera al codos o e fco. Te aalcal meods are lmed o a cera specal forms of e eqaos. Elemear corses ormall rea ol lear eqaos w cosa coeffces. 58 Prepared b Be M. Ce
Nmercal meods ave o sc lmaos o ol sadard forms. We oba e solo as a ablao of e vales of e fco a varos vales of e depede varable owever ad o as a fcoal relaosp. Or procedre wll be o eplore several meods of solvg frs-order eqaos ad e o sow ow ese same meods ca be appled o ssems of smlaeos frs-order eqaos ad o ger-order dffereal eqaos. We wll se e followg form d d f for or pcal frs-order eqao. 59 Prepared b Be M. Ce
THE TAYLOR-SERIES MENTOD Te Talor-seres meod serves as a rodco o e oer ecqes we wll sd alog o srcl a mercal meod. Cosder e eample problem d d Ts parclarl smple eample s cose o llsrae e meod so a o ca reall cec e compaoal wor. Te aalcal solo 3e s obaed mmedael b applcao of sadard meods ad wll be compared w or mercal resls o sow e error a a sep. 6 Prepared b Be M. Ce
Talor Seres Epaso: We develop e relao bewee ad b fdg e coeffces of e Talor seres epaded a " ' '' '! 3! If we le we ca wre e seres as Ierave Procedre: 3 " "' '! 3! L L Sce s or al codo e frs erm s ow from e al codo. We ge e coeffce of e secod erm b sbsg e eqao for e frs dervave d d 3 6 Prepared b Be M. Ce
Smlarl we ave d d d d d d 3 4 3 3 We e wre or seres solo for leg be e vale a wc we ws o deerme : 3..5.5.5 4 error erm Here sow s a case wose fco s so smple a e dervaves of dffere orders ca be obaed easl. However e dffereao of f cold be ver mess sa ose of /. 6 Prepared b Be M. Ce
EULER METHOD As sow prevosl e Talor-seres meod ma be awward o appl f e dervaves becomes complcaed ad s case e error s dffcl o deerme. I fac we ma ol eed a few erms of e Talor seres epaso for good accrac f we mae small eog. Te Eler meod follows s dea o e ereme for frs-order dffereal eqaos: ses ol e frs wo erms of e Talor seres! Ierave Procedre: Sppose a we ave cose small eog a we ma rcae afer e frs-dervave erm. Te were we ave wre e sal form of e error erm for e rcaed Talor-seres. " ζ ' 63 Prepared b Be M. Ce
Te Eler Meod Ierave Sceme s gve b f Eample: Usg Eler Meod w. fd solo o e followg o.d.e. d d f..9. 3 4. 9. 9. 9. 9 3.. 9.. 83.... 787.. 3. 7683.945.856.85.8 are re vales 64 Prepared b Be M. Ce
Eample co.: Le s coose...999..999.999.999.999.999...9983.9986 Qe accrae rg? Wa s e prce we pa for accrac? Cosder for. we eed o compe seps. For. we wll ave o calclae seps. No free lc as sal. 65 Prepared b Be M. Ce
3 3 66 Prepared b Be M. Ce
67 THE MODIFIED EULER METHOD I e Eler meod we se e slope a e begg of e erval ' o deerme e creme o e fco. Ts ecqe wold be correc ol f e fco were lear. Wa we eed sead s e correc average slope w e erval. Ts ca be appromaed b e mea of e slopes a bo eds of e erval. Modfed Eler Ierao: z z f z z f Te e dea s o fe-e ' b sg z Gve a o.d.e. Te modfed Eler erao s: f d d Prepared b Be M. Ce
Eample : ' z Sep : z ' ' z Sep : ' z ' z Sep 3 : ' z 3 3 Solve o.d.e. f f z ' f f f '..9..9.7 ' z.7..95 '. 95.. 75. 8435.. 95. 75.. 857. 457. 857.. 457. 84.945 z z. 4. 8435. 4435 ' ' z. 95. 5. 75. 4435.857 ' d d f 3z3 3 z3. 6. 84. 4 ' ' z3. 857. 5. 457. 4.837 w..856.85 68 Prepared b Be M. Ce
THE RUNGE-KUTTA METHODS Te wo mercal meods of e las wo seco og o ver mpressve serve as a good appromao o or e procedres. Wle we ca mprove e accrac of ose wo meods b ag smaller sep szes mc greaer accrac ca be obaed more effcel b a grop of meods amed afer wo Germa maemacas Rge ad Ka. Te developed algorms a solve a dffereal eqao effcel ad e are e eqvale of a appromag e eac solo b macg e frs erms of Te Talor-seres epaso. We wll cosder ol e for- ad fforder Rge-Ka meods eve og ere are ger-order meods. Acall e modfed Eler meod of e las seco s a secod-order Rge-Ka meod. 69 Prepared b Be M. Ce
7 For-Order Rge-Ka Meod: Problem: To solve dffereal eqao Algorm: f d d 3 4 3 4 3 6 f f f f w Proof: Read eboo or forge abo. Prepared b Be M. Ce
Eample: Solve e followg o.d.e. sg For-Order Rge-Ka Meod Sep : 3 4 f f f f d d 6.. 3.9455... 9453..85..85...85.8575...8575.745 3. 4 re vales Sep :.75.579 3.586 4.456.856. 8569 7 Prepared b Be M. Ce
7 Nmercal Solos o Paral Dffereal Eqaos Irodco Geeral paral dffereal eqaos PDE s ard o solve! We sall ol rea some specal pes of PDE s a are sefl ad easer o be solved. Classfcao of d order qas-lear PDE s Geeral form qas-lear lear ges order dervaves ow fcos o be solved. depede varable ad. F c b a Prepared b Be M. Ce
Some sadard oaos : : : : Tpes of eqaos Tpe Codo Eample ellpc b ac < Laplace eqao: { a b c } parabolc b ac Hea eqao: { a b c } perbolc b ac > A Wave eqao: { a A b c } Meods of solos depeded o e pe of eqaos. 73 Prepared b Be M. Ce
Geomercall R Tpe ma o be cosa over R becase abc ca var over R e.g ellpc oe par of R ad parabolc e oer par of R. Eample: s 443 a R : 3 3 [ s 3 3 ] a s b c b ac s < parabolc ellpc 74 Prepared b Be M. Ce
75 Geeral Approac o e Solos of PDEs Sep : Defe a grd o R w mes pos R mes po p Sep : Appromae dervaves a mes pos b ceral dfferece qoes Tese wll brg a PDE o a dfferece eqao relag o s egborg pos e grd. Prepared b Be M. Ce
76 For eample Sep 3: Arrage e reslg dfferece eqao o a ssem of lear eqaos M M L M O M M L L... Tag o cosderao of bodar codos ad solve for Sep 4: cage grd sze for a more accrae appromao. LL LL 4 4 Prepared b Be M. Ce
Solo o Ellpc Tpe s PDE Te geeral approac wll be followed o solve ese pes of problems b ag o acco varos ds of bodar codos form of e ssem of lear eqaos. We wll llsrae s sg e followg PDE: R f { 3 3 } Bodar codo log We follow e sep-b-sep procedre gve e prevos seco. 77 Prepared b Be M. Ce
Sep : Defe a grd alog w a order of mes-pos sde R. We ave o be clear abo R ad Frs le s sar w a crde grd 3/N for N3 > 3 3 3 4log 3 3 log 4 3 log ows: 3 3 3 3 ows: 78 Prepared b Be M. Ce
Sep : Appromae dervaves a mes-pos f f 3 4 3 A mes-po were s ow: @ : @ : 4.4.477 3 4.3.4 4 @ : 3.98.86 4 @ : 3 3 Bodar vales are ow 79 Prepared b Be M. Ce
8 Sep 3: Arrage e eqao o mar form Solve e eqaos for Sep 4: Refe e sep-sze b coosg smaller..68.3 3.74.4 4 4 4 4.875.483.336.756 Prepared b Be M. Ce
Parabolc ad Hperbolc Tpes Parabolc: Eample ea eqao D were D s ea dffso coeffce Hperbolc: Eample wave eqao C were C s wave propagao veloc Bodar codo: R L Bodar codo: L L al codo We wll se parabolc pe o llsrae e solo meod wc carres over o e perbolc pe as well! 8 Prepared b Be M. Ce
8 Noaos: Te To solve e eqao we sar w e s are gve as al codos ad ca be sed o solve for N L N L N L L D D N L Prepared b Be M. Ce
Rewre eqao as γ γ γ w γ D I geeral we ca solve for N f we ow e - row. bodar codo N N bodar codo N N N al codo 83 Prepared b Be M. Ce
Eample: Solve e followg bodar vale problem D L π al codo: s bodar codo: We coose N 3 ad ece /3 ad coose wo dffere :.5 a γ.45. a γ. 9 3..5.866..5.866.5.434.76..379.657..387.74..88.76.5.364.696.3.44.587..35.684.4.97.83.5.343.676.5.55.435.3.338.67.6.6.6.35.336.667.7.3.3.4.335.668.8.84.85.45.334.668.9.69.69.5.333.667..957 3.457 sable case 84 Prepared b Be M. Ce
A sor dscsso abo perbolc pe PDE: PDE: C Ial codos: f f Bodar codos: g g Followg e sal procedre we oba a appromao: γ γ γ w γ Noe a a we ave o deal w wc are o readl avalable. Ts we wll ave o compe ese erms frs. f f f C 85 Prepared b Be M. Ce
Te dfferece eqao ca e be solved b sg e drec meod e.g γ γ γ γ γ γ f γ f γ f γ f f L N For > we sll se γ γ γ Te res of compaoal procedre s eacl e same as a e parabolc case. 86 Prepared b Be M. Ce
Eample: Solve PDE : Ial codos : Bodar codos : Le s coose.5 so a γ f f s π g g s π Deerme o sar e solo or se formla o e prevos page π o compe 3 frs.e. f.5 [ s π ] 3.39.375.364 D.I.Y. o complee e solos p o. 87 Prepared b Be M. Ce