Page - 125 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Image of the Page - 125 -
Text of the Page - 125 -
4.3 OscillatingOne-DimensionalSystems 125
Fig.4.15 Sketchof aone-dimensional, oscillatingdynamic system(without friction)
of thebodyon thex axis, alongwhich thebodymoves. Thespring isnot stretched
whenx D 0, so the force is zero, andx D 0 is hence the equilibriumposition of
the body. The spring force is kx, wherek is a constant to bemeasured. We as-
sume that there arenoother forces (e.g., no friction). Newton’s 2nd lawofmotion
F Dma thenhasF D kx andaD Rx,
kxDmRx; (4.41)
whichcanbe rewrittenas
RxC!2xD0; (4.42)
by introducing!Dpk=m (which isverycommon).
Equation (4.42) is a second-order differential equation, and thereforewe need
two initial conditions, oneon thepositionx.0/andoneon thevelocityx0.0/. Here
wechoose thebody tobeat rest, butmovedaway fromits equilibriumposition:
x.0/DX0; x0.0/D0:
Theexact solutionof (4.42)with these initial conditions isx.t/DX0cos!t. This
caneasilybeverifiedbysubstituting into (4.42)andchecking the initial conditions.
The solution tells that such a spring-mass system oscillates back and forth as de-
scribedbyacosinecurve.
Thedifferential equation (4.42)appears innumerousother contexts. Aclassical
example is a simplependulumthatoscillates backand forth. Physicsbooksderive,
fromNewton’s second lawofmotion, that
mL 00Cmgsin D0;
wherem is themass of the bodyat the endof a pendulumwith lengthL,g is the
acceleration of gravity, and is the angle the pendulummakeswith the vertical.
Consideringsmall angles , sin , andweget (4.42)withxD ,!Dpg=L,
x.0/ D , andx0.0/ D 0, if is the initial angle and the pendulum is at rest at
t D0.
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