8.6 Secondorder differential equations
General form
 Definition

A secondorder ordinary differential equation is an ordinary differential equation that may be written in the form
x"(t) = F(t, x(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 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 ArrowPratt 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 riskaversion than does v.)
What utility functions have a degree of riskaversion 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 wfor some number a?This equation is a secondorder 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)orz'(w) = −az(w)/w,a separable firstorder 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 thatln y = −aln w + C,orln z(w) = −aln w + C,orz(w) = Cw^{−a}.Now, z(w) = u'(w), so to get u we need to integrate:u(w) = Cln w + B if a = 1 Cw^{1−a}/(1 − a) + B if a ≠ 1.
Linear secondorder equations with constant coefficients
 Definition

A linear secondorder ordinary differential equation with constant coefficients is a secondorder 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.
Thus we have the following result.
 Proposition

Let x be a solution of the linear secondorder 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) equationx"(t) + ax'(t) + bx(t) = 0.
 Procedure for finding general solution of linear secondorder 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.
 Find the general solution of the associated homogeneous equation x"(t) + ax'(t) + bx(t) = 0.
 Find a single solution of the original equation x"(t) + ax'(t) + bx(t) = f(t).
 Add together the solutions found in steps 1 and 2.
1. Find the general solution of a homogeneous equation
You might guess, based on the solutions we found for firstorder equations, that the homogeneous equation has a solution of the form x(t) = Ae^{rt}. Let's see if it does. If x(t) = Ae^{rt} then x'(t) = rAe^{rt} and x"(t) = r^{2}Ae^{rt}, so thatx"(t) + ax'(t) + bx(t)  =  r^{2}Ae^{rt} + arAe^{rt} + bAe^{rt} 
=  Ae^{rt}(r^{2} + ar + b). 
Suppose that a^{2} > 4b, so that the characteristic equation has two distinct real roots, say r and s. We have shown that both x(t) = Ae^{rt} and x(t) = Be^{st}, for any values of A and B, are solutions of the equation. Thus also x(t) = Ae^{rt} + Be^{st} 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 (a^{2} = 4b) or complex roots (a^{2} < 4b) require slightly different analyses, with the following conclusions.
 Proposition

Consider the homogeneous linear secondorder 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 r^{2} + ar + b = 0 as follows.
 Distinct real roots
 If a^{2} > 4b, in which case the characteristic equation has distinct real roots, say r and s, the general solution of the equation is
Ae^{rt} + Be^{st}.
 Single real root
 If a^{2} = 4b, in which case the characteristic equation has a single root, say r, the general solution of the equation is
(A + Bt)e^{rt},where r = −(1/2)a is the root.
 Complex roots
 If a^{2} < 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 − a^{2}/4). This solution may alternatively be expressed asCe^{αt}cos(β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.
 Example

Consider the differential equation
x"(t) + x'(t) − 2x(t) = 0.The characteristic equation isr^{2} + r − 2 = 0so the roots are 1 and −2. That is, the roots are real and distinct. Thus the general solution of the differential equation isx(t) = Ae^{t} + 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 isx(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)]e^{−t}.
2. Find a solution of a nonhomogeneous equation
Consider the nonhomogeneous equation Example

Consider the differential equation
x"(t) + x'(t) − 2x(t) = t^{2}.A linear combination of the function on the righthand side and its first and second derivatives is C + Dt + Et^{2}. For this function to be a solution,2E + D + 2Et − 2C − 2Dt − 2Et^{2} = t^{2} 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 t^{2} on the left must be 1. That is,
2E + D − 2C = 0 2E − 2D = 0 −2E = 1. x(t) = −3/4 − t/2 − t^{2}/2is 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) = t^{2}.We saw above that the general solution of the associated homogeneous equation isx(t) = Ae^{t} + Be^{−2t}.and thatx(t) = −3/4 − t/2 − t^{2}/2is a solution of the original equation.
Thus the general solution of the original equation is
x(t) = Ae^{t} + Be^{−2t} − 3/4 − t/2 − t^{2}/2.
Secondorder initial value problems
A firstorder initial value problem consists of a firstorder ordinary differential equation x'(t) = F(t, x(t)) and an “initial condition” that specifies the value of x for one value of t. For a secondorder 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 secondorder initial value problem consists of a secondorder ordinary differential equation
x"(t) = F(t, x(t), x'(t))and initial conditionsx(t_{0}) = x_{0} and x'(t_{0}) = k_{0}where t_{0}, x_{0}, and k_{0} are numbers.
 Example

Consider the secondorder initial value problem in which the differential equation is the one in the previous example, namely
x"(t) + x'(t) − 2x(t) = t^{2},and the initial conditions arex(0) = 0 and x'(0) = 1.From the previous example, the general solution of the equation isx(t) = Ae^{t} + Be^{−2t} − 3/4 − t/2 − t^{2}/2.We have
x(0) = A + B − 3/4 x'(0) = A − 2B − 1/2 0 = A + B − 3/4 1 = A − 2B − 1/2. x(t) = e^{t} − (1/4)e^{−2t} − 3/4 − t/2 − t^{2}/2.
Equilibrium and stability
The notions of equilibrium and stability for a secondorder initial value problem are closely related to the corresponding notion for a firstorder initial value problem. Definition
 If for some initial conditions a secondorder 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 secondorder 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.
 Characteristic equation has two real roots
 If the characteristic equation has two real roots, r and s, the general solution of the equation is Ae^{rt} + Be^{st}. 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)e^{rt}. 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, t^{k}e^{rt} 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 − a^{2}/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 θ.)
If b = 0, then every number is an equilibrium. By a previous result the general solution of the equation is
Thus an equilibrium of the secondorder linear homogeneous equation
Thus we have the following result.
 Proposition
 An equilibrium of the homogeneous linear secondorder 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 r^{2} + ar + b = 0 are negative, or, equivalently, if and only if a > 0 and b > 0.
 Proposition
 For any value of c, an equilibrium of the linear secondorder 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 r^{2} + 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 longrun sustainable level of output (a constant), and assume that prices adjust according to the equationp'(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 secondorder 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.