# Mathematical methods for economic theory

Martin J. Osborne

## 8.6 Second-order differential equations

### General form

Definition
A second-order ordinary differential equation is an ordinary differential equation that may be written in the form
x"(t) = F(tx(t), x'(t))
for some function F of three variables.

### Equations of the form x"(t) = F(t, x'(t))

An equation of the form
x"(t) = F(tx'(t)),
in which x(t) does not appear, can be reduced to a first-order equation by making the substitution z(t) = x'(t).
Example
Let u be a function of a single variable, with the interpretation that u(w) is the utility of an individual with wealth w. The function ρ defined by
ρ(w) = −wu"(w)/u'(w)
is known as the Arrow-Pratt measure of relative risk aversion. (If ρ(w) for the function u exceeds ρ(w) for the function v for all w then u reflects a greater degree of risk-aversion than does v.)

What utility functions have a degree of risk-aversion that is independent of the level of wealth? That is, for what utility functions u do we have

a = −wu"(w)/u'(w) for all w
for some number a?

This equation is a second-order differential equation in which the term u(w) does not appear. (The variable is w, rather than t.) Define z(w) = u'(w). Then we have

a = −wz'(w)/z(w)
or
z'(w) = −az(w)/w,
a separable first-order ordinary differential equation. Making the substitution y = z(w), so that dy = z'(w)dw, and integrating, the equation becomes
∫(1/y)dy = −a∫(1/w)dw,
so that
ln y = −aln w + C,
or
ln z(w) = −aln w + C,
or
z(w) = Cwa.
Now, z(w) = u'(w), so to get u we need to integrate:
u(w) =
 Cln w + B if a = 1 Cw1−a/(1 − a) + B if a ≠ 1.
We conclude that a utility function with a constant degree of relative risk-aversion equal to a takes this form.

### Linear second-order equations with constant coefficients

Definition
A linear second-order ordinary differential equation with constant coefficients is a second-order ordinary differential equation that may be written in the form
x"(t) + ax'(t) + bx(t) = f(t)
for a function f of a single variable and numbers a and b. The equation is homogeneous if f(t) = 0 for all t.
Suppose that x and y are solutions of the equation
x"(t) + ax'(t) + bx(t) = f(t),
which we refer to subsequently as the “original equation”. Define z(t) = y(t) − x(t) for all t. Then z"(t) + az'(t) + bz(t) = [y"(t) + ay'(t) + by(t)] − [x"(t) + ax'(t) + bx(t)] = f(t) − f(t) = 0. That is, z is a solution of the homogeneous equation
x"(t) + ax'(t) + bx(t) = 0.
Conversely, let x be a solution of the original equation, let z be a solution of the homogeneous equation, and define y(t) = x(t) + z(t) for all t. Then y is a solution of original equation.

Thus we have the following result.

Proposition
Let x be a solution of the linear second-order ordinary differential equation with constant coefficients
x"(t) + ax'(t) + bx(t) = f(t).
Then y is a solution of this equation if and only if y(t) = x(t) + z(t) for all t, where z is a solution of the (homogeneous) equation
x"(t) + ax'(t) + bx(t) = 0.
The practical importance of this result is that the set of all solutions of the original equation may be found by finding one solution of this equation and adding to it the general solution of the homogeneous equation. That is, we may use the following procedure to solve the original equation.
Procedure for finding general solution of linear second-order ordinary differential equation with constant coefficients
The general solution of the differential equation
x"(t) + ax'(t) + bx(t) = f(t)
may be found as follows.
1. Find the general solution of the associated homogeneous equation x"(t) + ax'(t) + bx(t) = 0.
2. Find a single solution of the original equation x"(t) + ax'(t) + bx(t) = f(t).
3. Add together the solutions found in steps 1 and 2.
I now explain how to perform the first two steps and illustrate step 3.

#### 1. Find the general solution of a homogeneous equation

You might guess, based on the solutions we found for first-order equations, that the homogeneous equation has a solution of the form x(t) = Aert. Let's see if it does. If x(t) = Aert then x'(t) = rAert and x"(t) = r2Aert, so that
 x"(t) + ax'(t) + bx(t) = r2Aert + arAert + bAert = Aert(r2 + ar + b).
Thus for x(t) to be a solution of the equation we need
r2 + ar + b = 0.
This equation is knows as the characteristic equation of the differential equation. If a2 > 4b this equation has two distinct real roots, if a2 = 4b it has a single real root, and if a2 < 4b it has two complex roots.

Suppose that a2 > 4b, so that the characteristic equation has two distinct real roots, say r and s. We have shown that both x(t) = Aert and x(t) = Best, for any values of A and B, are solutions of the equation. Thus also x(t) = Aert + Best is a solution. It can be shown, in fact, that every solution of the equation takes this form.

The cases in which the characteristic equation has a single real root (a2 = 4b) or complex roots (a2 < 4b) require slightly different analyses, with the following conclusions.

Proposition
Consider the homogeneous linear second-order ordinary differential equation with constant coefficients
x"(t) + ax'(t) + bx(t) = 0.
The general solution of this equation depends on the character of the roots of the characteristic equation r2 + ar + b = 0 as follows.
Distinct real roots
If a2 > 4b, in which case the characteristic equation has distinct real roots, say r and s, the general solution of the equation is
Aert + Best.
Single real root
If a2 = 4b, in which case the characteristic equation has a single root, say r, the general solution of the equation is
(A + Bt)ert,
where r = −(1/2)a is the root.
Complex roots
If a2 < 4b, in which case the characteristic equation has complex roots, the general solution of the equation is
(Acos(βt) + Bsin(βt))eαt,
where α = −a/2 and β = √(b − a2/4). This solution may alternatively be expressed as
Ceαtcos(βt + ω),
where the relationships between the constants C, ω, A, and B are A = C cos ω and B = −C sin ω.
Source
For a proof, see Coddington (1961), Theorem 1 on p. 51 and Theorem 5 on p. 58, and Boyce and DiPrima (1969), pp. 106–116.
You may be asking yourself how it is possible that trigonometric functions (sin and cos) appear in the solutions. The answer lies in fact that
eix = cos x + isin x for all x,
where i is the square root of −1. For details, see Boyce and DiPrima (1969), pp. 106–116.
Example
Consider the differential equation
x"(t) + x'(t) − 2x(t) = 0.
The characteristic equation is
r2 + r − 2 = 0
so the roots are 1 and −2. That is, the roots are real and distinct. Thus the general solution of the differential equation is
x(t) = Aet + Be−2t.
Example
Consider the differential equation
x"(t) + 6x'(t) + 9x(t) = 0.
The characteristic equation has a single real root, −3. Thus the general solution of the differential equation is
x(t) = (A + Bt)e−3t.
Example
Consider the equation
x"(t) + 2x'(t) + 17x(t) = 0.
The characteristic roots are complex. We have a = 2 and b = 17, so α = −1 and β = 4. Thus the general solution of the differential equation is
[A cos(4t) + B sin(4t)]et.

#### 2. Find a solution of a nonhomogeneous equation

Consider the nonhomogeneous equation
x"(t) + ax'(t) + bx(t) = f(t).
If f(t) is a constant, say c, x(t) = c/b is a solution if b ≠ 0, x(t) = ct/a is a solution if b = 0 and a ≠ 0, and x(t) = ct2/2 is a solution if a = b = 0. For other forms of f, a good technique to find a solution is to try a linear combination of f(t) and its first and second derivatives. If, for example, f(t) = 3t − 6t2, then f'(t) = 3 − 12t and f"(t) = −12, so that you should try to find values of A, B, and C such that A + Bt + Ct2 is a solution. Or if f(t) = 2sin t + cos t, then you should try to find values of A and B such that f(t) = Asin t + Bcos t is a solution. Or if f(t) = 2eBt for some value of B, then you should try to find a value of A such that AeBt is a solution.
Example
Consider the differential equation
x"(t) + x'(t) − 2x(t) = t2.
A linear combination of the function on the right-hand side and its first and second derivatives is C + Dt + Et2. For this function to be a solution,
2E + D + 2Et − 2C − 2Dt − 2Et2 = t2 for all t.
For this condition to be satisfied (note that the equation must be satisfied for all t), the constant and coefficient of t on the left must be zero and the coefficient of t2 on the left must be 1. That is,
 2E + D − 2C = 0 2E − 2D = 0 −2E = 1.
The unique solution of these equations is E = −1/2, D = −1/2, and C = −3/4. Thus
x(t) = −3/4 − t/2 − t2/2
is a solution of the differential equation.

#### 3. Add together the solutions found in steps 1 and 2

This step is quite trivial!
Example
Consider the equation from the previous example, namely
x"(t) + x'(t) − 2x(t) = t2.
We saw above that the general solution of the associated homogeneous equation is
x(t) = Aet + Be−2t.
and that
x(t) = −3/4 − t/2 − t2/2
is a solution of the original equation.

Thus the general solution of the original equation is

x(t) = Aet + Be−2t − 3/4 − t/2 − t2/2.

#### Second-order initial value problems

A first-order initial value problem consists of a first-order ordinary differential equation x'(t) = F(tx(t)) and an “initial condition” that specifies the value of x for one value of t. For a second-order equation, requiring an initial condition of that form does not generally determine a unique solution. To determine a unique solution, we generally need to specify both the value of x for some value of t and the rate of change of x at that value of t. Accordingly, we make the following definition.
Definition
A second-order initial value problem consists of a second-order ordinary differential equation
x"(t) = F(tx(t), x'(t))
and initial conditions
x(t0) = x0 and x'(t0) = k0
where t0, x0, and k0 are numbers.
Example
Consider the second-order initial value problem in which the differential equation is the one in the previous example, namely
x"(t) + x'(t) − 2x(t) = t2,
and the initial conditions are
x(0) = 0 and x'(0) = 1.
From the previous example, the general solution of the equation is
x(t) = Aet + Be−2t − 3/4 − t/2 − t2/2.
We have
 x(0) = A + B − 3/4 x'(0) = A − 2B − 1/2
so that for the initial conditions to be satisfied we need
 0 = A + B − 3/4 1 = A − 2B − 1/2.
The unique solution of these equations is A = 1, B = −1/4. Thus the solution of the initial value problem is
x(t) = et − (1/4)e−2t − 3/4 − t/2 − t2/2.

#### Equilibrium and stability

The notions of equilibrium and stability for a second-order initial value problem are closely related to the corresponding notion for a first-order initial value problem.
Definition
If for some initial conditions a second-order initial value problem has a solution that is a constant, the value of the constant is an equilibrium or stationary state of the associated differential equation. If, for all initial conditions, the solution of a second-order initial value problem converges to an equilibrium of the associated differential equation as the variable t increases without bound, then the equilibrium is globally stable.
Consider the homogeneous linear second-order equation
x"(t) + ax'(t) + bx(t) = 0.
If b ≠ 0, this equation has a single equilibrium, namely 0. (That is, the only constant function that is a solution is equal to 0 for all t.) To study the stability of this equilibrium, consider separately the three possible forms of the general solution of the equation, as given in a previous result.
Characteristic equation has two real roots
If the characteristic equation has two real roots, r and s, the general solution of the equation is Aert + Best. This function converges to 0 for all values of A and B, so that the equilibrium is globally stable, if and only if r < 0 and s < 0.
Characteristic equation has a single real root
If the characteristic equation has a single real root, r, the general solution of the equation is (A + Bt)ert. This function converges to 0 for all values of A and B, so that the equilibrium is globally stable, if and only if r < 0. (If r < 0 then for any value of k, tkert converges to 0 as t increases without bound.)
Characteristic equation has complex roots
If the characteristic equation has complex roots, the general solution of the equation is (Acos(βt) + Bsin(βt))eαt, where α = −a/2, β = √(b − a2/4). This function converges to 0 for all values of A and B, so that the equilibrium is globally stable, if and only if α < 0, or equivalently a > 0. (Remember that cos θ and sin θ lie between +1 and −1 for all values of θ.)
Now, the roots of the characteristic equation
r2 + ar + b = 0
(−a ± √(a2 − 4b))/2.
Thus if these roots are complex, then the real part of each of them is −a/2. Hence the condition for stability in the case of complex roots is that the real part of each root is negative. Because the real part of a real root is simply the root, the conditions in the other two cases are exactly the same. That is, regardless of the nature of the roots, the equilibrium is globally stable if and only if the real part of each root of the characteristic equation is negative.

If b = 0, then every number is an equilibrium. By a previous result the general solution of the equation is Aeat + B if a ≠ 0 and A + Bt if a = 0. In both cases, for no equilibrium does the solution converge to the equilibrium for all values of A and B.

Thus an equilibrium of the second-order linear homogeneous equation

x"(t) + ax'(t) + bx(t) = 0
is globally stable if and only if the real parts of each root of the characteristic equation
r2 + ar + b = 0
is negative. If a2 > 4b then the roots are real, equal to (−a ± √(a2 − 4b))/2. They are both negative if −a + √(a2 − 4b) < 0, which is true if and only if a > 0 and b > 0. If a2 = 4b then b ≥ 0 (because the square of any number is nonnegative) and the single root is −a/2, which is negative if and only if a > 0, in which case b > 0. Finally, if a2 < 4b then also b > 0 and the real part of each root is −a/2, which is negative if and only if a > 0.

Thus we have the following result.

Proposition
An equilibrium of the homogeneous linear second-order ordinary differential equation with constant coefficients x"(t) + ax'(t) + bx(t) = 0 is stable if and only if the real parts of both roots of the characteristic equation r2 + ar + b = 0 are negative, or, equivalently, if and only if a > 0 and b > 0.
Now consider the (nonhomogeneous) linear second-order equation
x"(t) + ax'(t) + bx(t) = c
where b ≠ 0 and c ≠ 0. The constant function x(t) = c/b is a solution of this equation, so that by our procedure, the general solution of the equation is the sum of c/b and the general solution of the homogeneous equation
x"(t) + ax'(t) + bx(t) = 0.
Thus the equilibrium (0) of this homogeneous equation is globally stable if and only if the equilibrium of the original equation is globally stable. That is, we have the following result.
Proposition
For any value of c, an equilibrium of the linear second-order ordinary differential equation with constant coefficients x"(t) + ax'(t) + bx(t) = c with b ≠ 0 is stable if and only if the real parts of both roots of the characteristic equation r2 + ar + b = 0 are negative, or, equivalently, if and only if a > 0 and b > 0.
Example
Consider the following macroeconomic model. Denote by Q aggregate supply, p the price level, and π the expected rate of inflation. Assume that aggregate demand is a linear function of p and π, equal to a − bp + cπ where a > 0, b > 0, and c > 0. An equilibrium condition is
Q(t) = a − bp(t) + cπ(t).
Denote by Q* the long-run sustainable level of output (a constant), and assume that prices adjust according to the equation
p'(t) = h(Q(t) − Q*) + π(t),
where h > 0. Finally, suppose that expectations are adaptive:
π'(t) = k(p'(t) − π(t))
for some k > 0. Is the equilibrium of this system stable?

One way to answer this question is to reduce the system to a single second-order differential equation by differentiating the equation for p'(t) to obtain p"(t) and then substituting in for π'(t) and π(t). We obtain

p"(t) − h(kc − b)p'(t) + khbp(t) = kh(a − Q*).
Given k > 0, h > 0, and b > 0, we have khb > 0, so from the previous proposition the equilibrium is stable if and only if kc < b.

In particular, if c = 0 (i.e. expectations are ignored) then the equilibrium is stable. If expectations are taken into account, however, and respond rapidly to changes in the rate of inflation (k is large), then the equilibrium may not be stable.