searching for an elusive analytical solution, it can be more efficient to find the unique
solution of a well-behaved (well-posed) ODE problem using numerical techniques.
Any numerical method of solution for an initial-value or a boundary-value problem
involves discr etizing the continuous time domain (or space) into a set of finite
discrete points (equally spaced or unequally spaced) or nodes at which we find the
magnitude of yðtÞ. The value of y evolves in time according to the slope of the curve
prescribed by the right-hand side of the ODE, dy=dt ¼ fðt; yÞ. The solution at each
node is obtained by marching step-wise forward in time. We begin where the solution
is known, such as at t = 0, and use the known solutions at one or more nearby points
to calculate the unknown solution at the adjacent point. If a solution is desired at an
intermediate point that is not a node, it can be obtained using interpolation. The
numerical solution is only approximate because it suffers from an accumulation of
truncation errors and round-off errors.
In this chapter, we will discuss several classical and widely used numerical
methods such as Euler methods, Runge–Kutta methods, and the predictor–corrector
methods based on the Adam s–Bashforth and Adams–Moulton methods for solving
ordinary differential equations. For each of these methods, we will investigate the
truncation error. The order of the truncation error determines the convergence rate
of the error to zero and the accuracy limitations of the numerical method. Even when
a well-behaved ODE has a bounded solution, a numerical solver may not necessarily
find it. The conditions, or values of the step size for which a numerical method is
stable, i.e. conditions under which a bounded solution can be found, are known as
numerical stability criteria. These depend upon both the nature of the differential
problem and the characteristics of the numerical solution method. We will consider
the stability issues of each method that we discuss.
Because we are focused on introducing and applying numerical methods to solve
engineering problems, we do not dwell on the rigors of the mathematics such as
theorems of uniqueness and existence and their corresponding proofs. In-depth
mathematical analyses of numerical methods are offered by textbooks such as
Numerical Analysis by Burden and Faires (2005), and Numerical Mathematics by
Grasselli and Pelinovsky (2008). In our discussion of numerical methods for ODEs,
it is assumed (unless mentioned otherwise) that the dependent variable yðtÞ is
continuous and fully differentiable within the domain of interest, the derivatives of
yðtÞ of successive orders y
0
tðÞ; y
00
tðÞ; ... are continuous within the defined domain,
and that a unique bounded solution of the ODE or ODE system exists for the
boundary (initial) conditions specified.
In this chapter, we assume that the round-off error is much smaller than the
truncation error. Accordingly, we neglect the former as a component of the overall
error. When numerical precision is less than double, round-off error can sizably
contribute to the total error, decreasing the accuracy of the solution. Since
MATLAB uses double precision by default and all our calculations will be per-
formed using MATLAB software, we are justified in neglecting round-off error. In
Sections 7.2–7.5, methods to solve initial-value problems consisting of a single
equation or a set of coupled equations are discussed in detail. The numerical method
chosen to solve an ODE problem will depend on the inherent properties of the
equation and the limitations of the ODE solver. How one should approach stiff
ODEs, which are more challenging to solve, is the topic of discussion in Section 7.6.
Section 7.7 covers boundary-value problems and focuses on the shooting method, a
solution technique that converts a boundary-value problem to an initial-value
problem and uses iterative techniques to find the solution.
411
7.1 Introduction