Calculus › Section G · Differential equations › Topic G.3
Separation of variables
Growth and decay solved one special equation, y′ = ky. Separation of variables solves a whole family of equations, including cooling, mixing and geometry problems, by turning each into two ordinary integrals.
The easy equation, and everything else
Growth and decay solved the equation \(\frac{dy}{dt} = ky\) once and for all: \(y = y_0e^{kt}\). But most differential equations do not have that exact shape. A quantity whose growth depends on both time and size satisfies something like \(y' = 2ty\). A cooling drink satisfies \(\frac{dT}{dt} = -k(T - 20)\). Neither fits \(y' = ky\), yet both can be solved by the same short procedure, because in each case the variables can be pulled to opposite sides of the equation.
What separable means
A first-order differential equation is separable if it can be written as
with everything involving \(x\) in one factor and everything involving \(y\) in the other. The equation \(y' = 2xy\) is separable: it is already \(x\) times \(y\). So is \(y' = e^{x+y}\), because \(e^{x+y} = e^xe^y\). And \(y' = \frac{x}{y}\) is \(x\) times \(\frac{1}{y}\). But \(y' = x + y\) is not: no rearrangement turns that sum into a product of a pure \(x\)-factor and a pure \(y\)-factor. Recognising whether an equation factors this way is the first job.
The method: separate, integrate, solve
Start from \(y' = g(x)h(y)\) and divide both sides by \(h(y)\), which moves every \(y\) to the left:
Treating \(\frac{dy}{dx}\) like a fraction is a memory aid, not a proof; what you are really doing is antidifferentiating one side with respect to \(y\) and the other with respect to \(x\). Integrate both sides:
Only one constant is needed, because two constants combine into their difference. Then solve for \(y\) if convenient, and use any initial condition to pin down the constant. An unsolved equation linking \(x\) and \(y\) is a perfectly good answer.
Worked example: y′ = 2xy with an initial condition
Solve \(y' = 2xy\) with \(y(0) = 3\). Here \(g(x) = 2x\) and \(h(y) = y\). Divide by \(y\) to get \(\frac{dy}{y} = 2x\,dx\). Integrating gives \(\ln|y| = x^2 + C\). Exponentiate: \(|y| = e^{x^2+C} = e^Ce^{x^2}\), so \(y = Ae^{x^2}\), where \(A = \pm e^C\). Taking \(A = 0\) as well recovers the constant solution \(y = 0\), which was lost the moment we divided by \(y\). The initial condition gives \(A = 3\), so \(y = 3e^{x^2}\). Check: \(y' = 6xe^{x^2}\) and \(2xy = 6xe^{x^2}\). They agree.
Worked example: y′ = −x/y and implicit solutions
Solve \(y' = -\frac{x}{y}\) with \(y(0) = 3\). Multiplying by \(y\) separates it at once: \(y\,dy = -x\,dx\). Integrating both sides gives \(\frac{y^2}{2} = -\frac{x^2}{2} + C\), which tidies into
Every solution curve is a circle centred at the origin; the initial condition gives \(K = 9\), the circle of radius 3. If you do solve for \(y\), the condition \(y(0) = 3 > 0\) picks the positive branch \(y = \sqrt{9 - x^2}\). Notice two things: an implicit form like \(x^2 + y^2 = 9\) is a complete answer, and the solution exists only for \(|x| < 3\), so the domain is part of the result.
Solutions lost by dividing
Separation divides by \(h(y)\), and division by zero is illegal, so any constant value \(y = c\) with \(h(c) = 0\) is quietly dropped. Those constants are genuine solutions: if \(h(c) = 0\), then \(y' = g(x) \cdot 0 = 0\), and the constant function \(y = c\) satisfies the equation everywhere. Take \(y' = 9 - y^2\), which factors as \(1 \cdot (9 - y^2)\). Since \(h(3) = h(-3) = 0\), separation produces only the moving curves; the two equilibrium solutions \(y = 3\) and \(y = -3\) must be checked and listed by hand. Always ask: what did I divide by, and where is it zero?
Newton's law of cooling, solved
A hot drink cools at a rate proportional to how much hotter it is than its surroundings: \(\frac{dT}{dt} = -k(T - A)\), where \(A\) is the room temperature. The model assumes the room stays at \(A\) and the drink has one uniform temperature. The equation is separable: \(\frac{dT}{T - A} = -k\,dt\), so \(\ln|T - A| = -kt + C\) and
A bowl of soup starts at 80 degrees Celsius in a 20-degree kitchen, and after 10 minutes it is 50 degrees. Then \(30 = 60e^{-10k}\), so \(k = \frac{\ln 2}{10} \approx 0.069\) per minute. Check: \(T(10) = 20 + 60 \cdot \frac{1}{2} = 50\).
A flushing tank
A 200-litre tank contains 8 kg of dissolved salt. Fresh water flows in at 4 litres per minute, the well-mixed solution flows out at the same rate, and the volume stays 200 litres. Salt leaves at concentration times flow: \(\frac{S}{200} \cdot 4\) kg per minute, so \(\frac{dS}{dt} = -0.02S\). This is the decay equation again, and separation gives \(S(t) = 8e^{-0.02t}\). After 20 minutes, \(S = 8e^{-0.4} \approx 5.4\) kg. The modelling principle is rate in minus rate out; here the rate in is zero. Any well-mixed tank flushed by fresh water, with inflow equal to outflow, decays exactly like this.
Orthogonal trajectories
Separation also answers a geometric question: given a family of curves, find the family that crosses it at right angles. Start with the cubics \(y = cx^3\). Differentiating and eliminating \(c\), using \(c = \frac{y}{x^3}\), gives the slope of this family: \(y' = 3cx^2 = \frac{3y}{x}\). A perpendicular curve has the negative reciprocal slope, \(-\frac{x}{3y}\), and that equation is separable: \(3y\,dy = -x\,dx\). Integrating gives \(\frac{3y^2}{2} = -\frac{x^2}{2} + C\), or
The orthogonal family is a set of ellipses, crossing each cubic at right angles. This is not just a curiosity: in physics, field lines cross equipotential curves exactly this way.
When solutions blow up
Linear equations are forgiving: their solutions exist wherever the coefficients are continuous. Nonlinear equations are not. Solve \(y' = y^2\) with \(y(0) = 1\). Separating gives \(\frac{dy}{y^2} = dt\), so \(-\frac{1}{y} = t + C\), and the initial condition gives \(C = -1\). Solving for \(y\):
The solution races off to infinity as \(t\) approaches 1, even though the equation looks harmless. A solution is a function on a domain, not a formula that holds everywhere, and finding that domain is part of solving the problem.
Common mistakes to avoid
First, trying to separate an equation that is a sum, such as \(y' = x + y\); no rearrangement makes it a product of an \(x\)-factor and a \(y\)-factor. Second, mishandling the constant when exponentiating: \(\ln|y| = x^2 + C\) means \(y = Ae^{x^2}\), never \(y = e^{x^2} + e^C\), because exponents turn sums into products. Third, forgetting the constant solutions at zeros of \(h(y)\), lost to the division. Fourth, taking the wrong branch of a square root: with \(y(0) = 3\), the solution uses the positive branch, and it cannot jump to a negative one.
Key takeaways
An equation is separable when it factors as \(\frac{dy}{dx} = g(x)h(y)\). The method: divide by \(h(y)\), write \(\frac{dy}{h(y)} = g(x)\,dx\), integrate both sides with a single constant, then apply the initial condition and solve for \(y\) if useful; implicit answers count. Constant solutions at zeros of \(h(y)\) are lost by the division and must be added back. Cooling and tank-flushing models fall to the same procedure, orthogonal trajectories come from separating the negative-reciprocal slope, and nonlinear solutions can blow up, so report the domain.
Flashcards
Flashcard
dy/dx = g(x) · h(y)
Test your understanding
Question 1 of 5
Which of these equations is separable?
Question 2 of 5
Solve dy/dx = 2xy with y(0) = 3.
Question 3 of 5
Which value is a constant (equilibrium) solution of y′ = 9 − y²?
Question 4 of 5
Soup at 80 degrees Celsius sits in a 20-degree kitchen. After 10 minutes it is 50 degrees. Using T = 20 + 60e^(−kt), what is k?
Question 5 of 5
A 200-litre tank holds 8 kg of dissolved salt. Fresh water flows in at 4 litres per minute and the mixed solution flows out at 4 litres per minute. About how much salt remains after 20 minutes?
Standards: 7
