Numerical Solution of Ordinary Differential Equation

Numerical Solution of Ordinary Differential Equation

Numerical Solution of Ordinary Differential Equation A first order initial value problem of ODE may be written in the form Example: y ' (t ) f ( y, t ), y (0) y0 y ' (t ) 3 y 5, y (0) 1 y ' (t ) ty 1, y (0) 0

Numerical methods for ordinary differential equations calculate solution on the points, t n t n 1 h where h is the steps size 1 Numerical Methods for ODE Euler Methods Forward Euler Methods Backward Euler Method Modified Euler Method Runge-Kutta Methods Second Order Third Order Fourth Order 2 Forward Euler Method Consider the forward difference approximation for first

derivative yn 1 yn yn ' h , h t n 1 t n Rewriting the above equation we have yn 1 yn hyn ' , yn ' f ( yn , t n ) So, yn is recursively calculated as y1 y0 hy0 ' y0 h f ( y0 , t0 ) y2 y1 h f ( y1 , t1 )

yn yn 1 h f ( yn 1 , t n 1 ) 3 Example: solve y ' ty 1, Solution: for t0 0, for t1 0.25, y0 y (0) 1, 0 t 1, h 0.25 y0 y (0) 1 y1 y0 hy0 ' y0 h(t0 y0 1) for t 2 0.5,

1 0.25(0 *1 1) 1.25 y2 y1 hy1 ' y1 h(t1 y1 1) 1.25 0.25(0.25*1.25 1) 1.5781 etc 4 Graph the solution 5 Backward Euler Method Consider the backward difference approximation for first derivative yn yn 1 yn ' h

, h t n t n 1 Rewriting the above equation we have yn yn 1 hyn ' , yn ' f ( yn , t n ) So, yn is recursively calculated as y1 y0 hy1 ' y0 h f ( y1 , t1 ) y2 y1 h f ( y2 , t 2 ) yn yn 1 h f ( yn , t n ) 6 Example: solve

y ' ty 1, y0 y (0) 1, 0 t 1, h 0.25 Solution: Solving the problem using backward Euler method for yn yields yn yn 1 hyn ' yn 1 h(t n yn 1) yn ht n yn yn 1 h yn 1 h yn 1 ht n

So, we have for t1 0.25, y0 h 1 0.25 y1 1.333 1 ht1 1 0.25 * 0.25 7 for t 2 0.5, for t3 0.75, for t 4 1, y1 h 1.333 0.25 y2

1.8091 1 ht2 1 0.25 * 0.5 y2 h 1.8091 0.25 y3 2.5343 1 ht3 1 0.25 * 0.75 y3 h 2.5343 0.25 y4 3.7142 1 ht4 1 0.25 *1 8 Graph the solution 9

Modified Euler Method Modified Euler method is derived by applying the trapezoidal rule to integrating yn ' f ( y, t ) ; So, we have h ' yn 1 yn ( yn 1 yn' ), 2 yn ' f ( yn , t n ) If f is linear in y, we can solved for yn 1 similar as backward euler method If f is nonlinear in y, we necessary to used the method for solving nonlinear equations i.e. successive substitution method (fixed point) 10

Example: solve y ' ty 1, y0 y (0) 1, 0 t 1, h 0.25 Solution: f is linear in y. So, solving the problem using modified Euler method for yn yields h y n y n 1 ( y 'n 1 y 'n ) 2 h yn 1 (t n 1 yn 1 1 t n yn 1) 2 h h yn (1 t n ) yn 1 (1 t n 1 ) h

2 2 h (1 t n 1 ) 2 yn yn 1 h h (1 t n ) 11 2 Graph the solution 12 Second Order Runge-Kutta Method The second order Runge-Kutta (RK-2) method is derived

by applying the trapezoidal rule to integrating y ' f ( y , t ) over the interval [t n , t n 1 ] . So, we have t n1 yn 1 yn f ( y, t )dt tn h yn f ( yn , t n ) f ( yn 1 , t n 1 ) 2 We estimate yn 1 by the forward euler method. 13 So, we have

h yn 1 yn f ( yn , t n ) f ( yn hf ( yn , t n ), t n 1 ) 2 Or in a more standard form as 1 yn 1 yn k1 k 2 2 where k1 hf ( yn , t n ) k 2 hf ( yn k1 , t n 1 ) 14 Third Order Runge-Kutta Method The third order Runge-Kutta (RK-3) method is derived by applying the Simpsons 1/3 rule to integrating y ' f ( y , t ) over the interval [t n , t n 1 ] . So, we have

t n1 yn 1 yn f ( y, t )dt tn h yn f ( yn , t n ) 4 f ( yn 12 , t n 12 ) f ( yn 1 , t n 1 ) 6 We estimate yn 1 2 by the forward euler method. 15

The estimate yn 1 may be obtained by forward difference method, central difference method for h/2, or linear combination both forward and central difference method. One of RK-3 scheme is written as 1 yn 1 yn k1 4k 2 k3 6 where k1 hf ( yn , t n ) h k 2 hf ( yn k1 , t n ) 2 k3 hf ( yn k1 2k 2 , t n 1 ) 1 2 16 Fourth Order Runge-Kutta

Method The fourth order Runge-Kutta (RK-4) method is derived by applying the Simpsons 1/3 or Simpsons 3/8 rule to integrating y ' f ( y , t ) over the interval [t n , t n 1 ]. The formula of RK-4 based on the Simpsons 1/3 is written as 1 yn 1 yn k1 2k 2 2k3 k 4 6 where k1 hf ( yn , t n ) k 2 hf ( yn 12 k1 , t n h ) 2 k3 hf ( yn 12 k 2 , t n h ) 2 k 4 hf ( yn k3 , t n h) 17

The fourth order Runge-Kutta (RK-4) method is derived based on Simpsons 3/8 rule is written as 1 yn 1 yn k1 3k 2 3k3 k 4 8 where k1 hf ( yn , t n ) k 2 hf ( yn 13 k1 , t n h ) 3 k3 hf ( yn 13 k1 13 k 2 , t n 2h ) 3 k 4 hf ( yn 3k1 3k 2 k3 , t n h) 18

Recently Viewed Presentations

  • Intro to Cell Biology - PC|MAC

    Intro to Cell Biology - PC|MAC

    Kelly Riedell Created Date: 1/13/2003 4:25:01 PM Document presentation format: On-screen Show (4:3) Company: Brookings School District Other titles: Comic Sans MS Arial Times New Roman Calibri Arial Black Arial Unicode MS Default Design ENZYMES 2-4 PowerPoint Presentation PowerPoint Presentation...
  • Bariatric Pre Op Class Your Jefferson Team  Surgeons

    Bariatric Pre Op Class Your Jefferson Team Surgeons

    Stage 1: Clear Liquids . Patients are not usually on clear liquids for more than a week. Patients may advance to stage 2 on post op day 4-5 if feeling well and hydrating well. 64 oz. is the goal but...
  • Report from ANOC

    Report from ANOC

    ANOC applauds the progress made in the preparations for the ANOC World Beach Games in San Diego 2019 and acknowledges the excellent cooperation it has received from the International Federations, the IOC Sports Department and San Diego Organising Committee.
  • Issue Y2K The Great War for Talent!

    Issue Y2K The Great War for Talent!

    Tom Peters' Re-Imagine! Business Excellence in a Disruptive Age Manama/ Kingdom of Bahrain/ 14April2004 "In Tom's world, it's always better to try a swan dive and deliver
  • Culturally Competent Women's Health Care - Midwives of Ohio

    Culturally Competent Women's Health Care - Midwives of Ohio

    Culturally Competent Women's Health Care: Caring for Somali Women. Ginny Isaq, MA, RN, SNM ... violence and extreme trauma. Women have also experienced traumatic events as children, including Female Genital Cutting. ... women with type III often present to hospital...
  • Chapter 8: Conditioning and Learning

    Chapter 8: Conditioning and Learning

    Fig. 8.5 Higher order conditioning takes place when a well-learned conditioned stimulus is used as if it were an unconditioned stimulus.In this example, a child is first conditioned to salivate to the sound of a bell. In time, the bell...
  • Gifting Using Gifting to discover the power of

    Gifting Using Gifting to discover the power of

    Title: No Slide Title Author: Manulife Emplyee Last modified by: Polla Bilodeau Created Date: 7/22/1999 3:30:36 PM Document presentation format: On-screen Show
  • 2018 BISC Summer Meeting Top 10 OSHA Violations

    2018 BISC Summer Meeting Top 10 OSHA Violations

    Fall Protection - Training Requirements. 5. Control of Hazardous Energy (LOTO) ... It is a violation of Federal law for anyone UNDER 18 years of age to operate a forklift or for anyone OVER 18 years of age who is...