Page - 116 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Image of the Page - 116 -
Text of the Page - 116 -
116 4 SolvingOrdinaryDifferentialEquations
4.2.4 OutbreakorNot
Lookingat theequation forI, it is clear thatwemusthaveˇSI I >0 forI to
increase.Whenwestart thesimulation itmeans that
ˇS.0/I.0/ I.0/>0;
or simpler
ˇS.0/
>1 (4.29)
to increase the number of infected people and accelerate the spreading of the dis-
ease.YoucanruntheSIR1.pyprogramwithasmallerˇ suchthat(4.29)isviolated
andobserve that there isnooutbreak.
Thepowerofmathematicalmodeling
The reader should notice our careful use ofwords in the previous paragraphs.
Westartedoutwithmodelingaveryspecificcase, namely the spreadingofaflu
amongpupilsandstaff at aboardingschool.Withpurposeweexchangedwords
like pupils and flu with more neutral and general words like individuals and
disease, respectively. Phrased equivalently, we raised the abstraction level by
moving from a specific case (flu at a boarding school) to amore general case
(disease in a closed society). Very often,when developingmathematicalmod-
els,westartwith a specificexampleandsee, through themodeling, thatwhat is
going on of essence in this example alsowill take place inmany similar prob-
lem settings. We try to incorporate this generalization in themodel so that the
model has amuchwider application area thanwhatwe aimed at in the begin-
ning. This is theverypowerofmathematicalmodeling: bysolvingonespecific
casewehaveoften developedmoregeneric tools that can readily be applied to
solveseeminglydifferentproblems. Thenextsectionswillgivesubstance to this
assertion.
4.2.5 AbstractProblemandNotation
Whenwehadaspecificdifferentialequationwithoneunknown,wequickly turned
toanabstractdifferential equationwritten in thegeneric formu0 Df.u;t/.Were-
fer tosuchaproblemasascalarODE.Aspecificequationcorrespondstoaspecific
choiceof the formulaf.u;t/ involvinguand(optionally) t.
It is advantageous to also write a system of differential equations in the same
abstractnotation,
u0 Df.u;t/;
but this time it isunderstoodthatu is avectorof functionsandf is alsovector.We
say thatu0 Df.u;t/ is avector ODEor system of ODEs in this case. For theSIR
modelwe introduce the two3-vectors,one for theunknowns,
uD .S.t/;I.t/;R.t//;
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