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

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

Image of the Page - 245 -

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

Text of the Page - 245 -

8.4 Oscillating1DSystems:ASecondOrderODE 245 Fig. 8.21 Adjusted method: first three periods (left) and period 36–40 (right) Fig. 8.22 Illustration of a backward difference approximation to the derivative We interpret (8.51) as the differential equation sampled at mesh point tn, because wehavevn ontheright-handside.The left-handside is thena forwarddifferenceor Forward Euler approximation to the derivativeu′, see Fig. 8.4. On the other hand, weinterpret (8.52)as thedifferentialequationsampledatmeshpoint tn+1, sincewe haveun+1 on the right-handside. In this case, the difference approximationon the left-handside is abackwarddifference, v′(tn+1)≈ v n+1 −vn Δt or v′(tn)≈ v n−vn−1 Δt . Figure8.22illustrates thebackwarddifference.Theerrorin thebackwarddifference isproportionaltoΔt, thesameasfor the forwarddifference(but theproportionality constant in the error term has different sign). The resulting discretization method, seenin(8.52), isoftenreferredtoasaBackwardEulerscheme(afirst-orderscheme, just like ForwardEuler). To summarize, using a forward difference for the first equation and a backward difference for the second equation results in a much better method than just using forwarddifferences inbothequations.
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