Numerical methods for ODEs - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Numerical methods for ODEs

Description:

Numerical methods for ODEs. Ordinary differential equations (ODEs) Dynamical system ... Backward Euler method (exercise) Order of accuracy: first order & implicit ... – PowerPoint PPT presentation

Number of Views:1243
Avg rating:3.0/5.0
Slides: 26
Provided by: NUS
Category:

less

Transcript and Presenter's Notes

Title: Numerical methods for ODEs


1
Numerical methods for ODEs
  • Ordinary differential equations (ODEs)
  • Dynamical system
  • Widely applications in science engineering
  • Mixture problem
  • Population models
  • Point-mass motion
  • Mechanical vibration
  • Electrical networks
  • Pendulum motion, .

2
ODEs
  • Different types
  • First order ODE
  • First order ODEs system
  • High order ODE
  • High order ODEs system
  • Solutions
  • Existence uniqueness
  • Analytical solution
  • Numerical solution

3
Different numerical methods
  • For first order ODE
  • Single-step method
  • Euler, Trapezoidal method
  • Runge-Kutta methods RK4 most popular
  • Stability and convergence
  • Time-splitting (split-step) method
  • Integration factor method
  • Multi-step methods

4
Different numerical methods
  • For first order ODEs system
  • Direct extension of all methods for first order
    ODE
  • For high order ODE
  • First order ODEs system
  • Direct discretization
  • For high order ODE system
  • First order ODEs system
  • direct discretization

5
For first order ODE
  • Consider initial-value problem (IVP)
  • Choose a time step and partition a,b into N
    pieces
  • Denote

6
Basic numerical methods
  • Ideas Derivative is the limit of difference
  • Forward Euler method -- explicit method
  • Backward Euler method implicit method

7
Basic numerical methods
  • Trapezoidal method sum of forward backward
    Euler methods
  • Taylor expansion
  • Forward Euler method
  • Backward Euler method

8
Numerical example
  • The problem
  • Time step
  • Forward Euler method
  • Backward Euler method
  • Trapezoidal method

9
Numerical results
  • Example

10
Order of accuracy
  • Local truncation error
  • Def The error at the given step if it is assumed
    that the previous results are all exact!!
  • Ways to find
  • Replace in the difference equation
  • Define the local truncation error
  • Do Taylor expansion use the ODE
  • find the leading order term
  • Order of accuracy p

11
Order of accuracy
  • Forward Euler method
  • Local truncation error
  • Do Taylor expansion (see details in class)
  • Order of accuracy first order explicit
  • Backward Euler method (exercise)
  • Order of accuracy first order implicit
  • Trapezoidal method (exercise)
  • Order or accuracy second order implicit

12
Runge-Kutta methods
  • Ideas
  • Integrate the ODE over the interval
  • Choose r points in the interval
  • Evaluate slopes at these points via (forward)
    Euler method

13
Runge-Kutta methods
  • Construct the averaged slope
  • Determine the parameters via Taylor expansion
    such that the difference method has a given
    accuracy!!

14
Runge-Kutta methods
  • Forward Euler method -- RK1
  • Backward Euler method
  • Trapezoidal method

15
Runge-Kutta methods
  • Second order Runge-Kutta method -- RK2
  • Choose
  • Construct slopes
  • Averaged slope
  • RK2 method
  • Determine the three parameters via Taylor
    expansion (see details in class or exercise)

16
Runge-Kutta methods
  • RK2 (modified Euler method) Order of accuracy
    2 explicit
  • RK2 (modified midpoint method) Order of
    accuracy 2 explicit

17
Runge-Kutta methods
  • Fourth order Runge-Kutta method -- RK4
  • Choose
  • Construct slopes
  • Averaged slope
  • RK4 method
  • Determine the seven parameters via Taylor
    expansion (see details in class or exercise)

18
Runge-Kutta methods
  • 4th Order Runge-Kutta method -- most popular!!
    --- exercise!!
  • Local Truncation error
  • Order of accuracy 4
  • Explicit method

19
Numerical example
  • The problem
  • Exact Solution
  • Different numerical methods
  • Forward Euler method (FEM)
  • Modified Euler method (MEM)
  • 4th order Runge-Kutta method (RK4)

20
(No Transcript)
21
(No Transcript)
22
Numerical results
  • Example

23
Numerical results
  • Population of fruitflies

24
Numerical results
  • Population of fruitflies

25
ODE demo
  • Some very interesting ODE demo sites
  • Interactive Differential Equations
  • http//www.aw-bc.com/ide/
  • More
Write a Comment
User Comments (0)
About PowerShow.com