You are on page 1of 43

MATH 3800

MATHEMATICAL MODELS AND NUMERICAL METHODS

INTRODUCTION TO MODELING

© 2020 Gary Bazdell (excluding images)


WHAT IS A MATHEMATICAL MODEL?
1. Models are abstractions of reality!
2. Models are a representation of a particular thing, idea, or condition.
3. Mathematical Models are simplified representations of some real-world
entity
o Can be in equations or computer code
o Are intended to mimic essential features while leaving out
inessentials.
4. Mathematical Models are characterized by assumptions about:
o Variables (the things which change)
o Parameters (the things which do not change)
o Functional forms (the relationship between the two)

Introduction to Modeling - Introduction 2


MODELING PROCESS
Simplifications

Real World Data Model

Verification – how good? Crunch numbers Solve equations

Predictions / Explanations Mathematical Conclusions

Interpretation
Reasonable?
yes – continue
no – go back to model
Introduction to Modeling - Introduction 3
MODELING CHANGE
Recall that the change can be modeled using the formula

change = future value − present value.

Change can take place over discrete or continuous time.

1. If the change occurs over discrete time periods (we know exactly what
comes next), then we get difference equations and we will actually be
observing the change.
2. If the change occurs continuously, then typically we will be observing the
rate of change and we will get a differential equation.
Introduction to Modeling - Modeling Change 4
FIRST DIFFERENCE EQUATIONS
DEFINITION
For a sequence of numbers 𝐴 = 𝑎0 , 𝑎1 , 𝑎2 , … the first differences are

∆𝑎0 = 𝑎1 − 𝑎0
∆𝑎1 = 𝑎2 − 𝑎1

∆𝑎𝑛 = 𝑎𝑛+1 − 𝑎𝑛

Note: the first difference represents the rise or fall between


consecutive values of the sequence.
Introduction to Modeling - Modeling Change 5
EXERCISE 1 – DIFFERENCE EQUATIONS
Write a difference equation to represent the change during the 𝑛th
interval as a function of the previous term in the following sequences:

1. 1, 3, 7, 15, 31, …
2. 1, 2, 5, 11, 23, …

Introduction to Modeling - Modeling Change 6


DYNAMICAL SYSTEMS
Every difference equation

∆𝑎𝑛 = 𝑎𝑛+1 − 𝑎𝑛

determines a dynamical systems (relationship between terms of a sequence)


by solving for 𝑎𝑛+1 for a given initial value 𝑎0 :

𝑎𝑛+1 = 𝑎𝑛 + ∆𝑎𝑛

A numerical solution is a table of values, 𝑎𝑗 for all 𝑗, satisfying the dynamical


system.
Introduction to Modeling - Modeling Change 7
EXERCISE 2 – SIMPLE MODEL
Formulate a dynamical system that
models the following situation:

You owe $1000 on a credit card after


buying Christmas gifts for your family
that charges 1.5% interest each
month. You pay $50 each month and
you make no new charges.

Introduction to Modeling - Modeling Change 8


SIMPLIFICATION OF OUR MODEL
One very powerful simplifying relationship is proportionality.

DEFINITION
Two variables 𝑦 and 𝑥 are proportional (to each other) if one is always
a constant multiple of the other. That is, if

𝑦 = 𝑘𝑥

for some nonzero constant 𝑘. We write 𝑦 ∝ 𝑥.

Introduction to Modeling - Approximation of Change 9


EXERCISE 3 – POPULATION GROWTH
The following data was collected Time in hours 𝒏 Observed yeast biomass 𝒑𝒏

from an experiment measuring 0 9.6


the growth of a yeast culture. 1 18.3
2 29.0
3 47.2
Formulate a dynamical system
4 71.1
that models the growth of the 5 119.1
yeast culture. 6 174.6
7 257.3
To simplify the model, we assume that the change in the population grows
proportionally with respect to the current size of the population.
∆𝑝𝑛 = 𝑘𝑝𝑛 for some growth constant 𝑘
Introduction to Modeling - Approximation of Change 10
SUMMARY CHART
Comparison Chart - Original data vs Projected Data
300

250

200
Biomass

150

100

50

0
0 1 2 3 4 5 6 7 8
Time in hours

Original Data Projected Data

We see that our model is not a great fit for the data. This may be due to the
limited amount of original data
Introduction to Modeling - Approximation of Change 11
ISSUES WITH CONSTANT GROWTH RATE
If we assume the change grows proportionally with the current
population size,
∆𝑎𝑛 = 𝑘𝑎𝑛
then 𝑎𝑛+1 would grow without bound.

This may, or may not, be a good simplification. To relax this


simplification, we could assume the population has a limiting value, say
𝑀. Then we could define the growth rate 𝑘 by a limiting factor.

𝑘 = 𝑟 𝑀 − 𝑎𝑛 → ∆𝑎𝑛 = 𝑟 𝑀 − 𝑎𝑛 𝑎𝑛
Introduction to Modeling - Approximation of Change 12
EXERCISE 4 – CARRYING CAPACITY
The following data was Time in Observed yeast Time in Observed yeast
collected from an hours 𝒏 biomass 𝒑𝒏 hours 𝒏 biomass 𝒑𝒏
experiment measuring the
0 9.6 10 513.3
growth of a yeast culture.
1 18.3 11 559.7
2 29.0 12 594.8

Formulate a dynamical 3 47.2 13 629.4


4 71.1 14 640.8
system that models the
5 119.1 15 651.1
growth of the yeast culture.
6 174.6 16 655.9
The population appears to 7 257.3 17 659.6
be approaching a limiting 8 350.7 18 661.8

value, or carrying capacity 9 441.0


Introduction to Modeling - Approximation of Change 13
SUMMARY CHART
Comparison Chart - Original data vs Projected Data
700

600

500
Biomass

400

300

200

100

0
0 2 4 6 8 10 12 14 16 18 20
Time in hours

Original data Projected Data

With the addition of the limiting value, we see that our model is a better fit to
the original data Introduction to Modeling - Approximation of Change 14
SOLUTIONS TO DYNAMICAL SYSTEMS
When we develop a mathematical model, we would like to be able to
find the solution; we would like an easy way to express

𝑎𝑛+1 .

An obvious method for finding the solution of a simple model is to


hypothesize the form of a solution and then test if it is correct. This
method is known as the Method of Conjecture.

Introduction to Modeling - Analytical Solutions 15


THE METHOD OF CONJECTURE
The following summarize the procedure for applying this method.

1. Observe a pattern.
2. Conjecture a form of the solution to the dynamical system.
3. Test the conjecture by substitution.
4. Accept or reject the conjecture depending on whether it does or
does not satisfy the system after the substitution and algebraic
manipulation.

Introduction to Modeling - Analytical Solutions 16


LINEAR DYNAMICAL SYSTEMS
What if ∆𝑎𝑛 = 𝑐𝑎𝑛 , where 𝑐 is some nonzero constant?

THEOREM
The solution of the linear dynamical system 𝑎𝑛+1 = 𝑟𝑎𝑛 for 𝑟 any
nonzero constant is

𝑎𝑘 = 𝑟 𝑘 𝑎0

where 𝑎0 is a given initial value.

Introduction to Modeling - Analytical Solutions 17


EXERCISE 5 – SOLUTIONS
Find the solution to the difference equations in the following problems:

1. 𝑎𝑛+1 = 5𝑎𝑛 , 𝑎0 = 10
3𝑎𝑛
2. 𝑎𝑛+1 = , 𝑎0 = 64
4

Introduction to Modeling - Analytical Solutions 18


EQUILIBRIUM VALUE
DEFINITION
A number 𝑎 is called an equilibrium value or fixed point of a dynamical
system

𝑎𝑛+1 = 𝑓 𝑎𝑛

if 𝑓(𝑎𝑛 ) = 𝑎 for all 𝑛 ≥ 𝑁.

If 𝑓 𝑎𝑛 = 𝑎 for all 𝑛 ≥ 0, 𝑎 is a constant solution to the dynamical


system.

Introduction to Modeling - Analytical Solutions 19


LONG-TERM BEHAVIOR
Let’s consider some significant values of 𝑟.

𝑟=0 Constant solution and equilibrium value at 0


𝑟=1 All initial values are constant solutions and equilibrium
values.
𝑟<0 Oscillation
𝑟 <1 Decay to limiting value of 0
𝑟 >1 Growth without bound

Introduction to Modeling - Analytical Solutions 20


LINEAR DYNAMICAL SYSTEMS
What if ∆𝑎𝑛 = 𝑐𝑎𝑛 + 𝑏, where 𝑐 is some nonzero constant?

THEOREM
The equilibrium value for the dynamical system
𝑎𝑛+1 = 𝑟𝑎𝑛 + 𝑏, 𝑟≠1
is
𝑏
𝑎=
1−𝑟
If 𝑟 = 1 and 𝑏 = 0, every number is an equilibrium value. If 𝑟 = 1 and
𝑏 ≠ 0, no equilibrium value exists.

Introduction to Modeling - Analytical Solutions 21


TYPES OF EQUILIBRIUMS
There are two kinds of equilibrium, called stable and unstable.

1. If the equilibrium is stable, then 𝑎𝑛 → 𝑎 as 𝑛 → ∞ regardless of 𝑎0 .


2. If the equilibrium is unstable, then the equilibrium is achieved only
if 𝑎0 = 𝑎.

For the dynamical system 𝑎𝑛+1 = 𝑟𝑎𝑛 + 𝑏,


1. If 𝑟 < 1, the equilibrium is stable.
2. If 𝑟 > 1, the equilibrium is unstable.
Introduction to Modeling - Analytical Solutions 22
EXERCISE 6 - EQUILIBRIUMS
Suppose we give a patient a daily dosage of 0.2mg of a drug at the end
of the day. 40% of the drug remains in the patient’s system.

1. How much drug is in the patient’s system at time 𝑛 + 1?


2. What is the equilibrium value?
3. Examine what happens for 𝑎0 = 0.25, 𝑎0 = 0.30, and 𝑎0 = 0.35.

Introduction to Modeling - Analytical Solutions 23


LINEAR DYNAMICAL SYSTEMS
THEOREM
The solution of the dynamical system

𝑎𝑛+1 = 𝑟𝑎𝑛 + 𝑏, 𝑟≠1


is
𝑏 𝑘
𝑎𝑘 = 𝑟 𝑐 +
1−𝑟

for some constant 𝑐 (which depends on the initial condition).

Introduction to Modeling - Analytical Solutions 24


SYSTEMS OF DIFFERENCE EQUATIONS
For the systems considered here, we find the equilibrium values and
then explore starting values in their vicinity. If we start close to an
equilibrium value, we want to know whether the system will:

1. Remain close
2. Approach the equilibrium value
3. Not remain close.

Does the long-term behavior described by the numerical solution


appear to be sensitive to the initial condition?

Introduction to Modeling - Systems 25


MODELS FOR INTERACTING POPULATIONS
When species interact the population dynamics of each species is
affected. We consider here two-species systems.

There are three main types of interaction.


1. If the growth rate of one population is decreased and the other
increased the populations are in a predator-prey situation.
2. If the growth rate of each population is decreased then it is
competition.
3. If each population’s growth rate is enhanced then it is called
symbiosis.

Introduction to Modeling - Systems 26


PREDATOR-PREY MODEL
If 𝑁𝑛 is the prey population and 𝑃𝑛 that of the predator at time 𝑛 then our
model is
∆𝑁𝑛 = 𝑁𝑛 𝑎 − 𝑏𝑃𝑛
∆𝑃𝑛 = 𝑃𝑛 𝑐𝑁𝑛 − 𝑑
where 𝑎, 𝑏, 𝑐 and 𝑑 are positive constants.
1. The prey in the absence of any predation grows unboundedly.
2. The effect of the predation is to reduce the prey’s per capita growth rate
by a term proportional to the prey and predators population.
3. In the absence of any prey for sustenance the predator’s death rate
results in exponential decay.
4. The prey’s contribution to the predator’s growth is proportional to the
available prey as well as to the size of the predator population.

Introduction to Modeling - Systems 27


EQUILIBRIUM VALUES
The equilibrium values for the system are those values for which no
change in the system takes place.

Let 𝑁 and 𝑃 be those values. Substitution in our model yields the


following requirements for the equilibrium values:
𝑎
𝑁 = 0 or 𝑃 =
∆𝑁𝑛 = 0 = 𝑁 𝑎 − 𝑏𝑃 𝑏
∆𝑃𝑛 = 0 = 𝑃 𝑐𝑁 − 𝑑 𝑑
𝑃 = 0 or 𝑁 =
𝑐
𝑎 𝑑
𝑃, 𝑁 → 0,0 𝑎𝑛𝑑 ,
𝑏 𝑐
Introduction to Modeling - Systems 28
EXERCISE 7
Suppose we have Owls and Mice in a park and the Owls feed on the
Mice. Let 𝑀𝑛 and 𝑂𝑛 be the population at time 𝑛 and let’s say

𝑀𝑛+1 = 1.5𝑀𝑛 − 0.005𝑂𝑛 𝑀𝑛


𝑂𝑛+1 = 0.5𝑂𝑛 + 0.001𝑂𝑛 𝑀𝑛

1. What do these equations represent?


2. What are the equilibrium values?
3. What happens if 𝑀0 = 200 and 𝑂0 = 100?

Introduction to Modeling - Systems 29


SUMMARY
After the first 5 iterations it appears the mice population is growing while the
owl population increases.

After the 5th iteration, the owl population begins to grow but so does the
mice population.

At the 11th iteration, we see that the mice population has grown large
enough to allow the owl population to make large growth jumps which
allows the owls to take over.

Since the owls no longer have a food source, they begin to die off.

Introduction to Modeling - Systems 30


COMPETITIVE EXCLUSION
Here two or more species compete for the same limited food source or
in some way inhibit each other’s growth.

Let 𝐴𝑛 and 𝐵𝑛 be the populations of species 𝐴 and 𝐵 respectively at


time 𝑛 and suppose that in the absence of the other species, each
individual species exhibits unconstrained growth. Let 𝑘1 and 𝑘2 be the
positive growth rates.

∆𝐴𝑛 = 𝐴𝑛 𝑘1 − 𝑘3 𝐵𝑛
∆𝐵𝑛 = 𝐵𝑛 𝑘2 − 𝑘4 𝐴𝑛

Introduction to Modeling - Systems 31


COMPETITIVE EXCLUSION
Solving each equation for the 𝑛 + 1 term gives

𝐴𝑛+1 = 1 + 𝑘1 𝐴𝑛 − 𝑘3 𝐵𝑛 𝐴𝑛
𝐵𝑛+1 = 1 + 𝑘2 𝐵𝑛 − 𝑘4 𝐴𝑛 𝐵𝑛

When there is no change we have equilibrium values at

∆𝐴𝑛 = 0 = 𝐴𝑛 𝑘1 − 𝑘3 𝐵𝑛
∆𝐵𝑛 = 0 = 𝐵𝑛 𝑘2 − 𝑘4 𝐴𝑛

𝑘2 𝑘1
𝐴, 𝐵 = (0,0) and 𝐴, 𝐵 = ,
𝑘4 𝑘3

Introduction to Modeling - Systems 32


EXERCISE 8
Suppose a species of spotted owls competes for survival in a habitat that also
supports hawks. Let 𝑂𝑛 and 𝐻𝑛 be the population at time 𝑛 and let’s say

𝑂𝑛+1 = 1.2𝑂𝑛 − 0.001𝑂𝑛 𝐻𝑛


𝐻𝑛+1 = 1.3𝐻𝑛 − 0.002𝑂𝑛 𝐻𝑛

1. What do these equations represent?


2. What are the equilibrium values?
3. What happens if 𝑂0 = 151 and 𝐻0 = 199? What happens if 𝑂0 = 149
and 𝐻0 = 201? What happens if 𝑂0 = 10 and 𝐻0 = 10?

Introduction to Modeling - Systems 33


SYMBIOSIS
There are many examples where the interaction of two or more species
is to the advantage of all. Symbiosis often plays the crucial role in
promoting and even maintaining such species: plant and seed dispersal
is one example.

Let 𝐴𝑛 and 𝐵𝑛 be the populations of species 𝐴 and 𝐵 respectively at


time 𝑛. Let 𝑘1 and 𝑘2 be the positive growth rates.

∆𝐴𝑛 = 𝐴𝑛 𝑘1 + 𝑘3 𝐵𝑛
∆𝐵𝑛 = 𝐵𝑛 𝑘2 + 𝑘4 𝐴𝑛

Introduction to Modeling - Systems 34


THE MODELING PROCESS
Suppose we want to understand some behavior or phenomenon in the
real world. We may wish to make predictions about that behavior in
the future and analyze the effects that various situations have on it.
Mathematical World Real World Systems
1. Models 1. Observed Behavior
2. Equations/Formulas 2. Phenomenon
3. Operations/Rules
4. Conclusions

Introduction to Modeling - Modeling Process 35


SYSTEM
A system is a collection of objects, typically represented by the
variables in the model, that interact or are interdependent.

We are interested in understanding how a particular systems works,


what causes changes in the system, and how sensitive the system is to
certain changes to help us predict what changes might occur and when
they occur.

EXAMPLE:
In our previous examples, what happened then we saw too many mice
in our system?
Introduction to Modeling - Modeling Process 36
REAL-WORLD VS MATH WORLD
Observation
Real-World System Mathematical Model
Simplification
Trials/Experiments Analysis
Real-World Mathematical
Conclusions Conclusions
Interpretation

Introduction to Modeling - Modeling Process 37


WHY MODEL?
Why not just test things in the real world?

There are many situations in which we would not want to follow such a
course of action (even with the risk of loss of fidelity).

1. Level of concentration of a drug (lethal).


2. Radiation effects of a failure in a nuclear power plant.
3. Atmospheric changes

May not even be possible to produce a trial, not just for moral reasons.

Introduction to Modeling - Modeling Process 38


MATHEMATICAL MODEL
A mathematical model is defined as a mathematical construct designed
to study a particular real-world system or phenomenon. It can include
graphical, symbolic, simulation, and experimental constructs.

When developing our model, we should keep a few things in mind:


1. Feasibility: is the real-world system just to much?
2. Fidelity: how close does the model match reality?
3. Costs: do we have the resources, etc.?
4. Flexibility: can the model be expanded easily?

Introduction to Modeling - Modeling Process 39


CONSTRUCTION OF MODELS
The process of constructing a model is similar to the scientific method:

1. Identify the problem. This is not as straightforward as it sounds. Be


as clear as you can.
2. Make assumptions. Simplify relationships, reduce the number of
variables, classify the variables (independent, dependent, neither),
determine the relationships between the variables.
3. Solve or interpret the model. Solve the equations (possible
numerically).

Introduction to Modeling - Modeling Process 40


CONSTRUCTION OF MODELS
4. Verify the model. Did we answer the question, is it feasible, does it
make sense, compare with observations.
5. Implement the model. Make it useful/practical.
6. Maintain the model. Update as necessary.

NOTE:
This is like the scientific method for testing hypothesis and we do try to
be as scientific as possible, but we must remember that this is a
creative/artistic/intuitive part of modelling and that for the most part,
our models can never duplicate reality exactly.

Introduction to Modeling - Modeling Process 41


SIMPLIFYING OR REFINING
Model Simplification Model Refinement
1. Restrict problem identification. 1. Expand the problem.
2. Neglect variables. 2. Consider additional variables.
3. Group effects of several 3. Consider each variable in detail.
variables.
4. Set some variables to be 4. Allow variation in the variables.
constant. 5. Consider nonlinear
5. Assume simple (linear) relationships.
relationships.
6. Reduce the number of
6. Incorporate more assumptions. assumptions.
Introduction to Modeling - Modeling Process 42
PROPERTIES OF A MODEL
The following are terms that are useful in describing models:

1. A model is said to be robust when its conclusions do not depend on


the precise satisfaction of the assumptions.
2. A model is fragile if its conclusions do depend on the precise
satisfaction of some sort of conditions.
3. Sensitivity refers to the degree of change in a model’s conclusions
as some condition on which they depend is varied; the greater the
change the more sensitive is the model to that condition.

Introduction to Modeling - Modeling Process 43

You might also like