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 - 149 -
  • User
  • Version
    • full version
    • text only version
  • Language
    • Deutsch - German
    • English

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

Image of the Page - 149 -

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

Text of the Page - 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.
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