IX 1 - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

IX 1

Description:

CS452/Mgt532 Simulation for Managerial Decisions. The Robert O. ... Simple, can be grossly inaccurate. Many useful methods most used are: Simpson's Rule ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 13
Provided by: mpeter2
Category:
Tags: grossly

less

Transcript and Presenter's Notes

Title: IX 1


1
Numerical Integration of Differential Equations
  • M. Peter Jurkat
  • CS452/Mgt532 Simulation for Managerial Decisions
  • The Robert O. Anderson Schools of Management
  • University of New Mexico

2
Simulating Differential Equations
  • Based on Eulers method yt yt-1 hyt-1
  • Simple, can be grossly inaccurate
  • Many useful methods most used are
  • Simpsons Rule
  • Runge-Kutta (RK) type methods single step,
    stable for small steps
  • Predictor Corrector Methods multi-step, stable,
    need Simpsons rule or RK methods for starting
    values
  • All improved by step size adjustment
  • smaller for steeply rising or falling response
    surfaces
  • increase step size for speed

3
Order of DEs
  • Level of highest derivative in DE is order of
    system
  • All numerical integration methods work with first
    order equations contain only the first
    derivative higher order equations converted to
    systems of first order

4
First Order Differential Equations
  • Solve equation for first derivative yields
  • y(x) dy/dx f(x, y(x) a, b, ) with y(0)
    y0
  • Make x discrete by h Dx and approximate
  • solve for next value of y by
  • y(x h) y(x) h f(x, y(x) a, b, )
  • When x is time designate the current time
    period by t then t1 t h, t-1 t h, t-2
    t 2h, get difference equation yt1 yt
    hf
  • See LogisticDE.xls

5
Higher Order DE
  • Use linear second order DE ay by cy
    g(t) as an example solving for y yields
  • Converts into a system of two first order DEs by
    y1 y and y2 y to get y1 y2
  • See EulersMethod.xls

6
Eulers Method Revisited
  • Eulers method applied to y -y (oscillator)
    shows unbounded error compared to exact solution
    due to large step size, h, relative to
    oscillations step size under our control
  • Assignment
  • (a) Determine the largest h that will "closely"
    simulate a system modeled by y -y with initial
    values y0 0 and y0 1 over the range of 0,
    4p using Eulers method use your judgment as to
    how closely "closely" really is
  • (b) What are some useful numerical measures for
    "closely" ?

7
Order ofNumerical Integration Methods
  • Eulers method is a first order method it will
    integrate the differential equation of a straight
    line exactly not bad for monotonic functions
    over short distances
  • Higher order methods needed for higher order DEs
  • Simpsons rule is third order exact for cubics
  • Runge-Kutta-Gill method is fourth order
  • Most used predictor-corrector methods also fourth
    order
  • Ways exist to develop any order method see most
    numerical analysis books (e.g., Hamming)

8
Runge-Kutta-Gill Method
  • Given by
  • Where
  • Weighted average of 4 estimates of the derivative
    on the interval tn, tn1 one at beginning
    (tn), two in the middle (tn h/2), and one at end
    (tn1 tnh)
  • See RKGMethod.xls applied to Normal Distribution
    density function

9
RKG (cont.)
  • RK methods are an excellent compromise between
    accuracy and amount of computation
  • higher than fourth order equations are rare
    enough that it does not seem worthwhile to create
    general purpose simulation programs based on
    higher than fourth order methods
  • Common improvement over RK methods with fixed
    step size are methods which adjust the step size
    h depending on the rate of change of the function
  • that is, h is made small in regions where f is
    large and made larger when the solution enters
    regions where f is small

10
Predictor-Corrector (PC) Methods
  • Even with variable step features, RK methods can
    still take a long time - needs 4 full function
    evaluations per time step
  • PC methods use 2 function evaluations -
    information needed gained by using previously
    calculated solution values
  • Results in considerably faster simulation
  • PC methods need RK type methods for starting and
    restarting

11
Fourth Order Milne Method Predictor
  • Predictor is
  • Where Li is the slope at the end of
  • the current step
  • one step ago
  • two steps ago
  • NB need three 4 prior values yn, yn-1, yn-2 ,
    and yn-3 gt fourth order method

12
Fourth OrderMilne Method Corrector
  • Simpsons formula
  • Where
  • See RKGMethod.xls for PC applied to Normal
    Distribution density function
  • Assignment Repeat CSS Assignment 1 using the RKG
    and Predictor-Corrector methods - use the same
    measure for "closely"
Write a Comment
User Comments (0)
About PowerShow.com