Comparison between the Discrete and Continuous Time Models

Similar documents
ln y t 2 t c where c is an arbitrary real constant

Additional Exercises for Chapter What is the slope-intercept form of the equation of the line given by 3x + 5y + 2 = 0?

Vehicle Arrival Models : Headway

Ordinary dierential equations

THE CATCH PROCESS (continued)

Math 10B: Mock Mid II. April 13, 2016

02. MOTION. Questions and Answers

The equation to any straight line can be expressed in the form:

Math 2142 Exam 1 Review Problems. x 2 + f (0) 3! for the 3rd Taylor polynomial at x = 0. To calculate the various quantities:

Simulation-Solving Dynamic Models ABE 5646 Week 2, Spring 2010

Chapter 2. First Order Scalar Equations

Solutions to Assignment 1

û s L u t 0 s a ; i.e., û s 0

20. Applications of the Genetic-Drift Model

Math 2214 Solution Test 1B Fall 2017

Predator - Prey Model Trajectories and the nonlinear conservation law

F (u) du. or f(t) = t

) were both constant and we brought them from under the integral.

System of Linear Differential Equations

CS537. Numerical Analysis

Math 2214 Solution Test 1A Spring 2016

The Quantum Theory of Atoms and Molecules: The Schrodinger equation. Hilary Term 2008 Dr Grant Ritchie

Math 333 Problem Set #2 Solution 14 February 2003

EE650R: Reliability Physics of Nanoelectronic Devices Lecture 9:

Some Basic Information about M-S-D Systems

Our main purpose in this section is to undertake an examination of the stock

EXERCISES FOR SECTION 1.5

Stochastic models and their distributions

6. Stochastic calculus with jump processes

Section 3.5 Nonhomogeneous Equations; Method of Undetermined Coefficients

TMA4329 Intro til vitensk. beregn. V2017

Approximating the Powers with Large Exponents and Bases Close to Unit, and the Associated Sequence of Nested Limits

8. Basic RL and RC Circuits

Chapter 3 Boundary Value Problem

Final Spring 2007

dt = C exp (3 ln t 4 ). t 4 W = C exp ( ln(4 t) 3) = C(4 t) 3.

( ) = b n ( t) n " (2.111) or a system with many states to be considered, solving these equations isn t. = k U I ( t,t 0 )! ( t 0 ) (2.

Essential Microeconomics : OPTIMAL CONTROL 1. Consider the following class of optimization problems

Stochastic Reliability Analysis of Two Identical Cold Standby Units with Geometric Failure & Repair Rates

Hamilton- J acobi Equation: Weak S olution We continue the study of the Hamilton-Jacobi equation:

Chapter 7 Response of First-order RL and RC Circuits

k B 2 Radiofrequency pulses and hardware

KINEMATICS IN ONE DIMENSION

III. Direct evolution of the density: The Liouville Operator

dy dx = xey (a) y(0) = 2 (b) y(1) = 2.5 SOLUTION: See next page

Introduction to Probability and Statistics Slides 4 Chapter 4

Basilio Bona ROBOTICA 03CFIOR 1

Method For Solving Fuzzy Integro-Differential Equation By Using Fuzzy Laplace Transformation

Math Week 14 April 16-20: sections first order systems of linear differential equations; 7.4 mass-spring systems.

SMT 2014 Calculus Test Solutions February 15, 2014 = 3 5 = 15.

MA 214 Calculus IV (Spring 2016) Section 2. Homework Assignment 1 Solutions

EE100 Lab 3 Experiment Guide: RC Circuits

Announcements: Warm-up Exercise:

Fuzzy Laplace Transforms for Derivatives of Higher Orders

KEY. Math 334 Midterm I Fall 2008 sections 001 and 003 Instructor: Scott Glasgow

72 Calculus and Structures

1 1 + x 2 dx. tan 1 (2) = ] ] x 3. Solution: Recall that the given integral is improper because. x 3. 1 x 3. dx = lim dx.

5.1 - Logarithms and Their Properties

Chapter 7: Solving Trig Equations

Chapter 2. Models, Censoring, and Likelihood for Failure-Time Data

PROBLEMS FOR MATH 162 If a problem is starred, all subproblems are due. If only subproblems are starred, only those are due. SLOPES OF TANGENT LINES

Physics 235 Chapter 2. Chapter 2 Newtonian Mechanics Single Particle

t is a basis for the solution space to this system, then the matrix having these solutions as columns, t x 1 t, x 2 t,... x n t x 2 t...

10. State Space Methods

CHEMISTRY 047 STUDY PACKAGE

u(x) = e x 2 y + 2 ) Integrate and solve for x (1 + x)y + y = cos x Answer: Divide both sides by 1 + x and solve for y. y = x y + cos x

Math 36. Rumbos Spring Solutions to Assignment #6. 1. Suppose the growth of a population is governed by the differential equation.

Age (x) nx lx. Age (x) nx lx dx qx

Hamilton- J acobi Equation: Explicit Formulas In this lecture we try to apply the method of characteristics to the Hamilton-Jacobi equation: u t

23.2. Representing Periodic Functions by Fourier Series. Introduction. Prerequisites. Learning Outcomes

Ordinary Differential Equations

Matlab and Python programming: how to get started

Module 2 F c i k c s la l w a s o s f dif di fusi s o i n

Math Final Exam Solutions

LabQuest 24. Capacitors

CHAPTER 12 DIRECT CURRENT CIRCUITS

Higher Order Difference Schemes for Heat Equation

. Now define y j = log x j, and solve the iteration.

2. Nonlinear Conservation Law Equations

MATH 31B: MIDTERM 2 REVIEW. x 2 e x2 2x dx = 1. ue u du 2. x 2 e x2 e x2] + C 2. dx = x ln(x) 2 2. ln x dx = x ln x x + C. 2, or dx = 2u du.

An Introduction to Backward Stochastic Differential Equations (BSDEs) PIMS Summer School 2016 in Mathematical Finance.

THE SINE INTEGRAL. x dt t

Continuous Time. Time-Domain System Analysis. Impulse Response. Impulse Response. Impulse Response. Impulse Response. ( t) + b 0.

Echocardiography Project and Finite Fourier Series

Chapter 15: Phenomena. Chapter 15 Chemical Kinetics. Reaction Rates. Reaction Rates R P. Reaction Rates. Rate Laws

Notes on Kalman Filtering

3.1.3 INTRODUCTION TO DYNAMIC OPTIMIZATION: DISCRETE TIME PROBLEMS. A. The Hamiltonian and First-Order Conditions in a Finite Time Horizon

Two Coupled Oscillators / Normal Modes

R =, C = 1, and f ( t ) = 1 for 1 second from t = 0 to t = 1. The initial charge on the capacitor is q (0) = 0. We have already solved this problem.

Initial Value Problems

Diebold, Chapter 7. Francis X. Diebold, Elements of Forecasting, 4th Edition (Mason, Ohio: Cengage Learning, 2006). Chapter 7. Characterizing Cycles

Chapter 7: Inverse-Response Systems

MATH 4330/5330, Fourier Analysis Section 6, Proof of Fourier s Theorem for Pointwise Convergence

Reliability of Technical Systems

Chapter 6. Systems of First Order Linear Differential Equations

Differential Equations

T L. t=1. Proof of Lemma 1. Using the marginal cost accounting in Equation(4) and standard arguments. t )+Π RB. t )+K 1(Q RB

23.5. Half-Range Series. Introduction. Prerequisites. Learning Outcomes

Class Meeting # 10: Introduction to the Wave Equation

4.6 One Dimensional Kinematics and Integration

Transcription:

Comparison beween e Discree and Coninuous Time Models D. Sulsky June 21, 2012 1 Discree o Coninuous Recall e discree ime model Î = AIS Ŝ = S Î. Tese equaions ell us ow e populaion canges from one day o e nex. We generaed a sequence of populaions by repeaed applicaion of ese formulae. We can add an equaion o describe e removed populaion ˆR = R + I. (1) Le s number e populaion on e n day wi a subscrip so a I n and S n are e number of infecive people and e number of suscepible people on e n day. Te sequence in e able follows e relaions I n+1 = AI n S n S n+1 = S n AI n S n R n+1 = R n + I n, wi I 0, S 0 and R 0 given. Noe a e oal populaion size is fixed since I n+1 + S n+1 + R n+1 = I n + S n + R n. In deriving is model, we made e assumpion a e sampling period was e same as e period of infeciousness (1 day). We will now relax is assumpion. 1

Suppose, as before, ose leaving e suscepible class ener direcly ino e infecive class, bu a a proporion, say B, of infecives remain infecive a e end of e sampling period. Ten e equaions become I n+1 = AI n S n + BI n S n+1 = S n AI n S n R n+1 = R n + (1 B)I n. (2) Te consan A measures e probabiliy of cacing e disease during e sampling period. In order o connec wi e coninuous ime equaions, we wan o consider e limi of infiniesimal sampling inervals. Le be a small sampling inerval. (We will look a e limi as 0.) Le S(), I() and R() be smoo funcions of and suppose S n = S(n), I n = I(n) and R n = R(n). Te values of e consans A and B depend on e sampling inerval and sould be rescaled, A = a and B = 1 b, for some consans a and b. Le = n, we ave I( + ) = ai()s() + (1 b)i() 1 ( ) I( + ) I() = ai()s() bi() S( + ) = S() ai()s() 1 ( ) S( + ) S() = ai()s() R( + ) = R() + bi() 1 ( ) R( + ) R() = bi(). In e limi as e sampling inerval goes o zero ( 0), we obain e SIR model di = ai()s() bi() d ds d = ai()s() dr d = bi(). 2 Coninuous o Discree We will look a wo differen ways in wic e coninuous-ime equaions are relaed o e discree-ime equaions. In bo approaces, we will sar wi e coninuousime SIR model and deermine relaed discree-ime equaions. In e firs approac, le s sar wi e equaions for S and I, divide e S equaion by S and e I 2

equaion by I o ge 1 ds S() d = ai() 1 di I() d = as() b dr d = bi(). Inegrae ese equaions over an inerval from o + + + 1 ds S() d d = 1 I() + di d d = dr d d = + + + ai() d (as() b) d bi() d. Te lef-and side of ese equaions can be inegraed exacly o give ln ( S( + ) S() ln ( I( + ) I() R( + ) R() = ) + = ai() d ) + = (as() b) d + bi() d. Now, ake e exponenial of bo sides of e firs wo equaions [ S( + ) = S() exp + ai() d [ + I( + ) = I() exp (as() b) d R( + ) R() = + bi() d. So far, we ave no made any approximaions. Bu, we canno inegrae e rigand sides exacly; so approximae e inegrals using a lef-and sum. Ta is, we 3

approximae e inegrand by a consan value - e value a e lower limi - o obain [ S( + ) S() exp ai() [ I( + ) I() exp (as() b) R( + ) R() = bi(). If we ake = 1, we can wrie e above equaions as [ S +1 = S exp ai [ I +1 = I exp as b R +1 = R + bi. A biological inerpreaion of ese equaions can be given. If we assume a e probabiliy of a suscepible becoming infeced is Poisson disribued wi mean ai, en exp( ai ) is jus e zero erm of e Poisson disribuion (e probabiliy of no geing infeced). Of course, = 1 is aken o be e leng of e infecious period. If we expand e exponenial erms and neglec iger order erms (assuming infecion prevalence is small), we obain [ S +1 = S 1 ai = S ai S I +1 = I [1 + as b = ai S + (1 b)i R +1 = R + bi. Tese are e same discree equaions as in equaions (2) wi A = a and B = 1 b (since = 1). In our second approac, le s now sar from e coninuous SIR model and examine discreizaions a we use wen we approximae soluions numerically. Le s firs remind ourselves wa Euler s meod is for solving ordinary differenial equaions. In e simples case of a scalar equaion Euler s meod is dy d = f(, y), y( 0) = y 0, (3) Y n+1 = Y n + f( n, Y n ) n+1 = n + (4) 4

Recall a e soluion o a single differenial equaion wi an iniial condiion is a funcion, y() wi y( 0 ) = y 0. We ave used e noaion Y n as e approximaion o y( n ). We sar is ieraion wi e given iniial condiions ( 0, Y 0 = y 0 ). Euler s meod is based on using a angen line over a finie inerval of size o approximae e exac funcion. Le s call ŷ(, 0 ) e angen line o e exac soluion a e base poin = 0, given as a funcion of. Te equaion of e angen line is ŷ(, 0 ) = y( 0 ) + f( 0, y( 0 ))( 0 ). (5) Since we sar our approximaion wi e exac iniial condiion, Y 0 = y 0 and we can rewrie e above as ŷ(, 0 ) = Y 0 + f( 0, Y 0 )( 0 ). (6) If we follow e angen line from ( 0, Y 0 ) for a ime inerval of size, we obain ŷ( 0 +, 0 ) = Y 0 + f( 0, Y 0 ). (7) Euler s meod ses 1 = 0 + and Y 1 = ŷ( 1, 0 ) = Y 0 + f( 0, Y 0 ). For e nex sep, we consruc e angen line o e soluion of e differenial equaion a goes roug e poin ( 1, Y 1 ). Te angen line is ŷ(, 1 ) = Y 1 + f( 1, Y 1 )( 1 ). (8) If we follow e angen line from ( 1, Y 1 ) for a ime inerval of size, we obain ŷ( 1 +, 1 ) = Y 1 + f( 1, Y 1 ). (9) Euler s meod ses 2 = 1 + and Y 2 = ŷ( 2, 1 ) = Y 1 + f( 1, Y 1 ). Te process is repeaed o give e general formula (4). Te process is illusraed in Fig. 1. Te same process can be applied o obain approximae soluions o sysems of equaions. Again, e differenial equaions for e SIR model are ds d = ai()s() di = ai()s() bi() d dr d = bi(), wi iniial condiions S(0) = S 0, I(0) = I 0 and R(0) = N 0 S 0 I 0. Apply Euler s meod o e firs equaion. In is case, 0 = 0. Te angen line roug (0, S 0 ) is Ŝ(, 0) = S 0 ai 0 S 0 ( 0). (10) 5

y() ( 2, Y 2 ) y 0 ( 1, Y 1 ) 0 1 2 Figure 1: Illusraion of Euler s meod for a scalar equaion. Follow e angen line from (0, S 0 ) for a ime inerval of size Ŝ(0 +, 0) = S 0 ai 0 S 0. (11) Se 1 = 0 + = and S 1 = Ŝ(0 +, 0) = S 0 ai 0 S 0. Similarly, for e second equaion, e angen line roug (0, I 0 ) is Î(, 0) = I 0 + [ ai 0 S 0 bi 0 ( 0). (12) Follow e angen line from (0, I 0 ) for a ime inerval of size Î(0 +, 0) = I 0 + ai 0 S 0 bi 0. (13) Se I 1 = Î(0 +, 0) = I 0 + ai 0 S 0 bi 0. For e ird equaion, e angen line roug (0, R 0 ) is ˆR(, 0) = R 0 + bi 0 ( 0). (14) Follow e angen line from (0, R 0 ) for a ime inerval of size ˆR(0 +, 0) = R 0 + bi 0. (15) 6

Se R 1 = R 0 + bi 0. We now ave an approximae soluion a ime 1 = a is S 1, I 1 and R 1. We can now consruc a angen line for eac equaion roug e corresponding poins ( 1, S 1 ), ( 1, I 1 ) and ( 1, R 1 ). Te angen lines are Ŝ(, 1 ) = S 1 ai 1 S 1 ( 1 ) Î(, 1 ) = I 1 + [ ai 1 S 1 bi 1 ( 1 ) ˆR(, 1 ) = bi 1 ( 1 ). (16) Follow e angen line from e poins ( 1, S 1 ), ( 1, I 1 ) and ( 1, R 1 ) for a ime inerval of size o obain Ŝ( 1 +, 1 ) = S 1 ai 1 S 1 Î( 1 +, 1 ) = I 1 + [ ai 1 S 1 bi 1 ˆR( 1 +, 1 ) = bi 1. (17) Se 2 = 1 + and S 2 = S 1 ai 1 S 1 I 2 = I 1 + [ ai 1 S 1 bi 1 R 2 = bi 1. We now recognize e paern (18) S n+1 = S n ai n S n I n+1 = I n + ai n S n bi n R n+1 = bi n n+1 = n +. (19) Since 0 = 0, we ave n = n, and S n, I n and R n are approximaions o S(n), I(n), R(n). Obviously, if we se A = a and B = 1 b we reurn o e discree-ime equaions (2). We ave seen a e discree-ime equaions and e coninuous-ime, ordinary differenial equaions for e SIR model are relaed. Taking e limi of a small sampling period in e discree equaions gives e ordinary differenial equaions. Te applicaion of Euler s meod is an example of wa is called discreizing e ordinary differenial equaions. Euler s meod gives discree equaions o solve numerically a approximae e soluions o e ordinary differenial equaions. Te approximaion ges beer as, e ime sep size, is reduced. Euler s meod is called firs order accurae because differences beween e approximaion and 7

exac soluion o e ordinary differenial equaions decrease o zero as o e firs power. Tis relaion is called e convergence rae. More sopisicaed numerical meods can be consruced a give rise o differen discree equaions wi beer convergence raes. Tings o ry. 1. Solve e coninuous-ime ordinary differenial equaions for e SIR model using Euler s meod wi differen sep sizes. Approximae e error in your soluions. Do you observe firs order convergence? 2. Try some oer numerical meods for solving e equaions. Wa does e error look like for ese meods? Wa is e convergence rae? 8