18.03 Class 3, Monday, Feb 8: First order linear equations

The most important first order equations are linear: they can be put, by algebraic means, into the form

y′ + p(x)y = q(x).  (1)

For example if p = 0 we have the solution y = ∫ q(x)dx. If q = 0 (the homogenous case) we can separate variables and get y = ce^{− ∫ p(t)dt}; especially, if p(x) is constant, this gives the equation we studied on Friday. But in general this is not a separable equation.

I described the mortgage process: in the continuous approximation, one is charged interest I(t) per year on the outstanding loan amount l(t), and pays off the mortgage at a(t) dollars per year. One is led to

l′(t) − I(t)l(t) = −a(t) : p = −I, q = a.

I urged the students to think of this example when they face a general linear first order ODE, and interpret p(t) as an exponential decay factor and q(t) as a driving or forcing term. The left hand member of (1) describes the system we are studying, and the right hand term q(x) describes an external pressure being applied to it; it drives y up if it is positive, or down (as in the mortgage case) if it is negative.

I took the case in which I and a are both constant. This is actually separable, and you find

l(t) = \frac{a}{I} + ce^{It}.

Determining the constant of integration c is not done by the usual initial condition method in this case. In fact, there are two undetermined constants here: c and a. We are given an initial loan amount, L = l(0), and a number of years T, at which time the loan amount should be reduced to 0; so we have the pair of equations

0 = l(T) = \frac{a}{I} + ce^{IT} , L = \frac{a}{I} + c.

The first shows that c = −\frac{a}{I}e^{−IT}, and the second then shows that

a = \frac{I}{1 − e^{−IT}} L.

The total payout is aT, which is the initial loan amount L times the ratio

ρ = \frac{IT}{1 − e^{−IT}} .

(I didn’t point out to them that this is the generating function for Bernoulli numbers.) Thus for example for a 30 year mortgage at 7%, the total payout comes to about ρ ≃ 2.393, and consequently the monthly payments on a $100,000 mortgage are $664.73. This is very close to actual bank charges.

The I returned to the general case (1) and showed them the trick: multiply both sides by another (as yet unknown) function w, with the idea of writing the sum on the left as the two terms in the derivative of a product. Working this out lead to a differential equation for w: w′ = −p(x)w. This is separable, and has

w = e^{∫ p(t)dt}.

This is an integrating factor. I suggested remembering the trick rather than this expression for the integrating factor (and certainly not the expression (6) on EP p 47, which I didn’t even write down). I carried out the trick on the equation

y′ = e^{x} − y.

This equation has an exponential damping term, but also an exponentially increasing driving term. Which will win? The general solution is

y = \frac{1}{2}e^{x} + ce^{−x},

so the damping can’t overcome the impressed force but does halve its effect.

If I have time I’ll make the point that the solutions to (1) exist everywhere as long as the coefficients p and q are reasonable. This is in distinction to the kinds of equations we were looking at on the first two days, which were often nonlinear and whose solutions often blew up.