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

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

Image of the Page - 247 -

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

Text of the Page - 247 -

8.4 Oscillating1DSystems:ASecondOrderODE 247 Fig. 8.23 Illustration of a centered difference approximation to the derivative first thinkingofa scalarODE, is to forma centereddifferenceapproximationto the derivativebetween two timepoints: u′(tn+ 1 2 Δt)≈ u n+1 −un Δt . Thecentereddifferenceformula isvisualized inFig.8.23.Theerror in thecentered difference is proportional toΔt2, one order higher than the forward and backward differences,which means that if we halveΔt, the error is more effectively reduced in the centered difference since it is reduced by a factor of four rather than two. The problem with such a centered scheme for the general ODEu′ = f(u,t) is thatweget un+1−un Δt =f(un+12,t n+12), which leads to difficulties since we do not know whatun+12 is. However, we can approximatethevalueoff betweentwotimelevelsbythearithmeticaverageof the valuesat tn and tn+1: f(un+ 1 2,t n+12)≈ 1 2 (f(un,tn)+f(un+1,tn+1)). This results in un+1 −un Δt = 1 2 (f(un,tn)+f(un+1,tn+1)), which in general is a nonlinear algebraic equation for un+1 if f(u,t) is not a linear functionofu.Todealwith theunknowntermf(un+1,tn+1),withoutsolving
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