Seite - 97 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Bild der Seite - 97 -
Text der Seite - 97 -
4.1 PopulationGrowth 97
4.1.1 DerivationoftheModel
It can be instructive to show how an equation like (4.1) arises. Consider some
population of (say) an animal species and letN.t/ be the number of individuals
in a certain spatial region, e.g. an island. We are not concernedwith the spatial
distribution of the animals, just the number of them in some spatial area where
there is noexchangeof individualswith other spatial areas. Duringa time interval
t, someanimalswill die and somenewwill be born. Thenumber of deaths and
birthsareexpectedtobeproportional toN . Forexample, if thereare twiceasmany
individuals,weexpect them toget twice asmanynewborns. In a time interval t,
thenetgrowthof thepopulationwill be
N.tC t/ N.t/D NbN.t/ NdN.t/;
where NbN.t/ is the number of newborns and NdN.t/ is the number of deaths. If
wedouble t,weexpect theproportionality constants Nb and Nd to double too, so it
makes sense to think of Nb and Nd as proportional to t and “factor out” t. That
is, we introduce b D Nb= t and d D Nd= t to be proportionality constants for
newborns anddeaths independentof t. Also,we introduce r D b d,which is
thenet rateofgrowthof thepopulationper timeunit. Ourmodel thenbecomes
N.tC t/ N.t/D trN.t/: (4.2)
Equation (4.2) is actually a computationalmodel. GivenN.t/, we can advance
thepopulationsizeby
N.tC t/DN.t/C trN.t/:
This is calledadifference equation. IfweknowN.t/ for some t, e.g.,N.0/DN0,
wecancompute
N. t/DN0C trN0;
N.2 t/DN. t/C trN. t/;
N.3 t/DN.2 t/C trN.2 t/;
:::
N..kC1/ t/DN.k t/C trN.k t/;
wherek is somearbitrary integer.AcomputerprogramcaneasilycomputeN..kC
1/ t/ foruswith theaidofa little loop.
Warning
Observe that the computational formula cannot be started unless we have an
initial condition!
The solution ofN 0 D rN isN D Cert for any constantC, and the initial
condition is needed to fixC so the solution becomes unique. However, from
amathematicalpointofview,knowingN.t/at anypoint t is sufficient as initial
Programming for Computations – Python
A Gentle Introduction to Numerical Simulations with Python
- Titel
- Programming for Computations – Python
- Untertitel
- A Gentle Introduction to Numerical Simulations with Python
- Autoren
- Svein Linge
- Hans Petter Langtangen
- Verlag
- Springer Open
- Datum
- 2016
- Sprache
- englisch
- Lizenz
- CC BY-NC 4.0
- ISBN
- 978-3-319-32428-9
- Abmessungen
- 17.8 x 25.4 cm
- Seiten
- 248
- Schlagwörter
- Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
- Kategorie
- Informatik