The formula
y′ + a·y = b → y(t) = b/a + (y₀ − b/a)·e^(−a·t)
Why it works
The equation says that the rate of change of y depends on y itself: the further it is from the value b/a, the faster it moves towards it. That value is the equilibrium, where the derivative vanishes and the solution stays put. Everything else is the transient: the initial gap, y₀ − b/a, multiplied by an exponential that fades it away. It is the same equation as a coffee cooling, a capacitor charging, a tank with water flowing in and out or a drug being cleared by the body; with b = 0 it reduces to y′ = −a·y, plain exponential growth or decay. Checking whether a function is a solution needs no solving at all: differentiate it and see whether the equation holds, here by evaluating at several points.
How to solve it by hand
- Divide b by a to get the equilibrium: the value the solution tends to
- Subtract that equilibrium from the initial value: that is the constant multiplying the exponential
- Write y(t) = b/a + (y₀ − b/a)·e^(−a·t) and substitute t to get the value at any time
- To check a solution, differentiate it and see whether y′ + a·y gives exactly b
What is worth knowing
The sign of a decides everything. With a positive, the transient fades and the solution ends at the equilibrium, which is stable: that is why coffee cools down to room temperature and no further. With a negative, the exponential grows and the solution runs away from the equilibrium for good, which is what happens to capital at compound interest or to a population with no limit. With a equal to zero there is neither equilibrium nor exponential: the equation is y′ = b and its solution a straight line. The time to cover half the way, ln 2 over a, is the analogue of a half-life and does not depend on where you start: from any point, in that time half of what remains is covered. A solution is checked at three points rather than one, because a wrong function can agree with the equation at a single point by chance.