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

Seite - 149 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition

Bild der Seite - 149 -

Bild der Seite - 149 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition

Text der Seite - 149 -

6.5 RateofConvergence 149 Clearly,when h= b−a n , (n sub-intervals of equal size h for an integration interval [a,b]), an alternative expressionforE followsfrom E=Khr, (6.22) =K ( b−a n )r , (6.23) =K(b−a)r ( 1 n )r , (6.24) which,by introducinganotherconstantC=K(b−a)r, gives E=Cn−r . (6.25) Convergence Rate for the Trapezoidal and Midpoint Methods Using, for example,thetrapezoidalmethod,wemaycarryoutsomeexperimentalrunswithour test problem ∫1 0 3t 2et 3 dt, doublingn foreach run:n=4,8,16.Thecorresponding errors are then 12%, 3% and 0.78%, respectively. These numbers indicate that the error is reducedbyroughlya factor4whendoublingn.Thus, it seems that theerror converges to zero asn−2, which suggests a convergence rate r = 2. In fact, it can beshownmathematically that the trapezoidaland the midpointmethodbothhavea convergencerate r=2, i.e., theyarebothsecond-ordermethods.Soon,wewill see howthis fact (andmore)canbeexploited in the testingofcode. Remarkonthe DefinitionofConvergenceRate When we later address numerical solution methods for ordinary differential equations (Chap.8), convergencerate is essentially defined like in (6.21),we just switch (not required) the symbol h with Δt (i.e., the spacing between computedsolutionvalues). However, with iterative methods for the solving of nonlinear algebraic equations (Chap.7), convergence rate is defined differently. In that case, one usually relates the error at an iteration to the error at the previous iteration, and theconvergencerateappearsasa parameter in that relation.
zurück zum  Buch Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition
Titel
Programming for Computations – Python
Untertitel
A Gentle Introduction to Numerical Simulations with Python 3.6
Band
Second Edition
Autoren
Svein Linge
Hans Petter Langtangen
Verlag
Springer Open
Datum
2020
Sprache
englisch
Lizenz
CC BY 4.0
ISBN
978-3-319-32428-9
Abmessungen
17.8 x 25.4 cm
Seiten
356
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