y' + p(x)y = q(x). (*)
For example if p=0 we have the solution y=integral q(x)dx. If q=0 (the "homogeneous" case) we can separate variables and get y = ce^{-integral 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 (*) 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) = (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) = (a/I) + ce^{IT}, L = (a/I) + c.
The first shows that c = -(a/I)e^{-IT}, and the second then shows that
a = IL/(1-e^{-IT}).
The total payout is aT, which is the initial loan amount L times the ratio
rho = 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 rho 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 (*) 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^{integral p(t)dt}.
This w 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 = (1/2)e^x + ce^{-x},
so the damping can't overcome the impressed force but does halve its effect.
I made the point that the solutions to (*) 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.