Computational Methods for Design Lecture 3 – Elementary Differential Equations John A. Burns C enter for O ptimal D esign A nd C ontrol I nterdisciplinary C enter for A pplied M athematics Virginia Polytechnic Institute and State University Blacksburg, Virginia A Short Course in Applied Mathematics 2 February 2004 – 7 February 2004 N∞M∞T Series Two Course Canisius College, Buffalo, NY
Today’s Topics Lecture 3 – Elementary Differential Equations A Review of the Basics Equilibrium Stability Dependence on Parameters: Sensitivity Numerical Methods
A Falling Object “Newton’s Second Law”. y(t) { { AIR RESISTANCE
Height: y(t)
Velocity: v(t)=y’(t)
System of Differential Equations
State Space STATE SPACE
System of Differential Equations THE PHYSICS – BIOLOGY – CHEMISTRY IS FINDING SELECTION OF THE “ CORRECT STATE SPACE ” IS A COMBINATION OF PHYSICS – BIOLOGY – CHEMISTRY AND MATHEMATICS
Parameters IN REAL PROBLEMS THERE ARE PARAMETERS SOLUTIONS DEPEND ON THESE PARAMETERS WE WILL BE INTERESTED IN COMPUTING SENSITIVITIES WITH RESPECT TO THESE PARAMETERS MORE LATER
Logistics Equation LE
Analytical Solution K
Initial p 0 : 1 < p 0 < 20,000 K
Equilibrium States LE EQUILIBRIUM STATES ARE CONSTANT SOLUTIONS
Equilibrium States K 0 UNSTABLESTABLE
A Falling Object {. y(t) NO EQUILIBRIUM STATES
Terminal Velocity
A Falling Object
Systems of DEs MORE EQUATIONS
Epidemic Models SIR Models (Kermak – McKendrick, 1927) l S usceptible – I nfected – R ecovered/Removed
Epidemic Models SIR Models (Kermak – McKendrick, 1927) l S usceptible – I nfected – R ecovered/Removed
Systems of DEs
Initial Value Problems MOST OF THE TIME WE FORGET THE ARROW AND f CAN DEPEND ON TIME t AND PARAMETERS q
Basic Results A solution to the ordinary differential equation (Σ) is a differentiable function (Σ)(Σ) defined on a connected interval (a,b) such that x(t) satisfies (Σ) for all t (a,b). TWO SOLUTIONS
Solutions
Initial Condition
Basic Theorems Theorem 1. Let f: R n ---> R n be a continuous function on a domain D R n, and x 0 D. Then there exists at least one solution to the initial value problem (IVP). (IVP) TO GET UNIQUENESS WE NEED MORE
Basic Theorems Theorem 2. If there is an open rectangle about (t 0, x 0 ) such that is continuous at all points (t, x) , then there a unique solution to the initial value problem (IVP). x0x0 t0t0
SIR Model
ALL ENTRIES ARE CONTINUOUS FOR ALL Theorem 1. IS OK
A Falling Object NO PROBLEM SO FAR
A Falling Object AGAIN … CONTINUOUS FOR ALL Theorem 1. IS OK
Parameter Dependence FOR THE FALLING OBJECT …
Examples: n=m=1 CONTINUOUS EVERYWHERE UNIQUE SOLUTION CONTINUOUS WHEN UNIQUE SOLUTION
Logistic Equation
Numerical Methods FORWARD EULER (IVP) t0t0 x0x0
Explicit Euler t0t0 x0x0
t0t0 x0x0
Example 1
Explicit Euler h=.2 h=.01 h=.1
Example 2
h=.2 h=.1
Typical MATLAB m files Eeuler_1.m Eeuler_2.m
Simple Example
Simple Example 3 IF 10 1 PROBLEM IS FINITE PRECISION ARITHMETIC MESH REFINEMENT MAKES THE PROBLEM WORSE