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 havex'(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) = e−at[C + ∫teasb(s)ds].
This conclusion is summarized in the following result.
- Proposition 8.4.1
-
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 byx(t) = e−at[C + ∫teasb(s)ds].If b is a constant function, with b(s) = b for all s, and a ≠ 0, then this general solution isx(t) = Ce−at + b/a.
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 = Ce−at0 + b/a.
Thus the solution of the first-order initial value problem
x'(t) + ax(t) | = | b |
x(t0) | = | x0 |
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 8.4.2
-
The linear first-order ordinary differential equation
x'(t) + ax(t) = bwith a ≠ 0 has a unique equilibrium, b/a. This equilibrium is globally stable if a > 0 and is unstable if a < 0.
- Example 8.4.1
-
Consider the differential equation
x'(t) + 2x(t) = 6.By the previous result, the general solution of this equation isx(t) = Ce−2t + 3.For the initial condition x(0) = 10, we obtain C = 7, so that the solution isx(t) = 7e−2t + 3.This solution is stable, because 2 > 0.
- Example 8.4.2
-
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 havep'(t) + λ(b + β)p(t) = λ(a − α).The general solution of this differential equation isp(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 equationx'(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) = e∫ta(s)ds has this property, because the derivative of ∫ta(s)ds is a(t). Multiplying the equation by this factor, we have
e∫ta(s)dsx'(t) + a(t)e∫ta(s)dsx(t) =
e∫ta(s)dsb(t),
or
(d/dt)[x(t)e∫ta(s)ds] = e∫ ta(s)dsb(t).
Thus
x(t)e∫ta(s)ds = C + ∫te∫ua(s)dsb(u)du,
or
x(t) = e−∫ta(s)ds[C + ∫te∫ua(s)dsb(u)du].
In summary, we have the following result.
- Proposition 8.4.3
-
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 byx(t) = e−∫ta(s)ds[C + ∫te∫ua(s)dsb(u)du] for all t.
- Example 8.4.3
-
Consider the differential equation
x'(t) + (1/t)x(t) = etfor t > 0. We have∫t(1/s)ds = ln tsoe∫t(1/s)ds = 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. x'(t) + x(t)/t = −C/t2 + et − et/t + et/t2 + C/t2 + et/t − et/t2 = et.