
6
Introduction to numerical methods
Digital computers are used extensively in the analysis of dynamical systems. The equations
describing the motion of a system are partly dynamic and partly kinematic in nature. In either
case, they take the form of ordinary differential equations which are nonlinear, in general.
These differential equations are usually written with time as the independent variable, and
time is assumed to vary in a continuous manner from some initial value, frequently zero, to
a final value.
In any representation using digital computers, the time can assume only a finite number of
discrete values. The differential equations of the system are replaced by difference equations.
The solutions of these difference equations are not the same, in general, as the solutions
of the corresponding differential equations at the given discrete times, thereby introducing
computational errors. More importantly, if parameters such as step size are not properly
chosen, a given numerical procedure may produce an apparent unstable response for a
system that is actually stable.
In this chapter, we shall begin with a brief discussion of the interpolation and extrapolation
of digital data. Then we will proceed with a discussion of various algorithms for the numer-
ical integration of ordinary differential equations. The errors arising from these numerical
procedures will be discussed, and questions of numerical stability will be considered.
Another important consideration in the numerical analysis of dynamical systems lies in
the proper representation of geometrical constraints. Even if the physical system is stable,
there may be numerical instabilities resulting from the method of applying constraints. We
shall discuss methods of representing constraints and will analyze their stability.
Finally, a topic of great interest is that of error detection and correction. One approach
is to use integrals of the motion, that is, functions whose values remain constant during the
motion. Examples are the energy or angular momentum functions associated with certain
systems. Any deviations from the expected values of these functions serve as indicators of
errors and are the starting point for possible corrections. These possibilities will be discussed.
6.1 Interpolation
Polynomial approximations
Consider a function of time f (t) whose values are given at the (n + 1) distinct points
t
0
, t
1
,...,t
n
. It is always possible to find an interpolating polynomial of degree n which