Pendulum Exercise
Solving differential equations on the computer demands that you approximate
the continuous-time evolution with a discrete time step. Accuracy, stability,
and fidelity are the three criteria for a good algorithm. We study three
methods used in different contexts for solving the problem of a simple
pendulum.
- The Euler method, very crude and unstable for simple systems,
is actually often used in solving nonlinear partial-differential equations.
- The Verlet method is used in the study of Hamiltonian dynamical systems.
Fidelity is its strong point: it is not as accurate as more sophisticated
methods, but the dynamics is an exact solution (up to rounding errors) of an
approximate Hamiltonian: it retains volume in phase space, and exactly
conserves an approximation to the energy.
- Sophisticated packages for adaptively solving differential equations,
which switch between different orders and between explicit and implicit
methods, are appropriate for most small systems of ordinary differential
equations.
Links
James P. Sethna,
Christopher R. Myers.
Last modified: August 24, 2006
Statistical Mechanics: Entropy, Order Parameters, and Complexity,
now available at
Oxford University Press
(USA,
Europe).