0% found this document useful (0 votes)
15 views

Chapter 1

MATH3290

Uploaded by

yeenok poon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Chapter 1

MATH3290

Uploaded by

yeenok poon
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

MATH 3290 Mathematical Modeling

Chapter 1: Modeling Change

Kuang HUANG
January 16, 2024
Department of Mathematics
The Chinese University of Hong Kong
Course webpage

https://www.math.cuhk.edu.hk/course/2324/math3290

Kuang HUANG MATH3290-2023/24 2


Modeling change

A powerful paradigm for modeling change is:

future_value = present_value + change.

To predict the future_value, one needs to know the


present_value and the change.
Note, change is something that we need to determine.
Thus, we need to develop mathematical models that give predictions
to change.

Kuang HUANG MATH3290-2023/24 3


Modeling change

We need a mathematical model for change. Note that

change = future_value − present_value.

• If the behavior is taking place over discrete time periods, we will


use a model based on difference equation, which will be studied
in this chapter.
• If the behavior is taking place continuously with respect to time,
we will use a model based on differential equation, which will
be studied later in this course.

Kuang HUANG MATH3290-2023/24 4


Modeling with difference equations

Some notations:
Let a0 , a1 , a2 , . . . be a sequence. They represent the values of certain
variable at discrete times 0, 1, 2, . . .
The changes are defined by

∆a0 = a1 − a0 ,
∆a1 = a2 − a1 ,
..
.

In general, the change at time n is ∆an = an+1 − an .

Kuang HUANG MATH3290-2023/24 5


Example: a saving account

Consider a saving account with an initial deposit of $1000. Assume


that the interest rate is 1% per month.
Let n be the number of months and an be the amount at the end of
the n-th month.
The change at the n-th month is

∆an = 0.01an .

Thus, we obtain the following difference equation:

an+1 − an = 0.01an

or
an+1 = 1.01an .

Kuang HUANG MATH3290-2023/24 6


Since the initial deposit is $1000, we set a0 = 1000.
We obtain the following discrete dynamical system model

an+1 = 1.01an n = 0, 1, 2, . . . ,
a0 = 1000.

Remarks:

• In this example, the change ∆an is a function of an . In general,


the change ∆an can be a function of more terms in the
sequence, that is, ∆an = f (an , an−1 , . . . ).
• The change ∆an can also be a function of some other external
quantities.

Kuang HUANG MATH3290-2023/24 7


Example: home mortgage

Consider a home loan of $80,000. The monthly interest rate is 1%


and the monthly payment is $880.87.
You want to know how much you owe at the end of 72 months.
We construct a model for this problem. Let bn be the amount owe at
the end of the n-th month. Note

change_in_amount_owe =interest_incurred
− monthly_payment.

So,
∆bn = 0.01bn − 880.87.
That is
bn+1 − bn = 0.01bn − 880.87.

Kuang HUANG MATH3290-2023/24 8


Thus we obtain the model

bn+1 = 1.01bn − 880.87 n = 0, 1, 2, . . . ,


b0 = 80,000.

One can find the numerical solution in the following way.

b1 = 1.01b0 − 880.87 = 1.01 ∗ 80,000 − 880.87 = 79,919.13,


b2 = 1.01b1 − 880.87 = 1.01 ∗ 79,919.13 − 880.87 = 79,837.45,
..
.

Continuing, we get b72 = 71532.11.

Kuang HUANG MATH3290-2023/24 9


The numerical solution of the model.

One can find the number of months needed to pay off the loan.

Kuang HUANG MATH3290-2023/24 10


Approximating change

In most cases, the change will not be as precise a procedure as in


the examples of saving account and home mortgage.
Typically, we need to obtain some data, plot the change and observe
a pattern. And then approximate the change in mathematical terms.
That is, we usually first do something like

Plot(a_certain_variable, change, . . . ).

Mathematically, a pattern can be represented by a function

change = Function(a_certain_variable).

Kuang HUANG MATH3290-2023/24 11


Example: growth of yeast

• Experiments contain measurements of


yeast biomass at different time points.
• Predict future biomass or explain the way
biomass changes.

To find a model, we look at the change.

Kuang HUANG MATH3290-2023/24 12


We plot the change against pn .

From the graph, it is reasonable to assume that the change ∆pn is


proportional to pn . That is

∆pn = k pn k > 0.

Kuang HUANG MATH3290-2023/24 13


We obtain the model for yeast biomass (or population).

pn+1 = (1 + k)pn

This model predicts that yeast population will increase forever.

It shows that the actual


population does not increase
forever. We need to refine our
model.

Remark
Model refinement is an important step.

Kuang HUANG MATH3290-2023/24 14


• The change increases with pn for small pn ;
• The change decreases with pn for large pn ;
• The yeast population approaches a limiting value, say 665.

Kuang HUANG MATH3290-2023/24 15


Therefore, it is reasonable to propose the model

∆pn = k (665 − pn )pn

That is, ∆pn is a linear function of (665 − pn )pn . Is it good?

They indeed have a linear relation (approximately).


Kuang HUANG MATH3290-2023/24 16
How to find k? (see Chap. 3)
Suppose that k = 0.00082. Then our model is

∆pn = 0.00082(665 − pn )pn

with p0 = 9.6.
This dynamical system is called nonlinear because the right-hand
side is a nonlinear function.
One can then use this model to predict the population.

p1 = p0 + 0.00082(665 − p0 )p0
= 9.6 + 0.00082(665 − 9.6)9.6
= 14.76.

Other pn can be found recursively.

Kuang HUANG MATH3290-2023/24 17


Below is a comparison of observations and predictions.

Hence, our model gives a satisfactory explanation of the yeast


population.

Kuang HUANG MATH3290-2023/24 18


Example: decay of drug

Suppose your body has an initial dosage of 0.5 mg. The following is
the amount of the drug measured at different time points.
an is the amount of drug at the end of n-th day.

To find a model, we first look at the plot of ∆an against an .

Kuang HUANG MATH3290-2023/24 19


• It is reasonable to say that
∆an = kan .
• We get k = −0.31 (see Chap.
3).

The model is

∆an = −0.31an or an+1 = 0.69an

with a0 = 0.5.
One can use the model to predict future drug amount.

Kuang HUANG MATH3290-2023/24 20


Linear dynamical systems

We study the following

an+1 = f (an ) = ran + b

A number a is called an equilibrium value (EV) of a dynamical system


if a0 = a, then an = a for all n > 1 (starts at a, solutions remain at a).
That is, an = a for all n, is a constant solution.
Consequently, an+1 = f (an ) implies that

a = f (a).

Thus, one can find a by solving the above equation.


We start with some examples.

Kuang HUANG MATH3290-2023/24 21


Example: drug prescription

Assume that the drug is required to remain at a certain level. So, you
need a certain daily dosage.
Assume that a daily dosage of 0.1 mg is used and it is known that
half of the drug remains at the end of each day.
We obtain the model

an+1 = 0.5an + 0.1.

We consider three starting values a0

A: a0 = 0.1,
B: a0 = 0.2,
C: a0 = 0.3.

Kuang HUANG MATH3290-2023/24 22


• 0.2 is an equilibrium value
(EV).
• If the initial dosage is above
or below 0.2, the drug level
will approach to 0.2.
• This is an evidence of stable
equilibrium values (EVs).

The fact that 0.2 is a stable equilibrium value (EV) implies that the
drug concentration will remain at 0.2 in the long run.

Kuang HUANG MATH3290-2023/24 23


Example: annuity

A fixed amount is deposited initially and you are allowed to withdraw


a fixed amount each month. An interesting issue is to determine how
much you should deposit.
Assume that the interest rate is 1% per month and the monthly
withdrawn is $1000.
We obtain the model

an+1 = 1.01an − 1000

We consider three initial deposits a0

A: a0 = 90,000,
B: a0 = 100,000,
C: a0 = 110,000.

Kuang HUANG MATH3290-2023/24 24


• The value 100,000 is an
equilibrium value (EV).
• If the initial deposit is above
or below $100,000, the
amount will be moving away
from 100,000.
• This is an evidence of
unstable equilibrium values
(EVs).
The fact that 100,000 is an unstable equilibrium value (EV) implies
that your account will not be depleted if your initial deposit is more
than $100,000.

Kuang HUANG MATH3290-2023/24 25


Classifying equilibrium values (EVs)

We have
an+1 = ran + b.
If a is an equilibrium value (EV), then an+1 = an = a. Then

a = ra + b.

Thus, if r 6= 1, then
b
a= .
1−r
Note:

• from the drug example, we have r = 0.5 and b = 0.1, then


a = 0.2;
• from the annuity example, we have r = 1.01 and b = −1000, then
a = 100,000.

Kuang HUANG MATH3290-2023/24 26


Moreover, from the previous two examples, we conjecture that

• if |r| < 1, then a is a stable equilibrium value (EV);


• if |r| > 1, then a is an unstable equilibrium value (EV).

To see this, we note that the solution an can be expressed as

b
an = r n c + ,
1−r
where c is determined by a0 .
b b
Hence, if |r| < 1, an → . If |r| > 1, an moves away from .
1−r 1−r

Kuang HUANG MATH3290-2023/24 27


To verify that
b
an = r n c +
1−r
is a solution, we first note that we should have
b
an+1 = r n+1 c + .
1−r

Then
b
 
n
ran + b = r r c + +b
1−r
br
= r n+1 c + +b
1−r
br b(1 − r)
= r n+1 c + +
1−r 1−r
n+1 b
=r c+ = an+1 .
1−r

This is mathematical induction.


Kuang HUANG MATH3290-2023/24 28
Nonlinear dynamical systems

We study the following

an+1 = f (an ), f is a nonlinear function.

A number a is called an equilibrium value (EV) of a dynamical system

a = f (a).

To discuss stability, we use the Taylor expansion

f (y) = f (a) + (y − a)f 0 (a) + O((y − a)2 ).

Let y = an . We obtain

an+1 − a = (an − a)f 0 (a) + O((an − a)2 ).

Kuang HUANG MATH3290-2023/24 29


Erratum

Recall
an+1 − a = (an − a)f 0 (a) + O((an − a)2 )
Assume that an is close to a.

an+1 − a = (an − a)(f 0 (a) + R),

where R is a small variable with R = O(|an − a|). Via the triangle


inequality, we will have

|an − a|(|f 0 (a)| − |R|) ≤ |an+1 − a| ≤ |an − a|(|f 0 (a)| + |R|).

Two cases:

• If |f 0 (a)| < 1, then |f 0 (a)| + |R| < 1. We have an → a, it is a stable


equilibrium value (EV).
• If |f 0 (a)| > 1, then |f 0 (a)| − |R| > 1. The sequence {an } diverges, it
is an unstable equilibrium value (EV).
Kuang HUANG MATH3290-2023/24 30
System of difference equations

We consider modeling by a system of difference equations.


We are interested in the long-term behavior of the solutions.
If we start close to an equilibrium value, we want to know whether
the solution will

• remain close,
• approach to the equilibrium value (EV),
• or not remain close.

Moreover, we want to know whether this long-term behavior is


sensitive to initial conditions.

Kuang HUANG MATH3290-2023/24 31


Example: a rental car company

The company has two offices, Orlando and Tampa.


The rental cars can be returned in either city.
You want to know if there are sufficient cars in each city to meet the
demand. If not, how many cars must be transferred from one city to
another.

Kuang HUANG MATH3290-2023/24 32


We will construct a model for this problem.

• On is the number of cars in Orlando at the end of day n,


• Tn is the number of cars in Tampa at the end of day n.

Then the historical record suggests the model

On+1 = 0.6 On + 0.3 Tn ;


Tn+1 = 0.4 On + 0.7 Tn .

Kuang HUANG MATH3290-2023/24 33


We will find the equilibrium values (EVs) of

On+1 = 0.6 On + 0.3 Tn ,


Tn+1 = 0.4 On + 0.7 Tn .

Let (O, T) be an equilibrium value (EV). Then

O = On = On+1 , T = Tn = Tn+1 .

Hence, (O, T) satisfies

O = 0.6 O + 0.3 T,
T = 0.4 O + 0.7 T.

The system has infinitely many solutions, namely, any (O, T) with
4O = 3T is a solution.

Kuang HUANG MATH3290-2023/24 34


Now, assume that the company has 7000 cars. So, O + T = 7000.
Together with 4O = 3T, we get

O = 3000, T = 4000,

which is the equilibrium value.


Now, we try to see what happen for various initial conditions.

Kuang HUANG MATH3290-2023/24 35


O0 = 7000, T0 = 0.

Kuang HUANG MATH3290-2023/24 36


O0 = 5000, T0 = 2000.

Kuang HUANG MATH3290-2023/24 37


O0 = 2000, T0 = 5000.

Kuang HUANG MATH3290-2023/24 38


O0 = 0, T0 = 7000.

Kuang HUANG MATH3290-2023/24 39


From the above calculations, we see that

• the number of cars approach to the equilibrium value (EV) (this


is the long-term behavior);
• the equilibrium value (EV) is stable;
• the long-term behavior is insensitive to the starting values.

Knowing that 3000 cars will end up in Orlando and 4000 cars will end
up in Tampa, the company can then decide its strategy.

Kuang HUANG MATH3290-2023/24 40


Example: battle of Trafalgar

In 1805, French-Spanish naval force fought British naval force.


The French-Spanish had 33 ships and the British had 27 ships.
At each encounter, each side suffers from a loss equal to 10% of the
number of ships of the opposing force.

• Bn is the number of British ships at stage n,


• Fn is the number of French-Spanish ships at stage n.

Then we have the model

Bn+1 = Bn − 0.1 Fn ,
Fn+1 = Fn − 0.1 Bn .

Kuang HUANG MATH3290-2023/24 41


Clearly, British force will lose.

Kuang HUANG MATH3290-2023/24 42


Nelson’s (British) Divide-and-Conquer strategy:

Divide British ships in 2


groups, and break the
French-Spanish ships in 3
groups.
Then conquer one by one.

Kuang HUANG MATH3290-2023/24 43


More precisely, French-Spanish ships are divided as follows.

• 13 ships from British force are engaged in Battle A;


• remaining ships (from Battle A) + 14 ships (14 = 27 − 13) are
engaged in Battle B;
• all remaining ships are engaged in Battle C.

For display purpose, we assume each side loses 5% of the number of


ships of the opposing force.
(Bn+1 = Bn − 0.05Fn , Fn+1 = Fn − 0.05Bn )

Kuang HUANG MATH3290-2023/24 44


British has 13 ships, French-Spanish has 3 ships.

Kuang HUANG MATH3290-2023/24 45


British has 12.6471 + 14 ships, French-Spanish has 1.07088 + 17 ships.

Kuang HUANG MATH3290-2023/24 46


British has 19.2734 ships, French-Spanish has 1.4441 + 13 ships.

British force won the battle (smartly divide your objective).

Kuang HUANG MATH3290-2023/24 47


Example: competitive hunter model

Spotted owls and hawks compete for survival in a habitat.

Spotted owls Hawks

Kuang HUANG MATH3290-2023/24 48


Example: competitive hunter model

Spotted owls and hawks compete for survival in a habitat.


Assume that, in the absence of the other species, each individual
species exhibits unconstrained growth in which the change is
proportional to the population.

• On is the number of spotted owls at the end of day n,


• Hn is the number of hawks at the end of day n.

Then we have the model

∆On = k1 On , ∆Hn = k2 Hn ,

where k1 and k2 are positive constants.

Kuang HUANG MATH3290-2023/24 48


The effect of the other species is to diminish the growth rate.
Note that there are many ways to model the mutual interaction of
the two species. We assume that the decrease in the population is
proportional to the product of the number of the two species.
Thus, we have the model

∆On = k1 On − k3 On Hn ,
∆Hn = k2 Hn − k4 On Hn .

That is

On+1 = (1 + k1 )On − k3 On Hn ,
Hn+1 = (1 + k2 )Hn − k4 On Hn ,

where k1 , . . . , k4 are positive.

Kuang HUANG MATH3290-2023/24 49


Now, we consider specific values of k1 , . . . , k4 . We have

On+1 = 1.2On − 0.001On Hn ,


Hn+1 = 1.3Hn − 0.002On Hn .

To find the equilibrium values (EVs) (O, H), we set O = On = On+1 and
H = Hn = Hn+1 ,

O = 1.2O − 0.001OH,
H = 1.3H − 0.002OH.

Then

0 = 0.2O − 0.001OH = O(0.2 − 0.001H),


0 = 0.3H − 0.002OH = H(0.3 − 0.002O).

Kuang HUANG MATH3290-2023/24 50


0 = 0.2O − 0.001OH = O(0.2 − 0.001H).
0 = 0.3H − 0.002OH = H(0.3 − 0.002O).

From the first equation, we have

O=0 or H = 200.

If O = 0, using the second equation, we have H = 0.


If H = 200, using the second equation, we have O = 150.
Hence, the two equilibrium values (EVs) are (O, H) = (0, 0) and
(O, H) = (150, 200).

Kuang HUANG MATH3290-2023/24 51


Now we consider the long-term behavior, consider the 3 cases.

For Case 1 and Case 2, the initial values are close to the equilibrium
value (EV) (150, 200).
For Case 3, the initial value is close to the equilibrium value (EV)
(0, 0).

Kuang HUANG MATH3290-2023/24 52


Moving away from equilibrium value, hawks will die out.

Kuang HUANG MATH3290-2023/24 53


Moving away from equilibrium value, owls will die out.

Kuang HUANG MATH3290-2023/24 54


Moving away from equilibrium value, owls will die out.

Kuang HUANG MATH3290-2023/24 55


Conclusions

• If, initially, there are 151 owls and 199 hawks, then the hawks will
die out.
• If, initially, there are 149 owls and 201 hawks, then the owls will
die out.
• If, initially, there are 10 owls and 10 hawks, then the owls will die
out.
• The equilibrium values (EVs) are unstable. If the starting values
are close to an equilibrium value (EV), then the solutions will
move away from the equilibrium value (EV).
• Long-term behavior is sensitive to initial conditions.
• This model predicts that coexistence is impossible.

Kuang HUANG MATH3290-2023/24 56


Disclaimer

All figures, tables, and data appearing in the slides are only used for
teaching under guidelines of Fair Use.

Kuang HUANG MATH3290-2023/24 57

You might also like