Docsity

Euler Method - Engineering Mathematics, Lecture notes of Engineering Mathematics

Partial preview of the text

Download Euler Method - Engineering Mathematics and more Lecture notes Engineering Mathematics in PDF only on Docsity!

Euler MethodModule 3^ Lesson 2

Edgar M. Adina Instructor

Numerical Solutions to Engineering Problems^ CE50P-^2

Euler’s Method

dx f (^ x ,^ y ),^ y ( )^0 y^0 x 0 ,y 0 y Step size, h Φ y value 1 , Predicted True value x

Slope dy^ = = RiseRun = y 1 (^) (^) == yy 0 == (^) 0 ++ xyf^11 ( ff^ x^ −−(^0 ( x^ x^ xy , 0 00 y 0 , (^) ,^0 yy ) 00 )() x h 1 − x 0 ) Figure 1 Graphical interpretation of the first step of Euler’s method

How to write Ordinary Differential Equation

dxdy^ =+^ Example is 1 2. 3 y rewritten e =− 1 .−^3 e 2 − y^ x , ,as yy ( )( ) 00 == 55 dydxf ( x , In y (^) )this= x 1 case. 3 e − x (^) − 2 y

How does one write a first order differential equation in the form of dxdy (^) = f ( x , y )

Example A only ball due at (^1200) to radiation,K is allowed the differential to cool down equation in air forat anthe ambient temperature temperature of the ball of (^300) is givenK. Assuming by heat is lost Find h = 240 the temperature ddt seconds^  =^ −^2.^2067. at 10 t −=^12 480 (^4 −^81 seconds^108 ),^ using^ ^ ( )^0 =^ Euler’s^1200^ K^ method.^ Assume^ a^ step^ size^ of

  • Solution For i = 1 , ( t 1 = 240 ) ,  1 =
    • Step 2 :  2 ===== 110106106106  1 +.... 32090909 f Kt +++ 1 ,( (  f − 0 1 (. 2240 017595 h 2067 , 106 ). 2401009 ) − 24012 ( 106 094 − 81  108 ))
      •  2 is the approximate( 480 )  temperature 2 = 110 32 at K t = t 2 = t 1 + h =^240 +^240 =

Solution The solution exact of asolution non-linear of equationthe ordinary as differential equation is given by the

The (^) ^0 solution.^ (^92593 480 )=ln to 647  this+−. 57 300300 K nonlinear−^1.^8519 equationtan−^1 (^0.^00333 at t=^ ) 480 =− 0 seconds.^22067  10 is −^3 t −^2.^9282

Step, 48024012060 h (480) Et |єt|% 30 −987.81^ 110.32^ 546.77^ 614.97 632.77^ 1635.4^ 537.26^ 100.80^ 32.607 14.806^ 252.54^ 82.964^ 15.566^ 5.0352 2.

Effect of step size Table 1. Temperature at 480 seconds as a function of step size, h

( 480 )= 647. 57 K^ (exact)

Comparison with exact results -1500-1000-500^5000

θ(K) Temperature,^100015000 100 Tim e, t (sec) Exact solution 200 h=120 (^300) h=480 (^) h=240 400 500 Figure 4. Comparison of Euler’s method with exact solution for different step sizes