# §3.7 Ordinary Differential Equations

## §3.7(i) Introduction

Consideration will be limited to ordinary linear second-order differential equations

3.7.1

where , , and are analytic functions in a domain . If the differential equation is homogeneous, otherwise it is inhomogeneous. For applications to special functions , , and are often simple rational functions.

For general information on solutions of equation (3.7.1) see §1.13. For classification of singularities of (3.7.1) and expansions of solutions in the neighborhoods of singularities, see §2.7. For an introduction to numerical methods for ordinary differential equations, see Ascher and Petzold (1998), Hairer et al. (1993), and Iserles (1996).

## §3.7(ii) Taylor-Series Method: Initial-Value Problems

Assume that we wish to integrate (3.7.1) along a finite path from to in a domain . The path is partitioned at points labeled successively , with , .

By repeated differentiation of (3.7.1) all derivatives of can be expressed in terms of and as follows. Write

3.7.2,

with

3.7.3

Then for ,

Write , , expand and in Taylor series (§1.10(i)) centered at , and apply (3.7.2). Then

3.7.5

where is the matrix

3.7.6

and is the vector

3.7.7

with

3.7.9

If the solution that we are seeking grows in magnitude at least as fast as all other solutions of (3.7.1) as we pass along from to , then and may be computed in a stable manner for by successive application of (3.7.5) for , beginning with initial values and .

Similarly, if is decaying at least as fast as all other solutions along , then we may reverse the labeling of the along and begin with initial values and .

## §3.7(iii) Taylor-Series Method: Boundary-Value Problems

Now suppose the path is such that the rate of growth of along is intermediate to that of two other solutions. (This can happen only for inhomogeneous equations.) Then to compute in a stable manner we solve the set of equations (3.7.5) simultaneously for , as follows. Let be the band matrix

( and 0 being the identity and zero matrices of order .) Also let denote the vector

3.7.11

and the vector

Then

3.7.13

This is a set of equations for the unknowns, and , . The remaining two equations are supplied by boundary conditions of the form

where the ’s, ’s, and ’s are constants.

If, for example, , then on moving the contributions of and to the right-hand side of (3.7.13) the resulting system of equations is not tridiagonal, but can readily be made tridiagonal by annihilating the elements of that lie below the main diagonal and its two adjacent diagonals. The equations can then be solved by the method of §3.2(ii), if the differential equation is homogeneous, or by Olver’s algorithm (§3.6(v)). The latter is especially useful if the endpoint of is at , or if the differential equation is inhomogeneous.

It will be observed that the present formulation of the Taylor-series method permits considerable parallelism in the computation, both for initial-value and boundary-value problems.

For further information and examples, see Olde Daalhuis and Olver (1998, §7) and Lozier and Olver (1993). General methods for boundary-value problems for ordinary differential equations are given in Ascher et al. (1995).

## §3.7(iv) Sturm–Liouville Eigenvalue Problems

Let be a finite or infinite interval and be a real-valued continuous (or piecewise continuous) function on the closure of . The Sturm–Liouville eigenvalue problem is the construction of a nontrivial solution of the system

3.7.16

with limits taken in (3.7.16) when or , or both, are infinite. The values are the eigenvalues and the corresponding solutions of the differential equation are the eigenfunctions. The eigenvalues are simple, that is, there is only one corresponding eigenfunction (apart from a normalization factor), and when ordered increasingly the eigenvalues satisfy

3.7.17.

If is on the closure of , then the discretized form (3.7.13) of the differential equation can be used. This converts the problem into a tridiagonal matrix problem in which the elements of the matrix are polynomials in ; compare §3.2(vi). The larger the absolute values of the eigenvalues that are being sought, the smaller the integration steps need to be.

For further information, including other methods and examples, see Pryce (1993, §2.5.1).

## §3.7(v) Runge–Kutta Method

The Runge–Kutta method applies to linear or nonlinear differential equations. The method consists of a set of rules each of which is equivalent to a truncated Taylor-series expansion, but the rules avoid the need for analytic differentiations of the differential equation.

### ¶ First-Order Equations

For the standard fourth-order rule reads

3.7.18

where and

3.7.19

The order estimate holds if the solution has five continuous derivatives.

### ¶ Second-Order Equations

For the standard fourth-order rule reads

where

3.7.21

The order estimates hold if the solution has five continuous derivatives.

An extensive literature exists on the numerical solution of ordinary differential equations by Runge–Kutta, multistep, or other methods. See, for example, Butcher (1987), Dekker and Verwer (1984, Chapter 3), Hairer et al. (1993, Chapter 2), and Hairer and Wanner (1996, Chapter 4).