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

Page - 158 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Image of the Page - 158 -

Image of the Page - 158 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Text of the Page - 158 -

158 4 SolvingOrdinaryDifferentialEquations c) A centered difference approximation to the derivative, as explored in Exer- cise4.12, canbewritten u0.tnC 1 2 t/ u.tnC t/ u.tn/ t : Write up theTaylor series foru.tn/ around tn C 12 t and theTaylor series for u.tn C t/ around tn C 12 t. Subtract the two series, solve with respect to u0.tnC 12 t/, identify thefinitedifferenceapproximationandtheerror termson the right-handside, andwriteup the leadingorder error term. Howis this term compared to theones for the forwardandbackwarddifferences? d) Canyouuse the leadingordererror terms ina)-c) toexplain thevisualobserva- tions in thenumericalexperiment inExercise4.12? e) Find the leadingorder error term in the following standardfinite differenceap- proximation to the second-orderderivative: u00.tn/ u.tnC t/ 2u.tn/Cu.tn t/ t : Hint Expressu.tnΛ™ t/viaTaylorseriesandinsert theminthedifferenceformula. Filename:Taylor_differences.pdf. Exercise4.14:UseaBackwardEuler schemeforoscillations Consider(4.43)–(4.44)modelinganoscillatingengineeringsystem.This2 2ODE systemcanbesolvedbytheBackwardEulerscheme,whichisbasedondiscretizing derivativesby collecting informationbackward in time. More specifically,u0.t/ is approximatedas u0.t/ u.t/ u.t t/ t : A general vector ODE u0 D f.u;t/, where u and f are vectors, can use this approximationas follows: un un 1 t Df.un;tn/; which leads toanequation for thenewvalueun: un tf.un;tn/Dun 1 : Forageneralf , this is a systemofnonlinearalgebraic equations. However, theODE(4.43)–(4.44)is linear, soaBackwardEuler schemeleads to a systemof twoalgebraicequations for twounknowns: un tvn Dun 1; (4.84) vnC t!2un Dvn 1 : (4.85)
back to the  book Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python
Title
Programming for Computations – Python
Subtitle
A Gentle Introduction to Numerical Simulations with Python
Authors
Svein Linge
Hans Petter Langtangen
Publisher
Springer Open
Date
2016
Language
English
License
CC BY-NC 4.0
ISBN
978-3-319-32428-9
Size
17.8 x 25.4 cm
Pages
248
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