Page - 160 - in Programming for Computations β Python - A Gentle Introduction to Numerical Simulations with Python
Image of the Page - 160 -
Text of the Page - 160 -
160 4 SolvingOrdinaryDifferentialEquations
Filename:osc_BE.py.
Exercise4.18: SetupaForwardEuler schemefornonlinearanddamped
oscillations
Derive a Forward Euler method for the ODE system (4.68)β(4.69). Compare
themethod with the Euler-Cromer scheme for the sliding friction problem from
Sect. 4.3.11:
1. Does theForwardEuler schemegivegrowingamplitudes?
2. Is theperiodofoscillationaccurate?
3. What is the required time step size for the twomethods to have visually coin-
cidingcurves?
Filename:osc_FE_general.py.
Exercise4.19:Discretizean initial condition
Assume that the initial condition onu0 is nonzero in the finite differencemethod
fromSect. 4.3.12:u0.0/DV0. Derive the special formula foru1 in this case.
Filename:ic_with_V_0.pdf.
OpenAccess This chapter is distributedunder the termsof theCreativeCommonsAttribution-
NonCommercial 4.0 International License (http://creativecommons.org/licenses/by-nc/4.0/),
which permits any noncommercial use, duplication, adaptation, distribution and reproduction
in anymediumor format, as long as you give appropriate credit to the original author(s) and the
source, a link isprovided to theCreativeCommons licenseandanychangesmadeare indicated.
The images or other third partymaterial in this chapter are included in the workβs Creative
Commons license, unless indicated otherwise in the credit line; if suchmaterial is not included
in theworkβs Creative Commons license and the respective action is not permitted by statutory
regulation, users will need to obtain permission from the license holder to duplicate, adapt or
reproduce thematerial.
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