We use cookies to enhance your experience on our website. By continuing to use our website, you are agreeing to our use of cookies. You can change your cookie settings at any time. Find out more
Oxford University Press
  OUP Worldwide
Search:
Advanced Search
Printer-Friendly View
You are here: Home > Academic, Professional, & General > Boudreau and Swanson: Applied Computational Physics > Chapter 11: Ordinary Differential Equations

Companion Website

Boudreau and Swanson: Applied Computational Physics

Chapter 11: Ordinary Differential Equations

example code (.tgz)

  • PROJECTILE: solves the classical problem of projectile motion, including friction.
  • HARMONIC0: solves the harmonic oscillator problem by integrating the equations of motion. The program in HARMONIC0 generates the equations of motion from the Hamiltonian, and then integrates them.
  • HAMILTONIAN: generates equations of motion of a particle in an rN potential, and integrates them. Works well for N > - 2.

    usage: hamiltonian [N/def=+2]

  • LORENZ: integrates the nonlinear ODEs of the Lorenz model and displays it using Coin graphics.
  • SPHERICALPENDULUM generates and integrates the equations of motion for a spherical pendulum
  • STARK: generates the equations of motion for the classical Stark effect, in other words, a hydrogen atom in an external electric field. The equations of motion are integrated and the resulting solution is animated.
  • RELATIVISTICKEPLER: generates equations of motion for the relativistic Kepler problem, for which the orbit does not close. The solution is animated using Coin graphics.
  • SYMPLECTIC: applies symplectic integration to the harmonic oscillator problem.
  • XBALLS3: solves the problem of coupled oscillations by generating, from the Hamiltonian, equations of motion and then integrating them. The solution is both plotted and animated using Coin graphics.
  • CLASSICALHELIUM: an animation of the classical helium atom motion, using an effective Hamiltonian valid for special boundary conditions. The effective Hamiltonian is used to generate the equations of motion, which are then integrated. The solution is animated using Coin graphics.
  • THEDEUTERON: integrates the radial wave equation for the proton-neutron system (deuteron). Keep hitting the "n" key until the wavefunction becomes regular at infinity. This yields the quantized energy.

About this book
Price, bibliographic details, and more information on the book