ordinary differential equations
Separation of Variables
You should know: first order differential equation
Overview
Separation of variables is a method for solving ordinary and partial differential equations in which algebra allows the equation to be rewritten so that each of two variables occurs on a different side of the equation. For a first-order ODE dy/dx = g(x)h(y), this means moving every y-dependent piece (including dy) to one side and every x-dependent piece (including dx) to the other, so that each side can be integrated independently, one variable at a time.
Intuition
Separation of variables works whenever the rate of change dy/dx factors cleanly into 'a piece that depends only on x' times 'a piece that depends only on y.' Once split apart like that, dy/h(y) and g(x)dx are just two ordinary one-variable integrals — the coupling between x and y disappears entirely during the integration step and only comes back when you combine the two antiderivatives into a single implicit (or explicit) relationship between y and x.
Formal Definition
A first-order ODE is separable if it can be written in the form below; dividing by h(y) and integrating both sides solves it:
Notation
| Notation | Meaning |
|---|---|
| The factor of the right-hand side depending only on the independent variable x | |
| The factor of the right-hand side depending only on the dependent variable y | |
| A constant solution lost when dividing by h(y); must be checked separately |
Derivation
Formally, the separation step can be justified by treating dy/dx as a genuine ratio (via the chain rule) rather than mere notation: writing y = f(x), the equation f′(x) = g(x)h(f(x)) rearranges as follows.
Original ODE with y = f(x) made explicit
Divide both sides by h(f(x))
Integrate both sides with respect to x
Substitute y = f(x) on the left, converting the integral to one in y (change of variables)
Applications
Worked Examples
Recognize g(x) = x and h(y) = y, then separate.
Integrate both sides.
Exponentiate and absorb the constant.
Apply y(0) = 3 to find A.
Answer: y = 3e^(x²/2)
Practice Problems
Solve dy/dx = -2xy² with y(0) = 1.
Solve Newton's law of cooling dT/dt = -k(T - 20) with T(0) = 100.
Common Mistakes
Dividing by h(y) without checking whether h(y) = 0 for some constant y, which silently discards valid 'singular' solutions.
Before dividing by h(y), check values y₀ where h(y₀)=0 — the constant function y = y₀ is always itself a solution to dy/dx = g(x)h(y), and it can be lost during separation.
Treating dy/dx purely as notation and refusing to 'split' it, or conversely treating the separation step as fully rigorous algebra rather than a shorthand for the substitution/integration argument.
The dy/dx split is justified rigorously via the chain rule and change of variables in the integral (as in the derivation), so it is safe to use as a computational shortcut once you understand why it works.
Quiz
Summary
- Separation of variables applies to ODEs of the form dy/dx = g(x)h(y), where the right side factors into an x-only and a y-only piece.
- The method rewrites the equation as dy/h(y) = g(x)dx, then integrates each side independently.
- Constant solutions where h(y)=0 must be checked separately since they can be lost when dividing by h(y).
- The technique solves classic models: exponential growth/decay, Newton's law of cooling, and the logistic equation.
- It generalizes to some partial differential equations, where a solution is sought as a product of single-variable functions.
Mathematics