You are on page 1of 12
Computer applications Part 1) © ODE (Euler) e Euler Matlab code MATLAB’ The Language of Technica! Ce Se ty , 3" year Mech. Power Dep. -2018 Diflerential Equations | V : % a differential Partiol oltPPereveicu ‘ equation equetre nw Cope ) CPDE } os obetan erased Po we GN ASP LENE aL P = pe NS es LN Les arly po AUN GES | OQ) payee Sry PF i | ds _ Fle, a =) 2 84. s : axe we: = <3) pastels ke = ian S2- | , Pest orc PDE [et er ODE Bb Wb Ls Pod MP hg) 3x BE bat : heg her orele- PDE & Second order ODE 24. : Ls Od L gett Fagg) so 7d = 5 ¥ higher orole~ ODE J’ | wy) 4 ‘ i n 4b re FOR S) ot Qay Aisi — | ODE J Sera Ses 5m Sah poe os % Euler Metheel a Gaike clifferene Methee! & \wean’s Methodl OFDM) » Runge Kutta Method + Finrbe clement Methed ‘ (FEM ] A Gite Volume Methed | (fue ) Numerical Solution for ODE Dusk ow aise JD CN 9 Lah sb svar ay a = tbs t= Pee) ) Gig Pat SN rs ee = ta -& kgfe 2S oe nee i a | axa tase) di a pass ae (slope ) © _O-#&- Tome - © ie5 P Cea) oh bss gat be Qa P Pavol Rati yRsror - Uae Gees ws J. 2 3, Oo | Galax) Qa wr L355) 5 “te yd WT Dv cad fo ONG ge To EEN = dar = d+ Bag > da =a f Cod h + Abas us DLN dels hobs aot a w Example 4 = Seve He Potton reg equ and fad Gone oy EY est Ss | fled = alt Exact Selvdvoy Deiekion: dan CRY For Step Size hz os 8 7 1. sées 7 sol 18: 5 Ene ever) | yameri@etb 1.28 | “set Bia) = GO) + PCtes, Sajak dls) ~ de +F(e, yes) ) sos = | + OT « os | = | GO) = fos) +f los, dias) os = | +6517 #0-5 = |.25 | Exact Solution Jaesy= (S241 )° Dex Cyy . Numerical Erran = | OE. Sa | 1.239 = Cai yi os bsées # loo Sex t | nmeaf hey ee : \ [os] |e |. os a \ tram te = teh \ es 1. 5625 io | 1-5 625 Jateo = @o'f Feces de FOI) ely : Jor sieP = 0-25 € 1-396 77 |e AgNS T0625 Bers) = Feo) + Bee, 9a = \aemerees =} des) = gers) fers, 3605) De = | + e28fyve-2s = 1062s Bets) = Ges) + Fees, a's) R = 0625 + o-SI7ebe5 +025 = 119155 Bor) = Gers) + Pleas, gos) Ley] = Euler (inltne('t ayes), 0,151 » 8-25); (>? ten =e oroese ly > oe, = (lezs« texSZ)+1).Aa; > plot Ceo y tenl fede, (ob 7 1 \ uh ea) Pus . pene : 88 on UD eB 0G bie [E*o4 [Spo s = SLM YUL G& Yas Vole w en Gids data UE Lex acco A) Ur 3) A69 Coes OI Lap i lene 2- eatienstay “ tended) =t27 ycleny=y ty eece cd) 7180) ee LeD)-E48I (| 16 15 14 13 12 14 SLi * Euler ath=0.25 | = = exact solution at h=0.25

You might also like