Any equation that expresses the functional dependence of a variable y on its arguments xi(i = 1, 2, …) and the derivatives of y with respect to those arguments, is called a differential equation. Physical systems are almost always described by such equations. For example, a wave f(x, t) travelling with velocity in the x-direction obeys the wave equation
while the motion of a simple pendulum of length l performing small oscillations θ satisfies
where g is a constant. Equation (14.1a) contains partial derivatives because f is a function of more than one variable, and the equation is therefore called a partial differential equation (PDE). These will be discussed in Chapter 16. On the other hand, in Equation (14.1b) the quantity θ depends on the single variable t, and the equation is called an ordinary differential equation (ODE). It is these equations that are the subject of this chapter and the next.
In what follows, we will usually refer to the independent variable as x and the corresponding dependent variable as y(x). Thus, in general, an ordinary differential equation is of the form
(14.2)
Examples of ODEs are:
and
It is convenient to classify ordinary differential equations by their order, degree and linearity. The order is defined as the order of the highest derivative in the equation. Thus, Equations (14.3a), (14.3b) and (14.3c) are first, second and third order, respectively. The degree of the equation is defined as the power to which the highest order derivative is raised after the equation is rationalised, that is, only integer powers remain. Thus, (14.3a) and (14.3b) are both first degree equations. Equation (14.3c) is of second degree because when the equation is rationalised, it becomes
so that the highest derivative is d3y/dx3 and it is raised to power 2. Finally, any ODE of order n is said to be linear if it is linear in the dependent variable y and its first n derivatives. If this is not true, the equation is said to be non-linear. Equations (14.3a) and (14.3b) are therefore linear, whereas (14.1b) and (14.3c) are non-linear. The discussion in this chapter will be predominantly about linear ordinary differential equations. This is because, except in a few simple cases, non-linear equations are difficult to solve and one must usually resort to numerical methods. Nonetheless, they are important, especially in describing complex systems, such as the atmosphere, and they play a central role in the so-called chaotic systems.1
The solution of an ODE in the variables x and y is defined as a relation between the two variables, such that when substituted into the ODE gives an identity. It may be of the explicit form y = g(x), or the implicit form φ(x, y) = 0, and is obtained, in principle, by repeated integration. Since each such operation will introduce a constant of integration, we can deduce that a solution of an nth order ordinary differential equation cannot be a general solution unless it contains n arbitrary constants. In physical situations, these constants are fixed by specifying boundary conditions, that is, by requiring that y and/or its derivative has specific values at given points. For example, the linear second-order equation
has the general solution
which may be verified by direct substitution. A and B are two arbitrary constants, as expected for a second-order equation. To determine these, we could specify the values of y at two values of x. Thus, if we were to require that y = 0 when x = 0 and y = 1 when x = 1, then
which gives
and hence the specific solution is
Different boundary conditions lead of course to different solutions.
In the following sections we will discuss a number of methods to solve various types of ordinary differential equations, starting with first-order equations of the first degree. First-order equations of higher than first degree rarely occur in physical science and will not be discussed here.
The general form for equations of this type is
Solutions of (14.4) are found relatively easily if F(x, y) has specific simple forms and we will discuss some of these below.
If F(x, y) = f(x) is a function of x only, then (14.4) takes the form
(14.5a)
and may be directly integrated to give
where c is an arbitrary constant. If F(x, y) = f(y) is a function of y only, then we have
so that the solution
is again obtained by direct integration.
One frequently meets applications in which the right-hand side of (14.4) is a product F(x, y) = f(x)g(y), so that it becomes
If either f or g is a constant, then (14.6a) can be evaluated by direct integration, as in Section 14.1.1. Otherwise, rearranging (14.6a) gives
that is, the variables have been separated. Integrating then gives
(14.6b)
which expresses y implicitly in terms of x. In doing the integration one must of course remember to include the constant of integration.
In Section 7.2.4, a function f(x1, x2, …, xn) was defined to be homogeneous of degree k if
where λ is an arbitrary parameter. Thus, for example, the function f(x, y) = x3y + x2y2 is a homogeneous function of degree 4, whereas f(x, y) = xy + x/y is inhomogeneous because it does not satisfy this requirement. Homogeneous equations are of the form
where g and h are both homogeneous functions of the same degree. The key property is that the right-hand side of (14.7) can be written as a function of the ratio z ≡ y/x, i.e.
and
Substituting these equations into (14.7) gives
(14.8a)
This is a separable equation, which can be integrated to give
from which z and hence y can be found.
Some equations, although not obviously homogeneous at first sight, may be reduced to this form by suitable transformation of variables. One type that commonly occurs is given in Example 14.3(b).
If
then the first-order equation (14.4) may be written
If it is possible to find a function f(x, y) such that
then, by Equation (7.17a),
is an exact differential and (14.9) is called an exact equation. We then have
and comparing this with (14.9), we see that the latter has the implicit solution
where c is an integration constant. To see whether a function f(x, y) that satisfies (14.10) exists, we note that (14.10) implies
and hence
so that (14.12) is a necessary condition for a relation of the form (14.10) to exist. It can also be shown to be a sufficient condition. If it is satisfied, then integrating A with respect to x at fixed y, and B with respect to y at fixed x gives the results
and
where f1(y) and f2(x) are arbitrary functions, which may be identified up to a constant by comparing (14.13a) and (14.13b). Alternatively, (14.13a) may be differentiated with respect to y at fixed x and compared to ∂f/∂y = B to determine c1(y). The solution is then given by (14.11), as we shall illustrate by an example.
First-order linear ODEs are equations of the form
where p(x) and q(x) are given functions of x, or constants. If the equation is exact, it may be solved by the method of Section 14.1.4. If it is not of this form, that is, it is inexact, it may in principle be solved by multiplying by a function I(x), to be determined below, called an integrating factor. We then obtain
and I(x) is chosen so that the left-hand side of (14.15a) is equal to d[I(x)y]/dx, i.e.,
Equating the linear terms in y in this equation gives
which on integrating gives (providing y ≠ 0) the result
for the integrating factor. Finally, from (14.15a) and (14.15b),
and hence the general solution for y is given by
with I(x) given by (14.16).
Linear ODEs are of the form
(14.18)
where the ai(x) (i = 0, 1, 2, …, n) and f(x) are given functions of x. For n = 1, this reduces to (14.14), and the method of solution has been discussed in Section 14.1.5. In this section we will consider the case of arbitrary n where the ai(x) are constants, that is, ai(x) = ai so that
Other types of linear ODE will be discussed in Section 14.2.4 and Chapter 15.
The solution of equations of the type (14.19) is found in three steps. Firstly, one finds the general solution y0 to the reduced equation obtained by setting f(x) = 0 in (14.19), i.e.
The function y0 contains n free parameters c1, c2, ⋅⋅⋅, cn, since it is the general solution to an equation of order n. It is called the complementary function. The second step is to find a particular solution Y(x) of (14.19), so that
The function Y(x) is called the particular integral. Finally, one adds the complementary function to the particular integral to obtain
On substituting (14.21) into (14.19) and using (14.20a) and (14.20b), one easily shows that it is a solution; and since it contains n arbitrary parameters, it is the general solution.
It is relatively easy to find complementary functions for a specific equation, as we shall show in Section 14.2.1, but there is no general method for finding particular integrals for a given f(x). In Sections 14.2.2 and 14.2.3 we shall discuss two methods that work in a wide variety of cases.
As defined above, complementary functions are the general solutions of reduced equations of the form
Equations like (14.22) are often called homogeneous.2 These equations have the important property that if y1(x) and y2(x) are solutions, then any linear combination
is also a solution. This result follows directly on substituting (14.23) into the left-hand side of (14.22). In what follows, we shall discuss second-order equations in some detail, because they are by far the most important in physics applications; then we briefly address the extension to higher-orders.
The second-order homogeneous equation is
where we have relabelled the constants for later convenience. As a trial solution we will take
since with this form, differentiating y just multiplies it by a constant m. Substituting (14.25) in (14.24) gives
and (14.25) is a solution of (14.24) when the bracket vanishes, that is, when m is a root of the auxiliary equation
(14.26)
This has roots
(14.27)
and three cases must be distinguished.
If b2 = 4ac, then
so that (14.28a) would contain only one arbitrary constant A ≡ A1 + A2 and so cannot be the general solution. In this case, a second solution is obtained by writing
where u(x) is a function to be determined. Substituting into (14.24) then gives
However, using (14.29), we see that
so that the second term in (14.30) vanishes and we are left with the equation d2u/dx2 = 0, with solution
where again A1 and A2 are arbitrary constants. The general solution of (14.24) when the auxiliary equation has two equal roots is therefore
Finally, if b2 < 4ac, there are two complex solutions
where α = −b/2a and . Nonetheless, a real solution of (14.24) is obtained by writing
where A is a complex constant. Using (14.31) and ez = cos z + isin z for any z, this can be rewritten in the form
where and are two arbitrary real constants.
This exhausts the types of solution for homogeneous second-order linear equations with constant coefficients.
In the cases of higher order equations (14.20a), the substitution y = emx leads to the auxiliary equation
(14.32)
This gives n roots,3 where degenerate and complex roots are treated in the same way as in the second-order case. In particular, if k roots m1, m2, ⋅⋅⋅, mk = m coincide, then the corresponding term in the solution, analogous to (14.28b), becomes
(14.33)
We now turn to the case where f(x) ≠ 0 in (14.19), again restricting the discussion to the case of constant coefficients. We have already stated that the general solution of such an equation is the sum of the complementary function and a particular integral. The standard method for finding the complementary function has already been discussed, so it only remains to find the particular integral. Unfortunately, there is no general method for doing this, but there is a variety of methods, each of which is appropriate for a range of functions f(x). We will discuss two, starting with that known as the method of undetermined coefficients.
This method consists of assuming a trial form for the particular integral Y(x) that resembles f(x), but contains a number of free parameters. The trial function is then substituted into the differential equation and the parameters determined so that the equation is satisfied. It is most useful when f(x) contains only polynomials, exponentials, or sines and cosines. The rules for constructing the appropriate trial functions are as follows.
There are other methods for finding particular integrals, and by way of contrast we will discuss here the so-called D-operator method. This method has the advantage that it is not necessary to guess a trial function and the numerical coefficients multiplying the functional form of the particular integral are obtained automatically. However, it does require some experience in identifying which manipulations to use to obtain the solution.
The quantity D, defined by D ≡ d/dx, was introduced in Chapter 9, Section 9.3.2. It is a differential operator. That is, it only has a meaning when it acts on a function, which is always written to the right of D. Higher differential operators may be constructed from D. For example,
etc. We see that D satisfies the usual rules of algebra and so may be formally treated as an algebraic quantity, despite the fact that it cannot be evaluated as such to yield a numerical value. From the algebraic rules of differentiation it follows that if f(x) and g(x) are differentiable functions,
(14.36a)
and
(14.36b)
where c is a constant, and hence D is a linear operator (see Section 9.3.2).
In terms of D we may now write (14.19) as
where
is a polynomial operator in D of order n. Just as D may be formally treated as an algebraic quantity, so may a polynomial function of D, such as F(D), and in particular it may, in suitable cases, be factorised. Moreover the order of the factors is irrelevant provided the coefficients in (14.37) are constants. Thus, for example,
However, the order is relevant if the coefficients are functions of x. For example,
whereas
so
A number of useful results may be derived when the function f(x) = ekx, where k is a constant. For example, using the fact that Dnekx = knekx, it follows that
Similarly, since D2sin kx = −k2sin kx, it follows that
(14.38b)
and
If the exponential is multiplied by an arbitrary function V(x), then by considering the terms D[ekxV(x)], D2[ekxV(x)], etc. in succession, the result (14.38a) may be generalised in a straightforward way to
Finally, in Chapter 3 we defined indefinite integration as the inverse operation of differentiation. In an analogous way we now defined the inverse operator D− 1 by
with
(14.40)
Also by analogy with the notation Dn for successive differentiations, we will use D− n ≡ 1/Dn for the operation of n successive integrations.
We now return to the solution of equations of the type (14.19). If these are rewritten in the form (14.37a) and (14.37b), then a particular integral can be obtained by writing
(14.41)
provided we can interpret and evaluate the right-hand side, using the techniques introduced above. To illustrate this, consider the equation
In the D-operator formalism, this is written
giving the particular integral
We now have to decide how to handle the polynomial in the denominators, using the relations (14.38). If we use (14.38c) with k = 1, we have
Now we can again use (14.38c) to give
as the desired form for the particular integral.
A different technique is illustrated by considering the equation obtained by replacing cos x in (14.42) by xe2x. The particular integral is then
and using (14.38d) with k = 2 gives
The denominator can be expressed as partial fractions, to give
The point of this decomposition is that each fraction can be expanded as a binomial series
where higher derivatives are not required because when acting on x they will be zero. Using these expansions, (14.43) becomes
which is the desired result.
The D-operator method converts a differential equation to an algebraic equation for D. Another method that does something very similar is based on the use of Laplace transforms. The Laplace transform F(p) of a function f(x) is defined by
where the parameter p may in principle be complex, but in the discussion that follows we will take it to be real.
The Laplace transforms of many simple functions may be found by direct evaluation of the defining integral (14.44). Others may then be found by using easily proved general properties of the Laplace transform. These include: linearity,
where a and b are constants; and the shift theorem
If L[f(x)] = F(p), then L[eaxf(x)] = F(p − a).
A related version of this, called the translation property, is
where H(x) is the unit step function
For example, the translation property follows by considering the Laplace transform of
which has the same form as f(x) but moved a distance a along the x axis. If we let z = x − a, then
Using a combination of these properties, several useful examples of Laplace transforms may be obtained and are shown in Table 14.1. As an example, we shall derive the result for e− axcos (bx). Firstly,
Then, using the shift theorem,
We can also define an inverse Laplace transform, denoted L− 1, such that
It follows that LL− 1 = 1 and because L is linear, so is L− 1. Inverse transforms for some simple functions follow from the results of Table 14.1. Thus, since L[1] = 1/p, it follows that L− 1[1/p] = 1, but to find inverse transforms in general requires the techniques of complex variable theory and we will not discuss them here.
In order to use Laplace transforms to solve differential equations, we will also need the transforms of the differentials of a function y(x). For example, consider the Laplace transform of dy(x)/dx. From the definition (14.44), this is
Integrating by parts, this is
providing ye− px → 0 as x → ∞. So,
Likewise,
so that
where
This procedure may be repeated to obtain expressions for derivatives of any order. These can be used to convert a differential equation into an algebraic equation in F(p), and if the inverse transform L− 1 can be found, the solution of the equation for F(p) can be inverted, and a solution of the original equation ODE results. An advantage of the method is that it can easily incorporate boundary conditions on the function and its first derivative, as can be seen from (14.45). Its use is illustrated in Example 14.10.
Fourier transforms can similarly be used to convert a differential equation for y(x) into an algebraic equation for its Fourier transform. However, in contrast to Laplace transforms, their use is restricted to functions that tend to zero as |x| tends to infinity sufficiently rapidly for (13.45) to be satisfied. In these cases, it can be a useful technique, as illustrated in Problem 14.19, but we will not pursue this here.
It frequently happens that part of the expression for which the inverse transform L− 1 is to be found contains the product of two Laplace transforms. In this the case we can use the method of convolutions that was discussed in Chapter 13, Section 13.3.4 for Fourier transforms. Thus if gi(p) is the Laplace transform of fi(p), that is, if
where i = 1,2, then
and hence
where the convolution integral is
To prove (14.47a), we start from the definition (14.46) and form the product
where u and are dummy variables. Now letting , and rewriting in terms of the variables t and u, changes the limits on the integrals, giving
This corresponds to summing the vertical strips on Figure 14.2a. But from the work of Chapter 11, we know that we can equally sum the horizontal strips, as shown in Figure 14.2b, that is, we can reverse the order of integrations. Therefore the double integral may be written
and so (14.47a) follows, which completes the proof.
The discussion in Section 14.2 has been exclusively about linear equations with constant coefficients. However, some linear equations with variable coefficients ai(x) can be reduced to linear form with constant coefficients by a suitable transformation. Perhaps the best known of these is Euler's equation
On substituting x = et, one obtains
and
so that if f(x) becomes on changing variables, (14.48) becomes
This is a linear equation with constant coefficients and so may be solved by the methods of the last section. More generally, the nth order Euler equation
is reduced to a linear equation with constant coefficients by the same substitution x = et.
If f(x) = 0, then (14.50) with f(x) = 0 is
where A1, A2, …, An are arbitrary constants. On the other hand, if the roots are not distinct, this simple method fails to give the general solution, which can still be found using the substitution x = et.
14.1 Find the solution of the equations
14.2 Find the solutions of the equations
14.4 Find the solution of the equation
14.5 Find the solution of the equation
14.6 Establish whether each of the following equations is exact and find the solutions of those that are:
14.7 Find the solutions of the equations
14.8 Find the solutions of the equations
14.9 Find the solutions of the equations
14.10 Solve the non-linear equation
using the substitution z = y− 2.
14.11 Find the solution of the equations
14.12 Use the method of undetermined coefficients to find the complete solutions of the equations
14.13 Use the method of undetermined coefficients to find the complete solution of the equation
14.14 Find the complete solutions of the equations
14.15 Find the general solution of the equations
*14.16 Use the D-operator method to find the particular integrals for the equations
*14.17 Use the D-operator method to find the particular integral for the equation
14.18 Find the complete solution of the equation
14.19 A function φ satisfies the equation
where C is a constant andf(x) is an arbitrary function such that
Use the relation (13.53b) to show that
is a solution, where h(k) is the Fourier transform of f(x). What is the general solution?
*14.20 Use the Laplace transform method to find the solution of the equation
subject to the boundary conditions y(x) = −2 and y′(x) = 4 at x = 0.
*14.21 A one-dimensional system undergoes forced simple harmonic motion, with an equation of motion
where ω0 is the natural frequency of vibration and A is a constant. Solve for x(t) with the boundary conditions x(0) = 1 and x′(0) = 0, using the Laplace transform method.
14.22 Solve Problem 14.21 using the method of undetermined coefficients.
*14.23 Find the solution of the equation
subject to the boundary conditions y(0) = 1 and y′(0) = 0, where h(x) is an unknown function of x.
*14.24 Solve the equation
*14.25 Find the complete solution of the equation
*14.26 If x = et, show that
Hence show that the Euler equation (14.50) is reduced to a linear equation with constant coefficients for any order n by the substitution x = et, as asserted in the text.