Web-Books
in the Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Page - 97 -
  • User
  • Version
    • full version
    • text only version
  • Language
    • Deutsch - German
    • English

Page - 97 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Image of the Page - 97 -

Image of the Page - 97 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Text of the Page - 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
back to the  book Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python
Title
Programming for Computations – Python
Subtitle
A Gentle Introduction to Numerical Simulations with Python
Authors
Svein Linge
Hans Petter Langtangen
Publisher
Springer Open
Date
2016
Language
English
License
CC BY-NC 4.0
ISBN
978-3-319-32428-9
Size
17.8 x 25.4 cm
Pages
248
Keywords
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Category
Informatik
Web-Books
Library
Privacy
Imprint
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python