Separable Differential Equations
Learning Objectives
- Recognize a separable equation and carry out separation of variables, including the justification behind the notation.
- Find the constant (equilibrium) solutions of and explain why dividing by can lose them.
- Solve the logistic equation, identify its equilibria and carrying capacity, and say which solution the formula misses.
- Solve Newton's law of cooling and fit its rate constant from a measurement.
- Check any solution by substituting it back, and state the interval on which it is valid.
Context & Motivation
The previous lesson, differential-equations-and-initial-value-problems, solved by guessing the exponential and proving it was the only solution. Guessing does not scale. A population cannot grow exponentially forever, and a cooling cup does not lose heat at a fixed rate: the rate depends on the current value in a way that is not simply proportional to it. A large family of such equations can be solved with two integrals.
That family is the separable equations, where the right-hand side factors into a part that depends only on and a part that depends only on . Two famous members are the logistic equation, which models growth that saturates, and Newton's law of cooling. The logistic curve also appears in computing as the sigmoid used in logistic regression and neural networks. Along the way you will meet the main hazard of the method: a division that quietly discards a solution.
Core Theory
The separable form and the method
An equation is separable if it can be written as
with continuous on an interval and continuous. Then:
- Solve . Each root gives a constant solution , because both sides are .
- Where , divide: .
- Integrate both sides with respect to . Let be an antiderivative of and one of . By the chain rule, , so has zero derivative.
- On an interval a function with zero derivative is constant, so .
- Solve for if you can; otherwise leave the relation implicit. Use the initial condition to fix .
- Substitute the result back into the equation and the initial condition, and state the interval.
Step 4 in one line:
The familiar shorthand , integrated on each side, compresses steps 2 to 4, and the left integral is a substitution (integration-by-substitution-and-by-parts). The chain-rule argument is what makes the shorthand legitimate, because is a limit of quotients, not a fraction you may split freely. It needs for every in the interval, which is what step 2 assumed.
Solutions lost by dividing
Step 2 is a division by , so it silently excludes the solutions where . Those are the constant solutions from step 1, called equilibria, and the general formula from steps 3 to 5 may or may not contain them.
- Sometimes a special value of the constant recovers the equilibrium. For , the formula contains at .
- Sometimes it does not. In the logistic equation below, no finite value of the constant gives .
So always list the roots of first and decide, one by one, whether the final formula covers them. If it does not, the answer is the formula plus the extra solution.
When is the division safe on the rest of the plane? Suppose is continuous and has a continuous derivative, so that and its -derivative are continuous and the uniqueness theorem of the previous lesson applies. Then a non-constant solution can never reach an equilibrium, because that would put two solutions through one point. Each solution stays in a band between consecutive roots of , where , and the division is justified. Without that hypothesis, solutions can leave an equilibrium, as in from the previous lesson.
The logistic equation
Exponential growth has no ceiling. The logistic equation adds one:
When is small compared with , the factor in parentheses is close to and growth is nearly exponential. As approaches , the factor approaches and growth stops. The number is the carrying capacity. This is separable with , so the equilibria are and .
For (the same steps work in the other bands, with of either sign), partial fractions give . Separating and integrating:
Solving for and writing :
What the formula covers and misses. gives the equilibrium . No finite gives , which was removed when we divided by , so in this parametrization is a lost solution and must be stated separately. The gap belongs to the parametrization, not to the equation. Writing the family as recovers at and loses . Parametrizing by the initial value, , covers both: and give the two equilibria (on any interval where the denominator is nonzero).
The shape follows from the formula. For the curve is an S: increasing, with the steepest growth at , where , and tending to . For the solution decreases to . For (not meaningful for a population) the denominator vanishes at a finite time and the solution blows up. Near the equilibrium repels and attracts every solution that starts at a positive value.
Newton's law of cooling
Newton's law of cooling says an object's temperature changes at a rate proportional to the difference from the surroundings:
with constant. It is separable with the single equilibrium . For ,
Here the lost solution is recovered: gives . The temperature approaches but, in this model, does not reach it in finite time.
The law is an empirical approximation. It describes cooling reasonably when heat loss is mostly by convection and the temperature gap is modest. Radiation grows faster than linearly with temperature, and evaporation from a hot drink adds its own loss, so real data drift away from a single exponential. The constant depends on the object and its surroundings and is found from a measurement.
Worked Examples
Example 1: a lost solution that the constant recovers
Solve , . Here and , with equilibrium . For :
Then , so . Substitution: , and . It is valid for all real . The lost solution is the member of the family, and the initial condition selects anyway. A numerical integration gives , matching .
Example 2: an implicit solution and a restricted interval
Solve , . Here is undefined at , so is not an equilibrium but a point the solution must avoid. Separating, , so
The initial condition gives . This relation is a circle, but a solution is a function, so the condition selects the upper half: . Substitution: and . The formula is valid on : at we have , where the equation is undefined and the slope of the semicircle is infinite. For the solution is the lower half, . A numerical integration to gives , matching .
Example 3: the logistic equation with numbers
Let , , . Then and
Substitution: with , , and , which is the same; also . Values, compared with a numerical integration of the ODE:
textt P(t) numerical 0 10.0000 10.0000 5 45.0853 45.0853 10 85.8486 85.8486 15 97.8178 97.8178 20 99.6990 99.6990 30 99.9945 99.9945
The population reaches when , at , where the growth rate is the maximum . Starting above the capacity, with , gives and , which falls toward (it is at ). This formula is valid for , so it covers every . The lost solution is the case : the formula breaks there because is undefined.
Example 4: cooling coffee
A cup of coffee at sits in a room and reads after minutes. Then and , so and . After minutes . To reach : , so minutes. Substitution: and .
Example 5: the sigmoid is a logistic solution
The sigmoid satisfies , the logistic equation with . With the constant is , which gives the sigmoid. Check: and , equal. At the formula and a numerical integration both give . By the uniqueness theorem this IVP has no other solution. This is why gradient code for a sigmoid activation can compute the derivative from the output alone.
Common Misconceptions & Pitfalls
- "Divide freely and the formula is the whole answer." Division by drops the roots of . For the logistic equation the answer is the formula plus .
- " is a fraction, so anything goes." The rewriting is justified by the chain rule and a substitution. It stops being valid at any where .
- Dropping the absolute value in . Writing silently restricts to positive . Keep , then absorb into one constant.
- Putting a constant on each side. One constant is enough; two are redundant.
- Taking the wrong sign of the square root. In Example 2, is not a function. The initial condition chooses the branch.
- "The solution lives on the whole real line." Example 2 lives on and the logistic solutions with blow up in finite time. State the interval.
- "Every first-order equation is separable." is not: the ratio of its slopes at two heights depends on , which a product cannot produce.
Summary
A separable equation is solved by finding the roots of , dividing where , and integrating, with the chain rule justifying the notation and the zero-derivative-on-an-interval fact giving the single constant. The division discards the equilibria, so every solution must be checked against them: recovers through the constant, while the logistic equation has the formula that contains and misses . Newton's law of cooling gives , an approximation with its constant fitted from a measurement. Every answer is verified by substituting it into the equation and the initial condition, and is stated together with its interval of validity.