Deterministic Changes - Chapter 5 of Heinz

Similar documents
Problem Sheet 1.1 First order linear equations;

2 One-dimensional models in discrete time

MATH 1231 MATHEMATICS 1B Calculus Section 2: - ODEs.

Education Resources. This section is designed to provide examples which develop routine skills necessary for completion of this section.

Mathematical Modelling Lecture 10 Difference Equations

3.5 Competition Models: Principle of Competitive Exclusion

Modeling with differential equations

M340 HW 2 SOLUTIONS. 1. For the equation y = f(y), where f(y) is given in the following plot:

Fundamentals of Dynamical Systems / Discrete-Time Models. Dr. Dylan McNamara people.uncw.edu/ mcnamarad

Page Points Score Total: 100

Homework #5 Solutions

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

Lab 5: Nonlinear Systems

Modeling with Discrete Dynamical Systems

Bees and Flowers. Unit 1: Qualitative and Graphical Approaches

6.4 Exponential Growth and Decay

FIRST-ORDER SYSTEMS OF ORDINARY DIFFERENTIAL EQUATIONS III: Autonomous Planar Systems David Levermore Department of Mathematics University of Maryland

A population is a group of individuals of the same species occupying a particular area at the same time

Populations Study Guide (KEY) All the members of a species living in the same place at the same time.

First Order Differential Equations Chapter 1

Geometric series and effective medicine dosage

Computers, Lies and the Fishing Season

Table of contents. d 2 y dx 2, As the equation is linear, these quantities can only be involved in the following manner:

MATH 100 Introduction to the Profession

MAT187H1F Lec0101 Burbulla

2D-Volterra-Lotka Modeling For 2 Species

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

Differential Equations Handout A

Damped Harmonic Oscillator

Lecture 3. Dynamical Systems in Continuous Time

Introduction to Modeling

M469, Fall 2010, Practice Problems for the Final

Section 1.1 Differential Equation Models. Key Terms:

Discrete Mathematics -- Chapter 10: Recurrence Relations

4. Ecology and Population Biology

Stability Analysis And Maximum Profit Of Logistic Population Model With Time Delay And Constant Effort Of Harvesting

OGT Review Worksheet Patterns, Functions, and Algebra Part One

Tribhuvan University Institute of Science and Technology

Key words and phrases. Bifurcation, Difference Equations, Fixed Points, Predator - Prey System, Stability.

Linearization of Differential Equation Models

Chapter 8 Answers. Lesson a. This a bipartite graph. b. 1, 4, 9 c. Number of Couples

Ecology: Part 1 Mrs. Bradbury

Question: Total. Points:

MA22S3 Summary Sheet: Ordinary Differential Equations

Coordinate Curves for Trajectories

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

A Producer-Consumer Model With Stoichiometry

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

Chapter 4. Systems of Linear Equations; Matrices. Opening Example. Section 1 Review: Systems of Linear Equations in Two Variables

(e) Use Newton s method to find the x coordinate that satisfies this equation, and your graph in part (b) to show that this is an inflection point.

MODELS ONE ORDINARY DIFFERENTIAL EQUATION:

Ecology Notes CHANGING POPULATIONS

A Stability Analysis on Models of Cooperative and Competitive Species

Ecology Regulation, Fluctuations and Metapopulations

Discrete (Difference) Equations

Math 2930 Worksheet Introduction to Differential Equations. What is a Differential Equation and what are Solutions?

STABILITY. Phase portraits and local stability

Math 3313: Differential Equations Second-order ordinary differential equations

Chapter 6 Population and Community Ecology

Understanding Populations Section 1. Chapter 8 Understanding Populations Section1, How Populations Change in Size DAY ONE

Fundamentals of Linear Algebra. Marcel B. Finan Arkansas Tech University c All Rights Reserved

Assume closed population (no I or E). NB: why? Because it makes it easier.

Ordinary Di erential Equations Lecture notes for Math 133A. Slobodan N. Simić

Chapter 4. Systems of Linear Equations; Matrices

MAT 121: Mathematics for Business and Information Science Final Exam Review Packet

CHAPTER 1 Introduction to Differential Equations 1 CHAPTER 2 First-Order Equations 29

Unit 6 Populations Dynamics

C2 Differential Equations : Computational Modeling and Simulation Instructor: Linwei Wang

Harbor Creek School District

dx n a 1(x) dy

Differential Equations 2280 Sample Midterm Exam 3 with Solutions Exam Date: 24 April 2015 at 12:50pm

6x 2 8x + 5 ) = 12x 8

16. . Proceeding similarly, we get a 2 = 52 1 = , a 3 = 53 1 = and a 4 = 54 1 = 125

Linear Second Order ODEs

ODE Math 3331 (Summer 2014) June 16, 2014

Follow links Class Use and other Permissions. For more information, send to:

What if the characteristic equation has a double root?

Advanced Mathematics Support Programme Edexcel Year 2 Core Pure Suggested Scheme of Work ( )

Lecture Notes. Applied Mathematics for Business, Economics, and the Social Sciences (4th Edition); by Frank S. Budnick

Interacting Populations.

Math 2930 Worksheet Introduction to Differential Equations

Community Interactions

Ordinary Differential Equations

Math 266: Ordinary Differential Equations

Chapter 7 - Exponents and Exponential Functions

Chapter 2 Lecture. Density dependent growth and intraspecific competition ~ The Good, The Bad and The Ugly. Spring 2013

Introduction to di erential equations

Three major steps in modeling: Construction of the Model Analysis of the Model Comparison with Experiment or Observation

1 Differential. Equations. A differential equation is any equation that involves a derivative. For example, Newton s second law F ma

AP Calculus Chapter 9: Infinite Series

Interactions. Yuan Gao. Spring Applied Mathematics University of Washington

Principles of Ecology

September Math Course: First Order Derivative

The study of living organisms in the natural environment How they interact with one another How the interact with their nonliving environment

SMA 208: Ordinary differential equations I

56:171 Operations Research Final Exam December 12, 1994

ENGI Second Order Linear ODEs Page Second Order Linear Ordinary Differential Equations

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

... it may happen that small differences in the initial conditions produce very great ones in the final phenomena. Henri Poincaré

5.5 Partial Fractions & Logistic Growth

Transcription:

Deterministic Changes - Chapter 5 of Heinz Mathematical Modeling, Spring 2019 Dr Doreen De Leon 1 Introduction - Section 51 of Heinz Our plan now is to use mathematics to explain changes in variables There are two standard ways to do this: using difference equations and using differential equations In this chapter, we will focus on difference equations Example 11 (Simple Example) Consider the value of a savings account initially opened with $1,000 that accrues interest paid each month at a rate of 1% per month If a n represents the amount of money in the account at time interval n, where t = 0 + n and a 0 = 1000, we see that a 1 = 1000 + 1000(001) = 1010 a 2 = 1010 + 1010(001) = 102030 Equation (11) is an example of a difference equation a n = a n 1 + 001a n 1 = 101a n 1 (11) 2 Linear Changes - Section 52 of Heinz The simplest linear difference equation is a first-order linear difference equation Assuming that y 0 is given, then y n = ay n 1 + b, n = 1, 2,, (21) where a and b are any parameter Notes: 1

1 Equation (21) may also be written as y n y n 1 = (a 1)y n 1 + b, so (21) gives us a formula for changes of y n 2 The equation is linear because it is linear in y n and y n 1 This is similar to the idea of linear differential equations in that we can show that L = (a 1)y n 1 is a linear operator, as defined in a linear algebra class 21 Solving Linear First-Order Difference Equations Simple Case: b = 0 Consider the homogeneous linear first-order difference equation, where y 0 is given: The first few solutions have the form y n = ay n 1, n = 1, 2, y 1 = ay 0 y 2 = ay 1 = a 2 y 0 y 3 = ay 2 = a 3 y 0 y n = a n y 0 The general solution is, thus, y n = a n y 0, n = 1, 2, Notes: 1 If a > 1, then lim n y n = 2 If a < 1, then lim n y n = 0 3 If a = 1, then y n = y 0 for all n N If a = 1, then y n = y 0 for all n, but if a = 1, then y n oscillates between y 0 and y 0 2

General Case: b 0 Consider the homogeneous linear first-order difference equation, where y 0 is given: The first few solutions have the form y n = ay n 1 + b, n = 1, 2, (22) y 1 = ay 0 + b y 2 = ay 1 + b = a(ay 0 + b) + b = a 2 y 0 + ab + b y 3 = ay 2 + b = a(a 2 y 0 + ab + b) + b = a 3 y 0 + a 2 b + ab + b = a 3 y 0 + b(a 2 + a + 1) y 4 = ay 3 + b = a(a 3 y 0 + b(a 2 + a + 1)) + b = a 4 y 0 + b(a 3 + a 2 + a + 1) y n = a n y 0 + b(a n 1 + a n 1 + + a + 1) You may recognize the sum a n 1 + a n 1 + + a + 1 as 1 a n 1 a We can easily show this by letting P n = a n 1 + a n 2 + + a + 1 Then ap n = a n + a n 1 + + a 2 + a, and P n ap n = 1 a n, and so P n = 1 an 1 a Therefore, the solution of (22) is ( ) 1 a y n = a n n y 0 + b, n = 1, 2, 1 a Notes: 3

1 The solution obtained above is not defined if a = 1 In that case, the solution is (Verify) y n = y 0 + nb 2 If n = 1, then we see y n oscillates between y 0 and y 0 + b (Verify) 3 If a > 1, then it is not clear what lim n y n is, as this depends on the sign of y 0 and b 4 If a < 1, then y n b 1 a as n 22 Equilibrium Values and Stability Definition 21 A real number y is an equilibrium value, or fixed point, of a first-order difference equation y n = f(y n 1 ) if y n = y for all n = 1, 2, 3, whenever y 0 = y In other words, y n = y is a constant solution of the difference equation To determine the equilibrium values (solutions), simply set y n = y n 1 = y and solve y = f(y) Definition 22 Let y be the equilibrium solution of a first-order difference equation y n = f(y n 1 ) The equilibrium solution is stable if lim n y n = y as n for any y 0 The equilibrium solution is unstable if lim n y n = ± for any y 0 In all other cases, the equilibrium solution is neither stable nor unstable Example 21 Find (a) the solution and (b) the equilibrium solution for each of the following difference equations Analyze the stability of the equilibrium solution 1 y n = 3y n 1, y 0 = 1 2 y n = 3 4 y n 1, y 0 = 64 3 y n = 2y n 1 1 y 0 = 3 4 y n = y n 1 + 2, y 0 = 1 Solution: 4

1 (a) The general solution of the difference equation is y n = 3 n y 0 Therefore, the solution is y n = 3 n (b) The equilibrium solution is found by solving y = 3y, giving y = 0 The equilibrium solution is unstable, since y n as n 2 (a) The general solution of the difference equation is y n = solution is y n = 64 ( ) n 3 4 (b) The equilibrium solution is found by solving y = 3 y, giving y = 0 4 The equilibrium solution is stable since y n 0 as n 3 (a) The general solution of the difference equation is ( ) 1 2 y n = 2 n n y 0 + ( 1), 1 2 or y n = 2(2 n ) + 1 (b) The equilibrium solution is found by solving y = 2y 1, or y = 1 This equilibrium solution is unstable, because y n as n ( ) n 3 y 0 Therefore, the 4 4 (a) The value of the solution of the difference equation oscillates between y 0 = 1 and y 0 + 2 = 3 We see this because y 1 = y 0 + 2 = 1 + 2 = 3 y 2 = y 1 + 2 = 3 + 2 = 1 = y 0 y 3 = y 2 + 2 = ( 1) + 2 = 3 y 4 = y 3 + 2 = 1 The solution may be expressed as { 1, if n is even y n = 3, if n is odd More compactly, we can write y n = 2( 1) n ( 1) + 1 = 2( 1) n+1 + 1 (b) The equilibrium solution is obtained by solving y = y + 2, giving y = 1 Since the limit as n of y n does not exist, the equilibrium solution is neither stable nor unstable 5

23 A Simple Discrete One-Species Population Model Consider the population of one species in a region, eg, the number of people in the world, the number of pine trees in a forest, or the number of bacteria in an experiment We will ignore any differences in the individuals that make up the group (ie, gender, age, etc) In many situations involving a large number of members of a species, it is reasonable to approximate the population size P (t) as a continuous function of time, perhaps by fitting a smooth curve through the data, since most populations are measured periodically (eg, the census in the US) In modeling the population growth of a species, we must consider what factors affect that population For example, the population of sharks in the Adriatic Sea will depend on the number of fish available for the sharks to consume (if there are none, the sharks could become extinct) In addition, the presence of a harmful bacteria will negatively impact the shark population There are other factors that may also be significant, eg, water temperature and salinity For simplicity, we first study a simple species, one that is not affected by any others Such a species might be part of a lab experiment Here, we will discuss one of the simplest models of population growth of a species Suppose measurements have been taken over an interval of time t The rate of change of the population as measured over the time interval t is P t P (t + t) P (t) = t This number indicates the absolute rate of increase of the population The growth rate per unit time of the population, R(t), as measured over the time interval t is R(t) = P (t + t) P (t) tp (t) If the growth rate and initial population were known, then the population at later times could be calculated as P (t + t) = P (t) + tr(t)p (t) Assuming that the population of the species only changes due to births and deaths (ie, ignoring the possibility of migration into and out of the area), we see that P (t + t) = P (t) + (# of births) (# of deaths) We may define the reproductive beirth rate b and the death rate d as b = # of births tp (t) and d = 6 # of deaths tp (t)

Then, the population at a time t + t is so the growth rate R = b d P (t + t) = P (t) + t(b d)p (t), Since we are considering the total population in a region, the birth and death rates are averages, averaged over the entire population (ie, not considering age as a factor) The model we are now developing may be modified to account for an age distribution As a first step in our model, we assume that the number of births and number of deaths are proportional to the total population, so the growth rate is constant, and we have, letting n represent the nth time interval, n t, and n = 0 represent t = t 0, or P n P n 1 = R tp (t), P n = (1 + R t)p n 1 Given an initial population size P (t 0 ) = P 0, we may determine the population at future times: P 1 = (1 + R t)p 0 P 2 = (1 + R t)p 1 = (1 + R t) 2 P 0 P n = (1 + R t) n P 0 24 Other Examples Example 22 (Simple Investment Annuity) Consider an annuity that is being prepared for retirement purposes An annuity is a savings account that pays interest on the amount in the account and allows the investor to withdraw a fixed amount from the account each month until the account is emptied Suppose the monthly interest paid on the account is 1% of the account balance and the owner wants to withdraw $1,000 from the account for 20 years before the account is emptied How much must the initial investment be? Solution: Let y n be the amount of money in the account after n months Then y n = 101y n 1 1000, which has a general solution ( ) 1 (101) y n = (101) n n y 0 + ( 1000), 1 101 7

or y n = (101) n y 0 + 10000(1 (101) n ) In order to have $1,000 in the account at the end of 20 years, or 240 months, we need Solving for y 0 gives 1000 = y 240 = (101) 240 y 0 + 10000(1 (101) 240 ) y 0 = 9081942 Therefore, the initial investment in the account should be $90,81942 Example 23 (Drug Dosage) Suppose that a doctor prescribes a drug for a patient, telling her to take one pill containing 100 mg of a certain drug every four hours Assume that the drug is immediately absorbed into the bloodstream once taken and that every four hours the patient s kidneys eliminate 25% of the drug that is in her bloodstream If the patient initially had 0 mg of the drug in her bloodstream prior to taking the first pill, how much of the drug will be in the bloodstream after 72 hours? Use the five-step modeling process Solution: Step 1: Identify the Problem Determine the relationship between the amount of drug in the bloodstream and time Step 2: Identify Relevant Facts and Make Simplifying Assumptions Variables y n - the amount of drug in the bloodstream after n time periods n - the number of 4-hour time periods Assumptions The patient is of normal size and health There are no other drugs being taken that will affect the prescribed drug The drug is completely absorbed into the bloodstream immediately after being ingested There are no internal or external factors that will affect the drug absorption rate The kidneys eliminate 25% of the drug in the bloodstream after four hours The patient always takes the prescribed dosage at the correct time 8

Step 3: Construct the Model The change in the amount of drug in the bloodstream over the previous time period, given by y n y n 1 is equal to the dose minus the loss from the system, or 100 025y n 1 (since 100 mg is taken and 25% of what was previously in the bloodstream has been eliminated) This gives the model y n y n 1 = 025y n 1 + 100, or y n = 075y n 1 + 100 Step 4: Solve and Interpret the Model The general solution of this is ( ) 1 075 y n = (075) n n y 0 + 100, 1 075 or Therefore, after 72 hours, n = 72 4 y n = 400(1 075 n ) = 18, so the patient has y 18 = 400(1 075 18 ) = 397745 mg in her bloodstream Interpretation: Note that the equilibrium solution for this equation is y = 400 and we can easily see that y n 400 as n, so y = 400 is a stable equilibrium Provided that 400 mg is a safe and effective dosage level of this drug, then the given dosage schedule of 100 mg per hour is acceptable Note: We can also solve the difference equation directly using Maple (see the worksheet deterministic changemw) 3 Linear Changes with Delays Section 53 of Heinz The second type of difference equation considered in our textbook is the second-order linear difference equation In this case, we assume that initial values y 0 and y 1 are given Then, for n = 2, 3,, y n are determined by y n = Ay n 1 + By n 2 + C, where A, B, C are model parameters Note that we may also write this equation in terms of the differences y n y n 1 : y n y n 1 = (A 1)y n 1 + By n 2 + C 9

31 Solution of Linear Second-Order Difference Equations Linear Homogeneous Second-Order Difference Equations Consider the difference equation given by y n = Ay n 1 + By n 2 This is a homogeneous difference equation, because it can be written as y n Ay n 1 By n 2 = 0 Theorem 31 If x n and y n are two solutions of the homogeneous linear difference equation y n = Ay n 1 + By n 2, then so is any linear combination of x n and y n To find the general solution, try a solution inspired by the solution to a homogeneous linear first-order difference equation, y n = r n, where r is a constant to be determined Then y n 1 = r n 1 and y n 2 = r n 2, so we obtain r n Ar n 1 Br n 2 = 0 Multiplying both sides by r 2 n gives the quadratic equation, which we may call the characteristic equation, r 2 Ar B = 0 Then r = A ± A 2 + 4B 2 There are three possibilities for the solutions Case 1: A 2 + 4B > 0 In this case, we obtain two distinct real roots, r 1 and r 2, and the general solution is given by y n = c 1 r n 1 + c 2 r n 2, where c 1 and c 2 are determined from the initial values y 0 and y 1 Case 2: A 2 + 4B = 0 In this case, we obtain one distinct real root, r = A, and every 2 solution has the form y n = c 1 r n + c 2 nr n Case 3: A 2 + 4B < 0 In this case, we obtain complex conjugate roots, r 1,2 = A 2 ± i (A2 + 4B) 2 = α ± iβ 10

The general form of the solution is y n = c 1 r n 1 + c 2 r n 2, but where r n 1 = (α + iβ) n = (Re iθ ) n = R n e inθ, Similarly, Therefore, the solution may be written as or R = α 2 + β 2 ( ) β θ = arctan α r n 2 = R n e inθ y n = c 1 R n e inθ + c 2 R n e inθ, y n = c 1 R n (cos(nθ) + i sin(nθ)) + c 2 R n (cos(nθ) i sin(nθ)) = R n ((c 1 + c 2 ) cos(nθ) + i(c 1 c 2 ) sin(nθ)) = R n (d 1 cos(nθ) + d 2 sin(nθ)) So, if A 2 + 4B < 0, the solution takes the form where y n = R n (c 1 cos(nθ) + c 2 sin(nθ)), R = α 2 + β 2 = 1 2 A2 (A 2 + 4B) = 1 2 4B = B, tan θ = β α = (A2 + 4B) A Note: In the third case, the solutions oscillate, which may be more easily seen by writing the solution in the form y n = CR n cos(nθ + ω), where C = c 2 1 + c 2 2 and tan ω = c 1 /c 1 The amplitude of the oscillations is CR n, so if R < 1 the oscillations are damped and if R > 1, the oscillations increase in amplitude to infinity 11

Linear Nonhomogeneous Second-Order Difference Equations To find a general solution of the nonhomogeneous equation, we apply the following theorem Theorem 32 The general solution of a linear nonhomogeneous second-order difference equation y n + ay n 1 + by n 2 = c n, where a and b are constants, is given by y n = s n + z n, where s n is a general solution of the corresponding homogeneous equation and z n is a solution of the nonhomogeneous equation Linear nonhomogeneous second-order difference equations are solved similarly to differential equations in the case where the inhomogeneity is simple We wish to solve equations of the form y n = Ay n 1 + By n 2 + C, so the inhomogeneity is C, a constant One solution to this equation is simply z n = C, provided 1 A B 0 1 A B If 1 A B = 0, then we try a solution of the form z n = an, obtaining so or Since 1 A B = 0, we obtain an = Aa(n 1) + Ba(n 2) + C, an(1 A B) + a(a + 2B) = C, a(n(1 A B) + (A + 2B)) = C giving z n = a = C A + 2B = C A + 2, Cn, provided A 2 A + 2 If 1 A B = 0 and A = 2, then the solution has the form z n = an 2 Substituting this into the difference equation gives z n = Cn2 2 12

Examples Find a solution for the following second-order difference equations 1 y n = 2y n 1 + 3y n 2, y 0 = 1, y 1 = 2 Solution: The characteristic equation is r 2 + 2r 3 = 0, yielding r = 1 and r = 3 Therefore, the general solution is y n = c 1 1 n + c 2 ( 3) n = c 1 + c 2 ( 3) n Next, we find c 1 and c 2 using the initial values for y n 1 = y 0 = c 1 + c 2 2 = y 1 = c 1 3c 2 Solving gives c 2 = 1 4 and c 1 = 5 Therefore, the solution is 4 2 y n = 4y n 1 4y n 2 + 1, y 0 = 1, y 1 = 0 Solution: The characteristic equation is y n = 5 4 1 4 ( 3)n r 2 4r + 4 = 0, giving one root, r = 2 The homogeneous solution is then The particular solution, z n is given by s n = c 1 2 n + c 2 n2 n z n = 1, since 1 A B = 1 4 ( 4) = 1 0 Therefore, the general solution of the nonhomogeneous equation is given by y n = s n + z n, or y n = c 1 2 n + c 2 n2 n + 1 Find c 1 and c 2 using the initial values for y n 1 = c 1 + 1 0 = 2c 1 + 2c 2 + 1 Solving gives c 1 = 2 and c 2 = 3 Therefore, the solution is 2 y n = 2(2 n ) + 3 2 n(2n ) + 1 13

32 Example: Two Competitive Species The simplest model for two species competing for the same resources assumes: (i) a constant growth rate for each population in the absence of the other species; and (ii) interactions between the two species are not significant Therefore, letting x n represent the population of the first species in year n and y n the population of the second species in year n, the model for this situation has the form x n = ax n 1 + by n 1 (31) y n = cx n 1 + dy n 1, (32) where a, b, c, d are all constants Assuming that ad bc 0, we can re-write this system as a second-order difference equation in terms of the first species, which we may then solve and use to determine the population of the second species We may solve (31) for y n 1 : y n 1 = 1 b (x n ax n 1 ) This implies that y n = 1 b (x n+1 ax n ), and so substitution into (32) gives or which we may re-write as 1 b (x n+1 ax n ) = cx n 1 + dy n 1 = cx n 1 + d b (x n ax n 1 ), x n+1 = (a + d)x n (ad bc)x n 1, x n = (a + d)x n 1 (ad bc)x n 2, a second-order difference equation, which we may solve using Maple The results are very unpleasant Let s consider a specific example, where the constants and initial populations of each species are known So, assume a = d = 1; 14

b = 01 and c = 02; and x 0 = 100 and y 0 = 40 Since y 0 = 20, we have that x 1 = by 0 + ax 0 = 01(40) + 1(100) = 96 Then our second order equation, along with its starting values, is Solving gives x n = x n = 2x n 1 + 102x n 2, x 0 = 100, x 1 = 96 ( 10 ) ( 2 + 50 1 + 1 ) n ( 2 + 10 ) ( 2 + 50 1 1 ) n 2 10 10 Similarly, we may find a linear second-order equation for y n using (31) and (32): y n = (a + d)y n 1 (ad bc)y n 2 Solving this in a similar way, using the initial conditions y 0 = 40 and y 1 = cx 0 + dy 0 = 01(100) + 40 = 20, gives us the population of the second species, Since y n = ( 25 ) ( 2 + 20 1 + 1 ) n ( 2 + 25 ) ( 2 + 20 1 1 ) n 2 10 10 lim x n =, lim y n =, n n this model predicts that the second species will become extinct Note: If a = 1, b = 02, c = 01 and d = 117, then ( ) n ( ) n 23 23 x n = 100, y = 40, 25 25 and and both species become extinct lim x n = lim y n = 0, n n 15

4 Nonlinear Changes Section 54 of Heinz 41 Analyzing Nonlinear First-Order Difference Equations In this section, we will discuss nonlinear first-order difference equations, ie, equations of the form y n = f(y n 1 ), where f is any function For a nonlinear equation, we may be relegated to using qualitative or numerical solutions Equilibrium solutions y are determined by solving y = f(y) Stability of Equilibrium Solutions To determine the stability of the equilibrium solution, we will perturb the solution by an amount u n : y n = y + u n Substituting this into the difference equation gives y + u n = f(y + u n 1 ) To analyze this, we form the Taylor series of the function about y of the right-hand side: Thus, we obtain or, since y = f(y), we have f(y + u n 1 ) == f(y) + u n 1 f (y) + y + u n = f(y) + u n 1 f (y) +, u n = u n 1 f (y) + Assuming that the function f is sufficiently well-behaved, we can neglect the higher order terms in the Taylor series, giving us a linear first-order difference equation of the form u n = f (y)u n 1 As we have seen before, this equation will have a stable equilibrium, u = 0, provided f (y) < 1 Therefore, for sufficiently well-behaved functions f, the equilibrium solutions for will be stable if f (y) < 1 y n = f(y n 1 ) 16

42 Example: Density-Dependent Population Models The constant growth-rate population model discussed in Section 23 predicts that the population will grow exponentially without limits if R > 0 Although this may be accurate for populations in the early stages of their growth, no population can grow without bound indefinitely Some examples of limiting factors are density-dependent factors including: predation: the density of predators should increase, all other factors being equal, as the density of the prey population increases; parasitism: one species benefits while the other is harmed, but not typically killed, so the population density of the parasite cannot get too large; disease: one factor in the spread of the disease is the number of effective contacts among individuals in the population, another is the accumulation of waste, both of which increase with increasing population; intraspecific competition: competition for resources among members of the same species; and interspecific competition: competition for resources with member of other species Clearly, the growth rate of a population cannot remain constant In general, then, we expect the growth rate to depend on the population density, so P n P n 1 = r(p n 1 )P n 1, where r(p n 1 ) is the growth rate depending on the population at time step n 1 What are the properties we expect r(p n 1 ) to have? For moderate-sized populations, growth occurs with only slight limitations from the natural environment As the population size decreases, r(p n 1 ) should approach the growth rate in the absence of environmental limitations (ie, r(p n 1 ) R) As the population size increases, we expect the population to grow at a smaller rate due to the density-dependent limiting environmental factors, so r(p n 1 ) decreases as P n 1 increases For a population whose size is at the carrying capacity (ie, largest supported population) of the environment, K, we expect the growth rate to be 0 17

For a population size above this carrying capacity, we expect the growth rate to become negative, since the environment cannot support that number of individuals The simplest function which has the above properties is the straight line, ( r(p n 1 ) = R 1 P ) n 1 K This gives the nonlinear first-order difference equation or P n P n 1 = RP n 1 (1 1 K P n 1 P n = (1 + R)P n 1 ( 1 R 1 + R Equation (41) is the discrete logistic equation ), ) P n 1 (41) K If we wish to ensure that the model only permits population values that are nonnegative, then it must be true that (1 + R)K P n 1 for all n, R R assuming that > 0 Since K > 0, this means that we need (1 + R)K or either R < 1 or 0 < R If, however, R 1 + R > 0, R (1 + R)K < 0, then P n is always positive as long as 1 + R > 0 (so 1 < R < 0) But in this case, P n as n, because P n > P n 1 for all n Therefore, we assume that R (1 + R)K > 0 We wish to find the maximum population size, consider P n = f(p n 1 ), where f(p n 1 ) is the right-hand side of (41), assuming R > 0 Writing f as a continuous function of P, we can find the value of P for which f(p ) is maximized by solving f (P ) = 0, giving P = 1 2 (R + 1)K R 18

Since f (P ) = 2R K, and R > 0, then f(p ) is maximum at this value, or f(p n 1 ) has a maximum value at giving a maximum value of P n of Therefore, P n 0 if P n 1 = 1 2 P n = 1 4 (R + 1)K, R (R + 1) 2 K R R < 1 or 0 < R < 3 We cannot solve the discrete logistic equation analytically However, we can analytically determine the equilibrium solution(s) and analyze their stability The equilibrium solutions are obtained by letting P n = P n 1 = P and plugging into (41), giving Solving gives P = (1 + R)P ( 1 P R (1 + R)K P = 0 and P = K To determine the stability of these equilibrium solutions, we may use the technique described in Section 41 We have that ( ) P R f(p ) = (1 + R) 1 (1 + R)K Then Since ( ) f P R (P ) = (1 + R) 1 P R (1 + R)K K f (0) = 1 + R, ) = 1 + R 2P R K the equilibrium solution P = 0 is stable only if 1 + R < 1, or 2 < R < 0 Since f (K) = 1 R, the equilibrium solution P = K is stable only if 1 R < 1, or 0 < R < 2 Notes: Depending on the values of R, we can also obtain oscillation between four different values and something known as chaos in which no prediction of the long-term behavior is possible As we have seen, chaos can only happen with nonlinear difference equations 19

5 Difference and Differential Equations Section 55 of Heinz 51 When to Model with Difference Equations and When to Model with Differential Equations Some real-world situations lend themselves to modeling directly with difference equations Examples include: Models related to economics, eg, models involving compound interest, loan repayments, annuities; commodity pricing, Population theory Useful in modeling animals that breed only during a short, well-defined breeding season, in which the population would be measured in terms of the number of breeding seasons Also useful for smaller populations, in which a change in population size of a single individual makes a significant change in the population Modeling in epidemiology (again, when the population size is sufficiently small) Models involving probability theory, such as models using Markov chains Models involving networks A drawback of difference equation models is that they cannot be used to model phenomena in which the system changes between time steps, where time steps can vary from fractions of a second to millions of years There are, however, situations where changes can occur instantaneously (or at least can be modeled as if they do so) These include: radiocarbon dating; population growth for populations where breeding is not restricted to certain seasons; or for populations where the population size is sufficiently large that continuous modeling approximates reality well; 20

epidemiology; physics, eg, modeling a pendulum; chemistry, eg, growth of a crystal; and many, many more 52 Differential Equations as Difference Equations Differential equations arising from mathematical models are not usually solvable analytically Instead, we may analyze them qualitatively (as we did for difference equations) or numerically When we approximate the solution of a differential equation numerically, we obtain a difference equation Typically, such difference equations are solved using matrices, as opposed to using recursive solutions as we have done in this chapter References [1] William P Fox, Mathematical Modeling with Maple, Brooks/Cole, 2012 [2] Frank Giordano, et al, Mathematical Modeling, Fourth Edition, Brooks/Cole, 2009 [3] Richard Haberman, Mathematical Models: Mechanical Vibrations, Population Dynamics, and Traffic Flow, SIAM, 1998 [4] Edward K Yeargers, Ronald W Shonkwiler, and James V Herod, An Introduction to the Mathematics of Biology With Computer Algebra Models, Birkhäuser, 1996 21