Sign in

Libre University uses your GitHub account. Signing in is only needed to sit a final test, so the score is kept on your profile.

Separable equations

The previous lesson could draw the family of solutions to a first order equation without solving it, and this one solves a genuine class of them outright.

The class is narrow but it contains most of the standard models: radioactive decay, drug clearance, cooling, dissolution, and population growth against a limit. What they share is that the rate of change factors, with everything depending on time in one bracket and everything depending on the unknown in another. When that happens, calculus alone finishes the job.

The factoring that makes integration possible

An equation is separable if it can be written

dydt=g(t)h(y)

The method is to divide by h(y), multiply by dt, and integrate both sides. That description is a mnemonic rather than an argument, since dt is not a quantity to be multiplied by, so here is the argument. Divide by h(y) to get

1h(y)dydt=g(t)

and integrate both sides with respect to t. On the right that gives g(t)dt. On the left, the integrand is exactly of the form F'(y)y' with F an antiderivative of 1/h, so the chain rule identifies it as the derivative of F(y(t)), and by substitution 1h(y)dydtdt=dyh(y). So

dyh(y)=g(t)dt+C

which is the mnemonic, now justified. Only one constant is needed, since the two would merge. What comes out is a relation between y and t, not necessarily a formula for y, and that distinction matters below.

Example. Solve dydt=ty with y(0)=3.

Separating, dyy=tdt, so ln|y|=12t2+C and |y|=eCet2/2. Absorbing the sign and the exponential of the constant into one constant A, the general solution is y=Aet2/2. The initial condition gives A=3, so y=3et2/2. Checking: y'=3tet2/2=ty, as required.

Now you. Solve dydt=ycost with y(0)=2.

Answer

dyy=costdt gives ln|y|=sint+C, so y=Aesint and A=2. The solution is y=2esint, which oscillates between 2e-1=0.736 and 2e=5.44.

The solutions that division destroys

Dividing by h(y) is only legal where h(y) is not zero, and every root of h is a constant solution that the method throws away. If h(y0)=0 then the constant function yy0 has zero derivative and satisfies the equation exactly, yet it can never appear in the family produced by separating, because the very first step divided by zero to get there.

For y'=y(1-y) the roots are y=0 and y=1, and both are genuine solutions that must be added back by hand. Sometimes the lost solution reappears as a limiting case of the constant: for y'=ky the family y=Aekt includes y0 at A=0, even though the derivation assumed y0. Sometimes it does not, and then the general solution is genuinely incomplete without it. Check the roots of h every time; it costs one line and it is the standard way to lose half an answer.

Decay, growth and half-lives

The equation dydt=ky says the rate of change is proportional to the amount present, and separating gives y=y0ekt. Negative k is decay, positive is unconstrained growth. What makes the model useful is that k is rarely quoted directly: what is measured is a half-life t1/2, the time for the amount to halve, and setting y=y0/2 gives ekt1/2=12, so k=-ln2/t1/2.

Caffeine leaves the bloodstream by first order kinetics with a half-life near 5 hours in a typical adult. So k=-ln2/5=-0.1386 per hour, and a 200 mg dose falls to 95 mg after t=ln(200/95)/0.1386=5.4 hours. The same arithmetic dates a bone from its carbon-14, sizes a shielding delay from a reactor isotope, and sets the dosing interval of a drug. The characteristic quantity is 1/|k|, the time constant, after which the amount has fallen by a factor of e; a half-life is ln2=0.693 time constants.

The honest limit is that pure exponential growth is a statement about a system with unlimited resources, and no real population has those. It is the first term of a better model, not the model.

Newton's law of cooling, fitted to a real mug

A body at temperature T in surroundings at Ts loses heat at a rate roughly proportional to the excess temperature, which gives

dTdt=-k(T-Ts)

Separating with u=T-Ts, which has the same derivative as T since Ts is constant, gives u=u0e-kt, so

T(t)=Ts+(T0-Ts)e-kt

Every cooling curve is the same shape: the excess over ambient decays exponentially, and the temperature approaches the room's, never crossing it.

Example. Coffee at 90 °C stands in a room at 20 °C. After 5 minutes it reads 70 °C. When will it reach 45 °C?

The excess starts at 70 degrees and is 50 degrees after five minutes, so 50=70e-5k and k=15ln(70/50)=0.0673 per minute. Drinking temperature at 45 °C is an excess of 25 degrees, so 25=70e-kt and t=ln(70/25)/0.0673=15.3 minutes. As a check, the prediction at ten minutes is 20+70e-0.673=55.7 °C, which is the same fall of 70 to 50 per cent applied twice.

Now you. Soup at 95 °C sits in a room at 22 °C and is at 65 °C after 10 minutes. When does it reach 40 °C?

Answer

The excess falls from 73 to 43 in ten minutes, so k=110ln(73/43)=0.0529 per minute. For an excess of 18 degrees, t=ln(73/18)/0.0529=26.5 minutes.

The law is an approximation, valid when the excess temperature is small enough that radiation, which goes as the fourth power of absolute temperature, is not dominant, and when the body is well stirred or thin enough to have one temperature at all. For a mug of coffee at kitchen temperatures both hold well enough that the fit above is good to a degree or so over half an hour.

Implicit solutions and the interval they live on

Separation produces a relation, and there is no guarantee that the relation can be solved for y. Take dydt=-ty with y(0)=3. Separating gives ydy=-tdt, so 12y2=-12t2+C and

t2+y2=9

a circle. That is a perfectly good implicit solution, and it says more clearly than any formula what the solutions look like. Made explicit, y=9-t2, taking the positive root because y(0)=3, and now the trouble is visible: the solution exists only for -3<t<3. At the ends the circle has a vertical tangent, the derivative is infinite, and the solution simply stops. Nothing in the original equation announced the number 3; it came from the initial condition. The interval of existence of a solution can depend on where the solution starts, which never happens for the linear equations of the next lesson.

Some separable equations lead to integrals that need the techniques of the previous course. dydt=y2-12 separates to 2dy(y-1)(y+1)=dt, a partial fractions problem, and others lead to integrals with no elementary form at all, at which point separation has converted a differential equation into a definite integral to be done numerically. That is still progress.

The logistic equation

Exponential growth fails because it ignores the resource limit. Model the limit in the crudest way that could work: let the per-capita growth rate fall linearly to zero as the population P approaches a carrying capacity K. The per-capita rate is 1PdPdt, so the assumption is 1PdPdt=r(1-PK), giving the logistic equation

dPdt=rP(1-PK)

published by Pierre-François Verhulst in 1838. It is separable and nonlinear. Separating and using partial fractions on 1P(1-P/K)=1P+1/K1-P/K gives lnP-ln(1-P/K)=rt+C, so P1-P/K=Aert, and solving for P,

P(t)=K1+(KP0-1)e-rt

The behaviour is the S-curve: growth is nearly exponential at rate r while PK, slows as the bracket shrinks, and levels off at K. The steepest point is where dPdt is largest, and since that is a downward parabola in P with roots at 0 and K, the maximum is at P=K/2, exactly half the capacity, at which the growth rate is rK/4.

Example. A lake is stocked with 100 fish. The population grows logistically with r=0.03 per year and K=1000. When does it reach 500?

Half capacity is reached when the denominator is 2, that is when (1000100-1)e-rt=1, so 9e-0.03t=1 and t=ln9/0.03=73.2 years. That is also the moment of fastest growth, at rK/4=7.5 fish per year.

Now you. A population starts at 50 with r=0.05 per year and K=800. When does it reach 400?

Answer

(80050-1)e-0.05t=1 gives 15e-0.05t=1 and t=ln15/0.05=54.2 years.

Raymond Pearl and Lowell Reed fitted a logistic to the United States census in 1920 and obtained K=197.3 million, r=0.0313 per year, and half capacity in 1914. Against the census the fit is remarkable: it predicts 77.3 million for 1900 against a measured 76.2, and 107.9 million for 1920 against 106.0. It is also wrong in the way models of this sort are always wrong. The United States passed 197 million in 1967 and kept going, because immigration and changing fertility are not in the model, and by 2020 the fit predicts 190 million against an actual 331. A logistic fit measures the growth pattern of the period it was fitted to, and its extrapolated K is a summary of that period rather than a property of the country.

Where separation runs out

Separation needs the right side to factor, and most equations do not. Consider a stirred tank whose inflow concentration varies during the day, or a capacitor charged from a mains supply. Both give equations of the shape

dydt+p(t)y=g(t)

with g not constant, and there is no way to write g(t)-p(t)y as a product of a function of t and a function of y. Even the simplest instance, y'=t+y, resists. Yet these equations are linear, which the logistic equation is not, and linear equations are supposed to be the easy ones.

They are, once the right trick is found. The next lesson finds it by asking what could be multiplied through the equation to make the left side the derivative of a single product, and the answer solves every first order linear equation there is.