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

Page - 270 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition

Image of the Page - 270 -

Image of the Page - 270 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition

Text of the Page - 270 -

270 8 SolvingOrdinaryDifferentialEquations sub-interval size h, i.e., computations became more accurate. Not too surprising then, theasymptoticerrormodelsaresimilar, and theconvergencerate is computed in essentially the same way (except that the error computation requires some more consideration with the methods of the present chapter). Let us look at the details. 8.5.1 AsymptoticBehavioroftheError For numerical methods that solve ODEs, it is known that when Δt → 0, the approximationerror8 usuallybehaves like E=C(Δt)r , (8.84) forpositiveconstantsC andr.Theconstantr isknownastheconvergencerate,and its value will depend on the method (r could be 1, 2 or 4, for example). A method with convergencerate r is said to be an r-th order method, and we understand that thelargerthervalue,thequickertheerrorEdropswhenthetimestepΔt is reduced. 8.5.2 ComputingtheConvergenceRate Consider a set of experiments, i = 0,1,.. ., each depending on a discretization parameterΔti that typically is halved from one experiment to the next. For each experiment, a corresponding errorEi is computed. We may then estimate r (C is not really interesting) fromtwo experiments: Ei−1 =CΔtri−1 Ei =CΔtri . We eliminateC by, e.g., dividing the latter equation by the former, and proceed to solvefor r: r= ln(Ei/Ei−1) ln(Δti/Δti−1) . Clearly, r will vary with the pair of experiments used in the above formula, i.e., the value of i. Thus, what we actually compute, is a sequence of ri−1 values (i= 1,2,.. .), where each ri−1 value is computed from two experiments (Ei,Δti) and (Ei−1,Δti−1). Since the error model is asymptotic (i.e., valid as Δt → 0), the r value corresponding to the smallestΔt value will be the best estimate of the convergencerate. But How Do We Compute the Error Ei? When we previously addressed the computingofconvergencerates fornumerical integrationmethods(trapezoidaland 8 Aswill be addressed below, there are several options for how to quantify thiserror.
back to the  book Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python 3.6, Volume Second Edition
Title
Programming for Computations – Python
Subtitle
A Gentle Introduction to Numerical Simulations with Python 3.6
Volume
Second Edition
Authors
Svein Linge
Hans Petter Langtangen
Publisher
Springer Open
Date
2020
Language
English
License
CC BY 4.0
ISBN
978-3-319-32428-9
Size
17.8 x 25.4 cm
Pages
356
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