Approximation

Solving ODEs Numerically

Differential equations are a powerful tool in theoretical physics. Many relationships among physical quantities can be expressed by specifying rates of change in terms of values. These relationships may then be used to generate solutions for both general and specific cases using mathematical processing tools. Sometimes, ODEs can be solved analytically. (See for example, the exponential method for linear ODEs, and approach that is very powerful for studying small oscillations.) However, in many cases, no analytic solution is known. In that case, we have to resort to a variety of numerical (approximate) methods.

If we have to solve the equations for many values of the parameters or starting conditions, it may be useful to put the differential equation in dimensionless or reduced dimensional form. This allows the numerical solution to be as general as it possibly can be.

Typically, to solve an ODE numerically, the independent continuous variable that one differentiates with respect to (typically time or space) is replaced by a set of small steps with a finite size increment. The Taylor series is then used to express the derivatives in terms of differences and the equation turned into a stepping rule for generating the values of the desired function at a larger value of the independent variable in terms of the values at smaller values. Thus, if we are solving Newton's second law, we might find the value of the position and velocity at a time t + Δt in terms of functions of the position and velocity at a time t. For an example, see the problem on applying the Euler method to solving the motion of a falling body.

There are a variety of techniques available for solving differential equations numerically. The two most straightforward are:

  1. The Euler method
  2. The Half-Step method

RETURNS

University of MarylandPhysics DepartmentPhysics 374 Home


This page prepared by

Edward F. Redish
Department of Physics
University of Maryland
College Park, MD 20742
Phone: (301) 405-6120
Email: redish@umd.edu

Last revision 24. September, 2005.