Separable differential equations
Separable differential equations are first-order equations whose right side splits into a factor depending only on the independent variable and a factor depending only on the unknown:
$$\frac{dy}{dx} = f(x)\,g(y)$$
When an equation has that shape you can gather the $y$ material on one side and the $x$ material on the other and integrate each side by itself. The test is whether the right side factors, not whether it looks simple. $y' = x + y$ does not separate. $y' = xy + x$ does, because it is $x(y + 1)$.
Two things go wrong with this method, and neither is an integration mistake. One is forgetting that the arbitrary constant appears before you solve for $y$, not after. The other is that the separation step divides by $g(y)$, and division quietly deletes solutions.
Why “multiply by $dx$” is allowed
Written honestly, the first step is to divide by $g(y)$ while leaving the derivative intact:
$$\frac{1}{g(y)}\frac{dy}{dx} = f(x)$$
Now integrate both sides with respect to $x$. On the right that is just $\int f(x)\,dx$. On the left, set $u = y(x)$, so $du = y'(x)\,dx$, and the substitution rule turns the integral into
$$\int \frac{1}{g(y(x))}\frac{dy}{dx}\,dx = \int \frac{du}{g(u)}$$
which is an ordinary integral in one variable. The familiar shorthand $\frac{dy}{g(y)} = f(x)\,dx$ is a compressed record of that substitution. It is not an algebraic manipulation of a fraction, because $dy/dx$ is not a fraction and $dy$ and $dx$ are not numbers you can move around. The step is legal because the chain rule, run backwards, makes it legal. Leibniz notation was designed so that the substitution would look like cancellation, and it does, but the justification lives in the substitution rule.
A worked initial value problem
Solve $\dfrac{dy}{dx} = 2xy$ with $y(0) = 3$. Separate and integrate:
$$\int \frac{dy}{y} = \int 2x\,dx \quad\Longrightarrow\quad \ln|y| = x^2 + C$$
There is one constant, not two. Both integrations produce a constant and they combine into a single $C$ on whichever side you like. Exponentiate:
$$|y| = e^{x^2 + C} = e^{C}e^{x^2} \quad\Longrightarrow\quad y = Ae^{x^2}$$
where $A = \pm e^{C}$ absorbs the sign and the exponential. Only now apply the initial condition: $y(0) = Ae^{0} = A = 3$, so
$$y = 3e^{x^2}$$
Substitute it back into the equation, which is the check that costs nothing. Differentiating gives $y' = 3e^{x^2}\cdot 2x = 2x\left(3e^{x^2}\right) = 2xy$, and $y(0) = 3e^{0} = 3$. Both conditions hold. Numerically, at $x = 1$ the solution is $3e = 8.1548$ and its slope is $6e = 16.3097$, which is $2 \times 1 \times 8.1548$, as the equation demands.
There is a second route that never separates anything. The equation is linear, $y' - 2xy = 0$, so multiply by the integrating factor $\mu = e^{-x^2}$:
$$\left(ye^{-x^2}\right)' = y'e^{-x^2} - 2xye^{-x^2} = 0 \quad\Longrightarrow\quad ye^{-x^2} = C \quad\Longrightarrow\quad y = Ce^{x^2}$$
Same family. Worth noticing is where the two derivations differ. The separated version passed through $\ln|y|$, which requires $y \neq 0$ and produces $A = \pm e^{C}$, a quantity that is never zero. The integrating-factor version divides by nothing and allows $C = 0$. Hold on to that difference.
The solutions separation throws away
$y \equiv 0$ solves $y' = 2xy$: the left side is $0$ and the right side is $2x \cdot 0 = 0$. It is a genuine solution, and the separation step lost it, because dividing by $y$ assumed $y$ was not zero. Here the damage is cosmetic, since you can recover it by letting $A = 0$ in $y = Ae^{x^2}$ after the fact. It is not always cosmetic.
Take the logistic equation
$$\frac{dy}{dx} = y(1 - y)$$
The right side vanishes at $y = 0$ and at $y = 1$, so both constants are solutions: a quantity sitting at either value has zero rate of change and stays there forever. These are the equilibrium solutions, and in general they are exactly the roots of $g(y)$.
Separating divides by $y(1-y)$, which is precisely the quantity that is zero at those two values. Partial fractions give $\frac{1}{y(1-y)} = \frac{1}{y} + \frac{1}{1-y}$, so
$$\ln|y| - \ln|1-y| = x + C \quad\Longrightarrow\quad \frac{y}{1-y} = Ke^{x} \quad\Longrightarrow\quad y = \frac{1}{1 + Ae^{-x}}$$
with $A = 1/K$. Starting from $y(0) = \tfrac{1}{2}$ forces $1 + A = 2$, so $A = 1$ and $y = 1/(1 + e^{-x})$, the standard logistic curve, worth $0.880797$ at $x = 2$. Check it: $y' = e^{-x}(1+e^{-x})^{-2}$, while $y(1-y) = \frac{1}{1+e^{-x}} \cdot \frac{e^{-x}}{1+e^{-x}}$, the same expression.
Now look at what that family can produce. Setting $A = 0$ gives $y \equiv 1$, so one equilibrium survives. No finite $A$ gives $y \equiv 0$, because $1/(1 + Ae^{-x})$ is never zero. The constant solution $y \equiv 0$ is missing from the general solution outright, and it is not an edge case nobody cares about: it is the statement that a population starting at zero stays at zero. An answer written as “the general solution is $y = 1/(1+Ae^{-x})$” is incomplete, and no amount of checking the algebra will reveal it, because the algebra is correct. The solution was gone before the integration started.
The logistic equation is not a special case chosen to make the point. Try $y' = y^2 - 4$, whose equilibria are $y = \pm 2$. Separating and using partial fractions gives $\frac{y-2}{y+2} = Ke^{4x}$, and solving for $y$ produces $y = \dfrac{2(1 + Ke^{4x})}{1 - Ke^{4x}}$. Setting $K = 0$ returns $y \equiv 2$. Asking for $y \equiv -2$ requires $2 + 2Ke^{4x} = -2 + 2Ke^{4x}$, that is $2 = -2$, so no value of $K$ produces it. One equilibrium slips back into the family and the other cannot, and which one it is depends on algebra that has nothing to do with the differential equation.
So the separation step has a mandatory companion. Before dividing by $g(y)$, solve $g(y) = 0$, write down each root as a constant solution, and then check at the end whether the family you derived happens to contain it. If it does, say so. If it does not, list it separately.
That habit is the difference between a method and a recipe, and it is worth practising on equations where the equilibria are easy to miss: the separable equations drill supplies them, and the study guide section on separable equations works through the substitution argument and the lost-solution case in more detail.
References
- Strang, Gilbert, and Edwin Herman. “4.3 Separable Equations.” Calculus Volume 2, OpenStax, Rice University, 2016, https://openstax.org/books/calculus-volume-2/pages/4-3-separable-equations.