MODELING WITH DIFFERENTIAL EQUATIONS - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

MODELING WITH DIFFERENTIAL EQUATIONS

Description:

However, you would solve using Maple language ( try as homework exercise) ... Computer algebra using MAPLE will give you the results. ... – PowerPoint PPT presentation

Number of Views:220
Avg rating:3.0/5.0
Slides: 36
Provided by: shrpss
Category:

less

Transcript and Presenter's Notes

Title: MODELING WITH DIFFERENTIAL EQUATIONS


1
MODELING WITH DIFFERENTIAL EQUATIONS Understanding
a natural process quantitatively almost always
leads to a differential equation. Besides exact
solutions in terms of functions, numerical and
asymptotic solutions are always possible. Let us
consider growth of biological population given
as The general form of this equation is
written as The solution invariably needs
initial conditions for a complete solution, which
is given. Say y(0) y0 at t 0.
2
Given a differential equation, it can be easily
solved using numerical technique. This technique
is very powerful and used commonly on
computers. Example The equation dy/dt f
(y,t). Write this is difference equation form
?yi / ?ti f(ti,yi) at t ti, i
1,2,3n ?yi f(ti,yi). ?ti where dy/dt ?y/
?t, and ?yi yi1 -yi yi1 -yi f(ti,yi).
?t ?ti ?t gives yi1 yi f(ti,yi). ?t
for i 1,2,3, starting value, y0 at t 0 is
given. It is a recursive equation which can be
calculated for y i at all time points.
3
Example Consider the following differential
equation dy/dt 2 y(t) with y(0) y0
2 Convert it into difference equation ?yi / ?ti
2 yi(ti). Evaluate it at time point t ti, i
0,1, 2, .n (y i1 - y i )/ ?t 2 yi(t) , (y
i1 - y i ) ?yi and ?t is constant This
equation can be simplified to y i1 y i
2. ?t . yi(t) for i 0, 1,2 , 3n. Let ?t 1
unit y i1 y i 2. yi(t) 3 . y i , for i
0,1, 2 , 3n. This gives y1 6, y2 18, y3
54, .. This method can be applied for any
differential equation.
4
Consider a more useful, population growth
equation dy/dt m y R(t) The equation
looks rather simple, analytic solution is
difficult. Since it is very useful equation, It
is worthwhile to look at the analytic solution.
However, you would solve using Maple language (
try as homework exercise). Since it is first
order differential equation, you need one initial
condition to solve it. Say y(0), at t 0 is
given. Sometime the modeling problem may involve
2-3 variables to solve inter-linked differential
equations.
5
  • Consequently, you may have to solve 2-3
    differential equations simultaneously.
  • Take a practical model of glucose/insulin
    system.
  • Let g(t) amount of glucose in the body at time
    t
  • and i (t) amount of insulin at time t in the
    body
  • dg(t)/dt - a g(t) - b i(t) p(t)
  • di(t)/dt r g(t) - d i(t)
  • The rate of removal of glucose is proportional
    to glucose and insulin in the body. However,
    there is external input p(t).
  • The rate of secretion of insulin increases with
    amount of glucose but decreases in proportion of
    amount of insulin in the body
  • The system can be written as dY(t)/dt M.
    Y(t) P(t)

6
Where M and P are Calculation of steady
state values. Steady state values predict the
ultimate course ( behavior) of the model, which
is limit Y(t) as time t goes to infinity.
7
In steady state Which gives -a.g(t) -b.i(t)
p(t) 0 r.g(t) - d.i(t) 0, which
gives g(t) d. p(t) /(rbad) and i(t) r
p(t) / (rbad) The only problem is if you have
many coupled variables, the system of equation
may become complex and difficult to solve by
hand. Please note that practical problems are
always complex. We normally study simplified
solutions. However,computers help is always
there.
8
(No Transcript)
9
(No Transcript)
10
  • STATISTICAL MODELING
  • A distribution is a fraction of observations
    having a particular value as a function of
    possible events (outcomes).
  • Distributions are approximately described by
    their mean or average values and standard
    deviations.
  • A widely occurring distribution is known as a
    normal distribution or Gaussian distribution and
    is completely defined by its mean and standard
    deviation.
  • A histogram is a plot of the fraction of
    observations falling within various sub-ranges
    and plotted against these sub-ranges.
  • The Histogram resolution is determined by the
    choice of sub ranges of events. Smaller the
    sub-ranges - better the resolution, and reflects
    accurate determination of distribution.
  • However, larger and fewer interval values
    entails less data storage and processing
    requirements.

11
(No Transcript)
12
Graph of accumulated percentage is called
Cumulative Distribution
13
The mean and median approximately locate the
center of the distribution. If n values are given
as x1, x2, x3,, xn. The mean is defined as
? 1/n (? xi ) Calculate the mean age of
population, given previous data
2.5 x 0.072 7.5 x 0.076 82.5 x
0.019 34.31 which is defined as ? ?
xi. fraction of values equal to xi Median is
defined as the center of the distribution given
the values as 1, 2, 2, 3 , 4. The median is 2
and the mean is 2.4
14
Variance and standard deviation The variance is
a measure of how widely data are dispersed around
the mean value. Large variance means large
dispersion. The variance ? or ? 2 is defined as
? 1/n (? ( xi - ?) 2 and the standard
deviation ? sqrt (?) Given that 30, 0, 120,
90, the mean is 60 and the variance ? 2 1/4
?( x- ?)2 1/4 x 9000 2250 and the standard
deviation ? sqrt ( 2250) 47.5 Calculate the
mean, variance, sd , median for the male, female
and total population of the USA,
15
PROBABILITY Probability deals with unpredictable
events- by making predictions in the form of
relative frequency of the outcomes of various
events. If the events E and F are disjoint E ?
F ?, that is they have no outcome in
common, then Pr ( E or F ) Pr ( E ) Pr ( F
) and Pr ( U ) 1 ( certainty ), U all the
events. If the number of outcome of an event E
is denoted by?E ?, and suppose that each outcome
is equally likely, then, the probability for an
event E to occur is the ratio of the number of
outcomes making up E to the total number of
outcome U. Pr(E) ?E ?/ ?U ?. If rolling a
pair of dice, one red and one green. Total
outcomes
16
are 36 1-1, 1-2, 1-3,6-6 The probability of
getting a 5 on red and 6 on green 1/36 The
probability of getting a sum of 11
2/36 Probability of getting a seven is 16, 25,
34, 43, 52, 616/36 The probability of
throwing a 7 or 11 is 2/36 6/36 2/9 The
mean value of x of throwing a dice ? Ave x ?
x. Pr (x) 2.1/36 3.2/36 7
(check) Similarly, variance V(x)
Pr ( x ) 35/6 Roll 2 3 4 5 6 7 8 9 Prob. 1/36
2/36 3/36 4/36 5/36 6/36 5/36 4/36 10 11 12 3
/36 2/36 1/36
17
Principal of Independence If two events E and F
are independent, then the probability that both
will occur is the product of their individual
probabilities. Pr( E and F ) Pr (E) . Pr
(F) Example Toss a coin 4 times. What is the
probability that HHHT will occur in the same
sequence Pr(HHHT) Pr(H).Pr(H).Pr(H).Pr(T)
(1/2)(1/2)(1/2)(1/2) Probability of 3 Heads out
of 4 throws HHHT,HHTH,HTHH and THHH . Each
with a probability 1/16 gives 4.1/16
1/4. Permutations and combinations are the core
of probability calculations. How to solve the
problem of 8 heads in 14 throws ( k heads in n
throws). It is a problem of counting number of
combinations.
18
It is given by , which is (n!/(n-k)!
k!) n(n-1)(n-2)(n-(k-1)/k.(k-1).(k-2)1
i.e. 3 heads in 4 throws 4.3.2./3.2.1 4
ways. In mathematical terms n choose k, is
. Note for all k 1,2,3 This
problem of n choose k occurs in binomial theorem,
which states If an experiment has two possible
outcomes, say a1 and a2, with probability p(a1)
p and p (a2) 1- p. If each experiment is
repeated N times and each outcome is independent
of any combination of other outcomes. Then, the
probability of getting a1 exactly n times and
a2 exactly (N-n) times, is given by the
binomial theorem.
19
  • P(a1-n times,a2-(N-n)times)
  • Multinomial Distribution
  • It is an extension of binomial distribution. If
    an experiment has r possible outcomes
    a1,a2,a3,ar
  • The experiment is repeated N number of times.
  • Each outcome is independent of any combination of
    other outcomes.
  • P(a1) p1, p(a2) p2,..p(ar) pr, then the
    probability of getting a1 ? n1 times, a2 ? n2
    times, ar ? nr times.
  • Note that p1p2.pr 1, n1n2..nr N
  • p(a1 ? n1,a2 ? n2,..ar ? nr )

20
If the probability density function is given by
f(x), then, the probability that x lies between
3 and 5 is given by pr(3? x ?5)
The simplest distribution function is
uniform on the entire interval. Example Five
patients need heart transplant and only three
hearts are available. How many ways are there to
make a list of recipients? 5 choose 3 5!/(3! (
5-3)!) 5.4.3/3.2.1 10 ways How many ways are
there to list two persons, who must be in the
waiting list 5 choose 2 5!/2! ( 5-2)!
5.4/2.1 10 ways The list could have names ( by
number) 54, 53, 52, 51, 43, 42, 41, 32,
31, 21 10 ways
21
  • Drive for Survival
  • Darwinian Model
  • Finite resources of all kinds place limits on
    reproduction and growth of organism
  • All members will compete for resources and most
    will not get enough.
  • Those that survive will pass their properties to
    their off-springs.
  • Living systems operate under a set of
    constraints.
  • Available space is finite.
  • Temperature range of life is limited - 0-to-50
    0C
  • Energetic resources are limited.
  • Physical resources are finite.
  • Unchecked population growth is exponential

22
  • In real life, every population has some birth and
    deaths.
  • The real ( net) growth is (birth - death).
  • The population growth rate r (birth rate -
    death rate)/pop. Size
  • The maximum rate rmax is called biotic
    potential
  • This value ranges from low of 0.03for large
    mammals to 10,000 for bacteria. The growth rate
    is a positive number.
  • rmax is achieved under optimal conditions.
    Normally it is sub-optimal, i.e., actual birth
    rate is lower and the death rate is higher.
  • r may also become negative under some
    conditions.
  • Note exponential model approximates population
    in its early stage.

23
If the resources are plenty, the population may
grow with biotic potential. Normally r is given,
in terms of doubling time. Therefore, y/y0 2
e rT. T is doubling time and y0 is starting
population This gives, ( take ln on both sides)
r ln2 / T In presence of serious adversity,
a population may die-off exponentially. y
y0 e -? t where ? is a positive value. The
process is characterized by a half life time T1/2
. Half time is the time when the population is
reduced to half. 1/2 y0 y0 e -? T1/2 . T1/2
ln 2 / ?
24
As for mammals, there is a maturation period and
no population grows unboundedly. Now, let us
account for maturation period. Incorporate a
time delay of ?. This is time that the
off-springs are born and the time they start
reproducing. Therefore, dy/dt r. y( t- ?
) ie, the growth rate at the present time is
proportional to the population ? time units ago
( births within the last ? periods of time do
not contribute off-springs ) The differential
equation is called a delay DE.
time
1
T1/2
0.5
1
Fraction remaining
25
dy/dt f 0 ( t-1). Let r 1, and ?
1. Solve for y(t) for the interval 0? t ? 1 Call
this solution as f1. Now use this to solve for
population in time interval between 1? t ? 2 . So
on. The model is still an exponential type, but
closer to reality. Growth parameters can be
determined from the given experimental data. y0
( population at time 0 )and r. Given population
at time points t1, t2, ..tn as y1, y2, ..
yn. Given the model y y0 e r t . Try fit the
straight line fit for the data. ln y ln y0
r.t ( in the form y mx c) you
get ,
-1
0
1
26
and,
This problem can be solved easily if the initial
population size y0 is known. Normally it is
always given in the experimental data. y
y0 e r t . At time point i , take ln and
solve for r. ln y ln y0 r t, for t t1,
t2, .. tn r (ln yi - ln y0 ) / ti or ln
yi ln y0 r.ti there is only one unknown
r. The error e2
27
Computer algebra using MAPLE will give you the
results.
Try Example 3.5.1 from your text book and Prob 4,
page 96
1790 3.92 1860 31.43 1930 122.77 1800 5.31 1870
39.82 1940 131.67 1810 7.24 1880 50.156 1950 1
51.33 1820 9.64 1890 62.95 1960 179.32 1830 12.8
7 1900 75.99 1970 203.30 1840 17.07 1910 91.97
1980 226.54 1850 23.12 1920 105.71 1990 248.71
It seems that the growth is exponential. Plot on
the ln scale. Forecast the population in the
year 2000 and 2001
28
(No Transcript)
29
(No Transcript)
30
Multiple Species System Problem statement
suppose that rabbits and foxes are living in a
confined area where there is plenty of food for
rabbits, and foxes depend on eating rabbits for
their foods. Objective develop a model which
will enable us to predict population of rabbits
and foxes at a given time. Formulate a
mathematical problem x is the number of rabbits
at time t y is the number of foxes at time t You
need some assumptions ie, in the absence of
foxes, rabbits would grow at 400 per unit
time. If there are no rabbits, foxes would starve
to death at a rate of 90 per unit time.
31
However, in steady state both will co-exist
together. dx/dt 4 x when y 0 dy/dt -
0.9 y, when x 0 It is reasonable to assume that
the number of rabbits killed is proportional to
number of foxes and number of rabbits.
dx/dt 4 x - 0.02 x.y dy/dt - 0.9 y
0.001 x.y To see the equilibrium point, set
dx/dt 0 and dy/dt 0. 4x - 0.02 xy 0
0.001 xy - 0.9 y 0. Besides x y 0, the
other non-trivial solution will be x 900, y
200 ( check) If we start with x(0) 800, and
y(0) 100 and simulate using Maple, you would
get the cyclic solution in both their populations.
32
The rabbit population will oscillate from 168 to
2658, and the fox population from about 100 to
350. The oscillation time period would be about
3.5 time units. The plots are given in the figure
plotted on the next page.
33
2658
1375
34
Parametric plot of foxes vs rabbits
P Starting Point E Equilibrium Pt.
351.7
225.7
99.7
168.1
35
Reading Exercises( for final exam) Pages 98 to
117 ( Chapter 4, sec 4.1, 4.2, 4.3) Pages 264 to
295 ( chapter 9 sec 9.1, 9.2, 9.3) Page 369 to
388 ( chapter 11, sec 11.1, 11.2, 11.3)
Write a Comment
User Comments (0)
About PowerShow.com