Web-Books
im Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Seite - XII -
  • Benutzer
  • Version
    • Vollversion
    • Textversion
  • Sprache
    • Deutsch
    • English - Englisch

Seite - XII - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Bild der Seite - XII -

Bild der Seite - XII - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Text der Seite - XII -

xii Contents 3 ComputingIntegrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 3.1 Basic IdeasofNumerical Integration . . . . . . . . . . . . . . . . . . 56 3.2 TheCompositeTrapezoidalRule . . . . . . . . . . . . . . . . . . . . . 57 3.2.1 TheGeneralFormula. . . . . . . . . . . . . . . . . . . . . . . . 59 3.2.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 3.2.3 MakingaModule . . . . . . . . . . . . . . . . . . . . . . . . . . 62 3.2.4 AlternativeFlatSpecial-Purpose Implementation . . . . . . 63 3.3 TheCompositeMidpointMethod . . . . . . . . . . . . . . . . . . . . 65 3.3.1 TheGeneralFormula. . . . . . . . . . . . . . . . . . . . . . . . 66 3.3.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 3.3.3 Comparing theTrapezoidaland theMidpointMethods . . . 67 3.4 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 3.4.1 ProblemswithBriefTestingProcedures . . . . . . . . . . . . 68 3.4.2 ProperTestProcedures . . . . . . . . . . . . . . . . . . . . . . 69 3.4.3 FinitePrecisionofFloating-PointNumbers . . . . . . . . . . 71 3.4.4 ConstructingUnitTests andWritingTestFunctions . . . . . 72 3.5 Vectorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 3.6 MeasuringComputationalSpeed . . . . . . . . . . . . . . . . . . . . . 77 3.7 DoubleandTriple Integrals . . . . . . . . . . . . . . . . . . . . . . . . 78 3.7.1 TheMidpointRule foraDouble Integral . . . . . . . . . . . 78 3.7.2 TheMidpointRule foraTriple Integral . . . . . . . . . . . . 81 3.7.3 MonteCarlo Integration forComplex-ShapedDomains . . 84 3.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 4 SolvingOrdinaryDifferentialEquations . . . . . . . . . . . . . . . . . . 95 4.1 PopulationGrowth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 4.1.1 Derivationof theModel . . . . . . . . . . . . . . . . . . . . . . 97 4.1.2 NumericalSolution . . . . . . . . . . . . . . . . . . . . . . . . . 99 4.1.3 ProgrammingtheForwardEulerScheme; theSpecialCase 102 4.1.4 Understanding theForwardEulerMethod . . . . . . . . . . . 105 4.1.5 ProgrammingtheForwardEulerScheme; theGeneralCase 105 4.1.6 Making thePopulationGrowthModelMoreRealistic . . . 106 4.1.7 Verification:ExactLinearSolutionoftheDiscreteEquations109 4.2 SpreadingofDiseases . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 4.2.1 SpreadingofaFlu . . . . . . . . . . . . . . . . . . . . . . . . . 110 4.2.2 AForwardEulerMethod for theDifferential Equation System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 4.2.3 ProgrammingtheNumericalMethod; theSpecialCase . . . 114 4.2.4 OutbreakorNot . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 4.2.5 AbstractProblemandNotation . . . . . . . . . . . . . . . . . 116 4.2.6 ProgrammingtheNumericalMethod; theGeneralCase . . 117 4.2.7 Time-Restricted Immunity . . . . . . . . . . . . . . . . . . . . 119 4.2.8 IncorporatingVaccination . . . . . . . . . . . . . . . . . . . . . 120 4.2.9 DiscontinuousCoefficients:AVaccinationCampaign . . . 123 4.3 OscillatingOne-DimensionalSystems . . . . . . . . . . . . . . . . . 124 4.3.1 DerivationofaSimpleModel . . . . . . . . . . . . . . . . . . 124 4.3.2 NumericalSolution . . . . . . . . . . . . . . . . . . . . . . . . . 126 4.3.3 ProgrammingtheNumericalMethod; theSpecialCase . . . 126
zurück zum  Buch Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python"
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
Web-Books
Bibliothek
Datenschutz
Impressum
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python