Motivation and Goals. Modelling with ODEs. Continuous Processes. Ordinary Differential Equations. dy = dt

Similar documents
Math 266: Ordinary Differential Equations

Boyce/DiPrima/Meade 11 th ed, Ch 1.1: Basic Mathematical Models; Direction Fields

Outline. Calculus for the Life Sciences. What is a Differential Equation? Introduction. Lecture Notes Introduction to Differential Equa

Predator-Prey Population Models

Dynamical Systems and Chaos Part II: Biology Applications. Lecture 6: Population dynamics. Ilya Potapov Mathematics Department, TUT Room TD325

Phenomenon: Canadian lynx and snowshoe hares

1.2. Introduction to Modeling. P (t) = r P (t) (b) When r > 0 this is the exponential growth equation.

Differential Equation (DE): An equation relating an unknown function and one or more of its derivatives.

Gerardo Zavala. Math 388. Predator-Prey Models

2D-Volterra-Lotka Modeling For 2 Species

A NUMERICAL STUDY ON PREDATOR PREY MODEL

MODELS ONE ORDINARY DIFFERENTIAL EQUATION:

Physics: spring-mass system, planet motion, pendulum. Biology: ecology problem, neural conduction, epidemics

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

CS 365 Introduction to Scientific Modeling Fall Semester, 2011 Review

Elementary Differential Equations

MA 102 Mathematics II Lecture Feb, 2015

Nonlinear Dynamics. Moreno Marzolla Dip. di Informatica Scienza e Ingegneria (DISI) Università di Bologna.

Science One Math. October 23, 2018

Lesson 9: Predator-Prey and ode45

Lecture 20/Lab 21: Systems of Nonlinear ODEs

MATH 1231 MATHEMATICS 1B Calculus Section 3A: - First order ODEs.

First Order ODEs (cont). Modeling with First Order ODEs

Using Matlab to integrate Ordinary Differential Equations (ODEs)

Getting Started With The Predator - Prey Model: Nullclines

Introduction to First Order Equations Sections

CPS 5310: Parameter Estimation. Natasha Sharma, Ph.D.

Integration, Separation of Variables

1.2. Introduction to Modeling

1.1 Differential Equation Models. Jiwen He

Een vlinder in de wiskunde: over chaos en structuur

MATH 1014 N 3.0 W2015 APPLIED CALCULUS II - SECTION P. Perhaps the most important of all the applications of calculus is to differential equations.

Lecture 1. Scott Pauls 1 3/28/07. Dartmouth College. Math 23, Spring Scott Pauls. Administrivia. Today s material.

sections June 11, 2009

second order Runge-Kutta time scheme is a good compromise for solving ODEs unstable for oscillators

ENGI 3424 First Order ODEs Page 1-01

BIOS 6150: Ecology Dr. Stephen Malcolm, Department of Biological Sciences

MA 138 Calculus 2 with Life Science Applications Handout

Lab 5: Nonlinear Systems

Introduction to Dynamical Systems Basic Concepts of Dynamics

Population Dynamics II

Lecture I Introduction, concept of solutions, application

APPM 2360 Lab #3: The Predator Prey Model

Chap. 20: Initial-Value Problems

Mathematical Models. MATH 365 Ordinary Differential Equations. J. Robert Buchanan. Fall Department of Mathematics

THETA-LOGISTIC PREDATOR PREY

Mathematical Models. MATH 365 Ordinary Differential Equations. J. Robert Buchanan. Spring Department of Mathematics

Chapter 9 Population Dynamics, Carrying Capacity, and Conservation Biology

Systems of Ordinary Differential Equations

MAT 1332: CALCULUS FOR LIFE SCIENCES

Interacting Populations.

MA 138: Calculus II for the Life Sciences

Homework #4 Solutions

Lokta-Volterra predator-prey equation dx = ax bxy dt dy = cx + dxy dt

Math 307 E - Summer 2011 Pactice Mid-Term Exam June 18, Total 60

Journal of the Vol. 36, pp , 2017 Nigerian Mathematical Society c Nigerian Mathematical Society

The integrating factor method (Sect. 1.1)

Population Dynamics. Max Flöttmann and Jannis Uhlendorf. June 12, Max Flöttmann and Jannis Uhlendorf () Population Dynamics June 12, / 54

2007 Summer College on Plasma Physics

Kasetsart University Workshop. Mathematical modeling using calculus & differential equations concepts

1 Simple one-dimensional dynamical systems birth/death and migration processes, logistic

Lecture 1: A Preliminary to Nonlinear Dynamics and Chaos

Review Problems for Exam 2

1 (t + 4)(t 1) dt. Solution: The denominator of the integrand is already factored with the factors being distinct, so 1 (t + 4)(t 1) = A

Unit 4 Lesson 6 What Are Physical and Behavioral Adaptations?

Lotka Volterra Predator-Prey Model with a Predating Scavenger

MITOCW MITRES18_005S10_DiffEqnsGrowth_300k_512kb-mp4

Non-Linear Models. Non-Linear Models Cont d

Chapter1. Ordinary Differential Equations

2.12: Derivatives of Exp/Log (cont d) and 2.15: Antiderivatives and Initial Value Problems

Practice Midterm 1 Solutions Written by Victoria Kala July 10, 2017

Dynamical Systems: Lecture 1 Naima Hammoud

Math Applied Differential Equations

EXAM. Exam #1. Math 3350 Summer II, July 21, 2000 ANSWERS

Interactions between predators and prey

Math 3B: Lecture 14. Noah White. February 13, 2016

UCLA: Math 3B Problem set 8 (solutions) Fall, 2016

QUESTION 1: Find the derivatives of the following functions. DO NOT TRY TO SIMPLIFY.

ENGI 2422 First Order ODEs - Separable Page 3-01

SIMPLE MATHEMATICAL MODELS WITH EXCEL

Ecology 302: Lecture VII. Species Interactions.

MATH 4B Differential Equations, Fall 2016 Final Exam Study Guide

Linear Variable coefficient equations (Sect. 2.1) Review: Linear constant coefficient equations

Example (#1) Example (#1) Example (#2) Example (#2) dv dt

Problem Set. Assignment #1. Math 3350, Spring Feb. 6, 2004 ANSWERS

Modeling with differential equations

Solutions to Homework 1, Introduction to Differential Equations, 3450: , Dr. Montero, Spring y(x) = ce 2x + e x

CHAPTER 1: FIRST ORDER ORDINARY DIFFERENTIAL EQUATION

Ecological Relationships

14 Periodic phenomena in nature and limit cycles

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. D) u = - x15 cos (x15) + C

1 The pendulum equation

Diffusion of point source and biological dispersal

Introduction to Ordinary Differential Equations (Online)

Non-Dimensionalization of Differential Equations. September 9, 2014

Differential Equations Spring 2007 Assignments

Instabilities In A Reaction Diffusion Model: Spatially Homogeneous And Distributed Systems

The acceleration of gravity is constant (near the surface of the earth). So, for falling objects:

4.1 Modelling with Differential Equations

1.1. Bacteria Reproduce like Rabbits. (a) A differential equation is an equation. a function, and both the function and its

Transcription:

Motivation and Goals Modelling with ODEs 24.10.01 Motivation: Ordinary Differential Equations (ODEs) are very important in all branches of Science and Engineering ODEs form the basis for the simulation of almost all continuous phenomena Goals: To introduce ODEs To give some examples of how to build simple ODE models Introduction to Simulation WS01/02 - L 02 1/39 Graham Horton Introduction to Simulation WS01/02 - L 02 2/39 Graham Horton Continuous Processes Ordinary Differential Equations Continuous processes occur everywhere. Here, we are interested in cases with discrete variables Some examples: An object falling to the ground The motion of the planets orbiting the sun The current and voltage in an electrical circuit The level of alcohol in my blood on January 1st The populations of a predator and its prey (!) In almost all cases, the relationships between the variables are defined by an ODE An Ordinary Differential Equation (ODE) describes the rate of change of a quantity y as a function of its current value and the time t : dy = f ( y, t) In addition, we usually know the value of y(0): y ( 0) = y 0 Introduction to Simulation WS01/02 - L 02 3/39 Graham Horton Introduction to Simulation WS01/02 - L 02 4/39 Graham Horton

Initial Value Problems Example for an IVP Given an ordinary differential equation... dy =... and an initial condition... f ( y, t) Differential equation and initial condition: dy = 2t y(0) = 1... find y ( 0) = y y(t) 0 Solution: y( t) = t 2 + 1 Introduction to Simulation WS01/02 - L 02 5/39 Graham Horton Introduction to Simulation WS01/02 - L 02 6/39 Graham Horton Example for an IVP Example for an IVP Differential equation and initial condition: Solution: dy = λ(1 y) y(0) = 0 y( t) =1 e λt Differential equation and initial condition: Solution: dy = t e cos( t) y y(0) = 0 t y( t) = e sin( t) Introduction to Simulation WS01/02 - L 02 7/39 Graham Horton Introduction to Simulation WS01/02 - L 02 8/39 Graham Horton

Example for an IVP Solving ODEs A system of two differential equations and initial conditions: Solution: du = v, u(0) = 0, dv = u v(0) = 1 u ( t) = sin( t), v( t) = cos( t) We were able to solve all these examples analytically These were therefore special cases Usually, there is no analytic solution for systems of ODEs We are forced to use numerical methods to perform the integration The numerical integration of ODEs forms the most important part of continuous simulation We will look at this next week Introduction to Simulation WS01/02 - L 02 9/39 Graham Horton Introduction to Simulation WS01/02 - L 02 10/39 Graham Horton Balance Equations A Falling Object Most ODEs are balance equations A balance equation basically says: Consider dropping an object from a certain height We will develop a model for the object's location and speed Change = Increase - Decrease Example: ODE for the amount of water x in a tank: I l/s dx/ = I - O Variables: p(t) : distance fallen at time t. (Units [m]) v(t) : velocity of object at time t. (Units [m/s]) O l/s Introduction to Simulation WS01/02 - L 02 11/39 Graham Horton Introduction to Simulation WS01/02 - L 02 12/39 Graham Horton

Effect of Gravity A Falling Object The Earth exerts a force F on the object. (Units [N]) Let the mass of the object be m. (Units [kg]) The situation at time t: Newton's law (F = m a) states that Force = Mass Acceleration Therefore, a = F /m p meters Parameters: a : acceleration due to gravity. (Units [m/s/s]) F Newtons Mass m v meters per second Introduction to Simulation WS01/02 - L 02 13/39 Graham Horton Introduction to Simulation WS01/02 - L 02 14/39 Graham Horton The Model Simulation Results Acceleration is the rate of change of velocity: dv/ = g = 9,81 [m/s/s] Simulation results: Velocity is the rate of change of position: dp/ = v At time t =0 we define: p(0) = 0 v(0) = 0 Introduction to Simulation WS01/02 - L 02 15/39 Graham Horton Introduction to Simulation WS01/02 - L 02 16/39 Graham Horton

Wind Resistance Wind Resistance We have assumed that the object is falling in a vacuum Now let us consider wind resistance The standard physical model states: The force due to wind resistance is proportional to the square of the velocity Result for a = 0.0033 (skydiver): We obtain dv/ = g - a v 2 for some constant a with units [1/m] Terminal velocity 56 m/s Introduction to Simulation WS01/02 - L 02 17/39 Graham Horton Introduction to Simulation WS01/02 - L 02 18/39 Graham Horton Population Biology Population Biology Consider the population x of some animal species Assume for the moment... No deaths Infinite space and food supply The birth rate is proportional to the current population: dx/ = a x 30 Now let us add deaths to the model The death rate is also proportional to the current population This gives dx/ = a x - b x = (a - b) x If a > b, we still have exponential population growth We can just set c = a - b to obtain dx/ = c x The solution of this ODE is x = e ax We have exponential population growth 25 20 15 10 5 0 0 0.5 1 1.5 Introduction to Simulation WS01/02 - L 02 19/39 Graham Horton Introduction to Simulation WS01/02 - L 02 20/39 Graham Horton

The Logistic Equation The Logistic Equation Now assume a limited food supply As the population increases, food per capita goes down This leads to decreasing birth and increasing death rates This is called crowding or competition Simulated solutions for c = 0.5, 1.0 and 2.0: One solution is to use the logistic equation dx/ = c x - d x 2 We will achieve steady state when x = c / d This is an assumption which works well in practice Introduction to Simulation WS01/02 - L 02 21/39 Graham Horton Introduction to Simulation WS01/02 - L 02 22/39 Graham Horton Predator-Prey Models Lotka-Volterra Equations Consider an area in which hares and foxes live Denote the population of hares by h and of foxes by f Observations show: Foxes must eat hares in order to survive Hares have an unlimited supply of food Without foxes, hares multiply according to dh/ = a h Without hares to eat, foxes die according to df / = -b f The probability of a meeting is proportional to h f The increase in foxes is d h f The rate at which hares are eaten is c h f The resulting equations are: dh df = a h c h f = b f + d h f These are the famous Lotka-Volterra equations Introduction to Simulation WS01/02 - L 02 23/39 Graham Horton Introduction to Simulation WS01/02 - L 02 24/39 Graham Horton

Lotka-Volterra Equations Lotka-Volterra Equations Simulation results for parameters State space representation: Plot h (t ) against f (t ) h (0) = 400 f (0) = 37 a = 0.175 b = 0.125 c = d = 0.001 0 < t < 150 Introduction to Simulation WS01/02 - L 02 25/39 Graham Horton Introduction to Simulation WS01/02 - L 02 26/39 Graham Horton Lynxes and Hares Another Example From the records of the Hudson Bay Company Number of lynx and hare skins purchased 1845-1935 Petri-dish populations of the bacteria Paramecium Aurelia (predator) Saccharomices Exiguns (prey) Introduction to Simulation WS01/02 - L 02 27/39 Graham Horton Introduction to Simulation WS01/02 - L 02 28/39 Graham Horton

The Gypsy Moth The Gypsy Moth The Gypsy moth is a pest Population of Gypsy moths in the Engadin 1954-1976: Its larvae eats the leaves of the larch This defoliates and often kills the tree Population 350 300 250 200 150 100 50 0 1954 1959 1964 1969 1974 Year Introduction to Simulation WS01/02 - L 02 29/39 Graham Horton Introduction to Simulation WS01/02 - L 02 30/39 Graham Horton The Gypsy Moth Chaos This looks very much like half of the Lotka-Volterra simulation result: Population 350 300 250 200 150 100 50 0 1954 1959 1964 1969 1974 Year Have we proved that the Gypsy moth is part of a predator-prey relationship? Chaotic behaviour is a (relatively) new discovery in ODEs Discovered by Edward Lorenz in the early 60s Three equations from meteorology Discovered by accident "Chaos" in physics means... "Sensitive dependence on initial conditions" The "Butterfly Effect" dx = a ( y x) dy = x z + b x y dz = x y c z Introduction to Simulation WS01/02 - L 02 31/39 Graham Horton Introduction to Simulation WS01/02 - L 02 32/39 Graham Horton

Types of Behaviour Lorenz's Equations What can the long-term behaviour of a system look like? Solution in the time domain: Explosion: One or more values becomes infinite Steady-state / stationary Nothing changes Periodic Values repeat indefinitely Chaotic Finite, non-stationary, non-periodic Introduction to Simulation WS01/02 - L 02 33/39 Graham Horton Introduction to Simulation WS01/02 - L 02 34/39 Graham Horton The Lorenz Attractor The Lorenz Attractor Simulation result ("Lorenz attractor"): Simulation result in the x-y, x-z and y-z planes: Introduction to Simulation WS01/02 - L 02 35/39 Graham Horton Introduction to Simulation WS01/02 - L 02 36/39 Graham Horton

Three Species Three Species Now let us build a new three-species predator-prey model: Species z preys on species x and y There is crowding between x and y The three-species result in a non-periodic 3-D state space: dx 2 = x 0.001x 0.001xy 0.01xz dy 2 = y 0.0015xy 0.001y 0.001yz dz = z + 0.005xz + 0.0005yz Introduction to Simulation WS01/02 - L 02 37/39 Graham Horton Introduction to Simulation WS01/02 - L 02 38/39 Graham Horton The Last Slide An ODE is an equation of the form dy/ = f (y,t) Almost all continuous processes are described by ODEs These are thus very important in simulation There is a 2+2 SWS course "Kontinuierliche Simulation" ODEs are usually a type of balance equation: Change = Increase - Decrease Next week: How to solve ODEs Introduction to Simulation WS01/02 - L 02 39/39 Graham Horton