Mathematical methods for economic theory

Martin J. Osborne

8.4 Linear first-order differential equations

General form

Definition
A linear first-order ordinary differential equation is a first-order ordinary differential equation that may be written in the form
x'(t) + a(t)x(t) = b(t)
for functions a and b of a single variable.

Coefficient of x(t) constant

Consider first the case in which a(t) is a constant independent of t. Then, using a to denote the value of the constant (rather than the function), we have
x'(t) + ax(t) = b(t) for all t.
If the left-hand side were the derivative of some function and we could find an antiderivative of b then we could solve the equation by integrating each side. Now, the left-hand side looks something like the derivative of a product. But for it to be exactly the derivative of a product of the form f(t)x(t) we would need f(t) = 1 and f'(t) = a for all t, which is not possible.

Suppose that we multiply both sides by g(t) for each t. Then we have

g(t)x'(t) + ag(t)x(t) = g(t)b(t) for all t.
For the left-hand side of this equation to be the derivative of a product of the form f(t)x(t) we need f(t) = g(t) and f'(t) = ag(t). Is there any function f with this property? Yes! If f(t) = eat then f'(t) = aeat = af(t).

Thus if we set g(t) = eat, so that we have

eatx'(t) + aeatx(t) = eatb(t),
then an antiderivative of the left-hand side is
eatx(t),
and hence the solution of the equation is given by
eatx(t) = C + ∫teasb(s)ds,
(where ∫tf(s)ds is, as before, an antiderivative of f evaluated at t), or
x(t) = eat[C + ∫teasb(s)ds].
This conclusion is summarized in the following result.
Proposition
The general solution of the linear first-order ordinary differential equation
x'(t) + ax(t) = b(t),
where a is a constant and b is a continuous function, is given by
x(t) = eat[C + ∫teasb(s)ds].
If b is a constant function, with b(s) = b for all s, and a ≠ 0, then this general solution is
x(t) = Ceat + b/a.
Because multiplying the original equation by eat allows us to integrate the left-hand side, we call eat an integrating factor.

In the case in which b is a constant function and a ≠ 0, for the initial condition x(t0) = x0 to be satisfied we need

x0 = Ceat0 + b/a.
Thus the solution of the first-order initial value problem
x'(t) + ax(t)  =  b
x(t0)  =  x0
is
x(t) = (x0 − b/a)ea(t0 − t) + b/a.
This solution is constant only if x0 = b/a, in which case the solution is equal to b/a. Thus b/a is the unique equilibrium of the differential equation.

As t increases without bound, x(t) converges to b/a if a > 0, and grows without bound if a < 0 and x0 ≠ b/a. That is, the equilibrium is globally stable if a > 0 and unstable if a < 0.

The following result summarizes these findings.

Proposition
The linear first-order ordinary differential equation
x'(t) + ax(t) = b
with a ≠ 0 has a unique equilibrium, b/a. This equilibrium is globally stable if a > 0 and is unstable if a < 0.
Example
Consider the differential equation
x'(t) + 2x(t) = 6.
By the previous result, the general solution of this equation is
x(t) = Ce−2t + 3.
For the initial condition x(0) = 10, we obtain C = 7, so that the solution is
x(t) = 7e−2t + 3.
This solution is stable, because 2 > 0.
Example
When the price of a good is p, the total demand is D(p) = a − bp and the total supply is S(p) = α + βp, where a, b, α, and β are positive constants. When demand exceeds supply, price rises, and when supply exceeds demand it falls. The speed at which the price changes is proportional to the difference between supply and demand. Specifically,
p'(t) = λ[D(p(t)) − S(p(t))]
with λ > 0. Given the forms of the supply and demand functions, we thus have
p'(t) + λ(b + β)p(t) = λ(a − α).
The general solution of this differential equation is
p(t) = Ce−λ(b + β)t + (a − α)/(b + β).
The equilibrium price is (a − α)/(b + β), and, given λ(b + β) > 0, this equilibrium is globally stable.

Coefficient of x(t) dependent on t

We may generalize these arguments to the differential equation
x'(t) + a(t)x(t) = b(t),
in which a is a function that is not constant. For g(t) times the left-hand side of this equation to be the derivative of f(t)x(t) we need f(t) = g(t) and f'(t) = a(t)g(t) for all t. The function g(t) = eta(s)ds has this property, because the derivative of ∫ta(s)ds is a(t). Multiplying the equation by this factor, we have
eta(s)dsx'(t) + a(t)eta(s)dsx(t) = eta(s)dsb(t),
or
(d/dt)[x(t)eta(s)ds] = e ta(s)dsb(t).
Thus
x(t)eta(s)ds = C + ∫teua(s)dsb(u)du,
or
x(t) = e−∫ta(s)ds[C + ∫teua(s)dsb(u)du].
In summary, we have the following result.
Proposition
The general solution of the linear first-order ordinary differential equation
x'(t) + a(t)x(t) = b(t),
where a and b are continuous functions, is given by
x(t) = e−∫ta(s)ds[C + ∫teua(s)dsb(u)du] for all t.
Example
Consider the differential equation
x'(t) + (1/t)x(t) = et
for t > 0. We have
t(1/s)ds = ln t
so
et(1/t)dt = t.
Thus the solution of the equation is
x(t = (1/t)(C + ∫tueudu)
= (1/t)(C + tet − ∫teudu)
= (1/t)(C + tet − et)
= C/t + et − et/t.
(Use integration by parts to obtain the second line.) We can check that this solution is correct by differentiating:
x'(t) + x(t)/t  =  C/t2 + et − et/t + et/t2 + C/t2 + et/t − et/t2
 =  et.