Separation of Variables
Integration runs differentiation backward for a plain function. Separation of variables does the same job for a differential equation: given a relation between an unknown function and its own derivative, it recovers the function itself in closed form. It is the most basic technique for solving a first-order ordinary differential equation, as opposed to guessing a solution and checking it by substitution.
It does not work on every ODE — only on those with a particular shape. This page describes that shape, the procedure, and two worked examples drawn from population modeling.
What makes an ODE separable
A first-order ODE is separable if its right-hand side can be written as a product of two factors — one in which only the independent variable appears, and one in which only the unknown function appears:
Each factor may be written using only its own variable: inside , inside .
This factoring is the whole condition the method needs: it is exactly what lets the -symbols and the -symbols be sorted onto opposite sides of the equation. A few quick tests:
- is separable: , . Both variables appear, but they multiply, so they pull apart cleanly.
- is separable: (the independent variable isn’t typed in at all) and .
- is not separable: the right-hand side is a sum, and there is no way to rewrite as one -only factor times one -only factor.
The method
Once an equation is in separable form, the solution comes in three moves: separate, integrate, solve.
To solve a separable ODE :
- Separate. Divide by and multiply by , collecting each variable on its own side:
- Integrate both sides, each against its own variable:
A single constant of integration on the right absorbs the constants from both integrals.
- Solve the resulting algebraic relation for , then fix using the initial condition.
Why splitting and is legitimate
Treating and as quantities to be shuffled across an equation is informal shorthand; the move is justified by the substitution rule for integrals (reversing the chain rule), reading as a function of throughout. Start from the separated equation with both sides still functions of , and integrate against :
The left-hand side is exactly the pattern the substitution rule collapses: with , the factor becomes , and the integral turns into . So the ” on one side, on the other” picture is not an abuse of notation but a faithful record of a substitution.
The one division to watch. Step 1 divides by , which is only valid where . Any value with gives a constant solution — the derivative is zero and the right-hand side is zero, so the equation holds — and dividing it away can drop it from the family the method produces. Check these equilibrium values separately. In the examples below each one is quietly recovered by the final formula, but that is luck worth verifying, not a rule.
Worked example: the Malthus equation
The Malthus model of population growth gives the cleanest possible case. Its population satisfies
with growth rate and initial condition .
Fitting it to the general shape. Line the equation up against and rename. The independent variable is the time . The unknown function is the population, which we call , not : the letter names the function we are solving for, while is the single number that function returns at one instant. The slot fills in the general form is the whole function, so becomes . With both renamings the general shape reads
and our equation matches it with and . The split is forced: the right-hand side must break into a factor written with alone and a factor written with alone. The constant carries no and no , so it becomes the -factor ; the leftover is the -factor, already as simple as possible, so is just the rule “return what you are handed,” i.e. . That is why is enough: nothing further has to be done to .
Why the hidden inside is not a problem. Writing can look as if it forgets that secretly depends on . It does not. is a rule applied to a number: hand it any value and it gives that value straight back. While the equation runs, the value handed in is the current population , so applying the rule gives . Spelled out in full, the equation is
which is just written out. So and are the same equation: the short form defines the rule , the long form applies it at time . (This is the same one-letter-for-both convention introduced with the ordinary differential equation, where does double duty for the function and for its value.) The buried inside is no obstacle, because never inspects where its input came from — it only uses the input’s value. Separability asks only that the rule mention no and the rule mention no , and both hold here.
With the pieces named, run the three steps.
Separate, assuming :
Integrate both sides. The left is the logarithm; the right is linear in :
Solve for . Exponentiating both sides,
so , where is an arbitrary nonzero constant rolling the sign and the together. The initial condition pins it down: at ,
so , and the solution is the exponential
The division by assumed , which set aside the constant solution — the extinct population, the lone zero of . That solution is not lost after all: it is the case of the formula, which gives and . So holds for every starting population.
Worked example: the saturation equation
The Verhulst saturation model is barely harder. Its population satisfies
with response rate , carrying capacity , and initial condition . It is separable with and .
Separate, assuming :
Integrate. The left-hand side is again a logarithm, since :
Solve for . Exponentiating gives with , so
The initial condition at reads , hence , and the solution is
The dropped value this time is , the population sitting exactly at carrying capacity. It returns as the case, where and holds for all time.
The saturation model can also be solved without separation, by the change of variable that turns it into the Malthus equation for the gap . Separation reaches the same closed form directly, without the substitution — two routes to one answer.
When separation isn’t enough
Separation handles a first-order ODE only when the right-hand side factors as , and even then only when both resulting integrals can be carried out. Two limits show up immediately in population modeling.
The logistic growth model, with , is separable: the right-hand side is a product times . But the integral is not one of the standard antiderivatives. Evaluating it needs partial-fraction decomposition — splitting the single fraction into and pieces, each a logarithm — which is a separate technique layered on top of separation.
Systems of coupled ODEs, such as the two-species predator–prey models, are a harder break: there the rate of each population depends on both populations at once, so no single equation can be separated into one-variable pieces. Such systems are studied through their equilibria and stability rather than solved in closed form.