A separable differential equation is one you can write as dy/dx = f(x) · g(y). To solve it, move every y to one side and every x to the other, so dy / g(y) = f(x) dx, then integrate both sides and add one constant C. Use the initial condition to find C, and check whether g(y) = 0 gives a constant solution that the division threw away.
This guide starts with a quick test for whether an equation separates at all, then works five examples that get harder in a deliberate order: an implicit answer, an exponential one, one that blows up, Newton's law of cooling and logistic growth. Each one adds a single new idea.
dy/dx = f(x) · g(y), then for g(y) ≠ 0: ∫ dy / g(y) = ∫ f(x) dx + C. Every root y = c of g(y) = 0 is also a solution (a horizontal line), and it must be checked separately.What Makes a Differential Equation Separable?
The right side has to break into a product: one factor that only contains x, times one factor that only contains y. Either factor may be a constant. That's all "separable" means, and it's worth checking before you start, because separating an equation that isn't separable produces nonsense that looks like algebra.
Factoring is the main tool. An expression that looks tangled often splits once you group terms.
| Equation | Separable? | Why |
|---|---|---|
dy/dx = 6x²y | Yes | f(x) = 6x², g(y) = y |
dy/dx = (x + 1)/y | Yes | (x + 1) · (1/y) |
dy/dx = e^(x − y) | Yes | exponent rules: eˣ · e^(−y) |
dy/dx = xy + 3y − 2x − 6 | Yes | group: y(x + 3) − 2(x + 3) = (x + 3)(y − 2) |
dy/dx = y² | Yes | f(x) = 1; a missing x is fine |
dy/dx = x + y | No | a sum, and no factoring turns it into a product |
dy/dx = sin(xy) | No | x and y are locked inside one function |
dy/dx = ln(xy) | No | it equals ln x + ln y, a sum, not a product |
The last row is a good trap. A log of a product looks like a product, but the log rule turns it into a sum, and a sum can't be separated. The e^(x − y) row is the opposite case: an exponent of a difference becomes a product, so it does separate.
How to Solve a Separable Differential Equation
- Write it as f(x) · g(y)
Factor the right side until the x part and the y part are clearly separate.
- Find the constant solutions
Solve
g(y) = 0before you divide. These are also called equilibrium solutions. Each rooty = cmakes both sides zero, so the horizontal liney = cis a solution. Write it down now so you don't lose it. - Separate
Divide by
g(y)and multiply bydx:dy / g(y) = f(x) dx. Treatingdy/dxlike a fraction here is shorthand for the chain rule, and it's safe in this step. - Integrate both sides, with one C
Two constants appear, but they merge into a single C on the x side.
- Use the initial condition, then solve for y
Plug in the given point to find C. Then solve for y if you can, using the initial value to choose any sign or branch.
- State where the answer is valid
If the formula divides by zero or takes a root of a negative number somewhere, the solution only lives on the interval around the starting x.
Step 4 is ordinary integration, so anything you've learned there applies. Many separated integrals need a u-substitution, and the logistic equation below needs partial fractions.
Worked Examples From Basic to Blow-Up
Solve dy/dx = x/y with y(0) = 3.
Here g(y) = 1/y, which is never zero, so there are no constant solutions to save. Multiply both sides by y dx: y dy = x dx.
Integrate: y²/2 = x²/2 + C.
Plug in the point right away: 9/2 = 0 + C, so C = 9/2. Multiply by 2: y² = x² + 9. That's a correct implicit solution, and because C is now fixed, it's the particular solution through (0, 3) rather than the general family.
Solving for y gives y = ±√(x² + 9). The starting value 3 is positive, so take the positive root.
y = √(x² + 9), valid for all xSolve dy/dx = 2xy with y(0) = 5.
Constant solutions first: g(y) = y = 0, so y = 0 is a solution. Note it.
For y ≠ 0, separate: dy/y = 2x dx. Integrate: ln|y| = x² + C.
Exponentiate both sides: |y| = e^(x² + C) = eᶜ · e^(x²). Removing the absolute value gives y = ±eᶜ · e^(x²). Rename ±eᶜ as one constant A, so y = A e^(x²). Setting A = 0 puts the lost y = 0 back into the family.
Initial condition: 5 = A e⁰ = A.
y = 5e^(x²)Why does A swallow the ± sign? Because eᶜ can be any positive number, so ±eᶜ covers every nonzero number. This is the same A₀ e^(kt) shape you see in exponential growth and decay: dy/dt = ky is the simplest separable equation there is.
Solve dy/dx = y² with y(0) = 1/2, and say where the solution is valid.
Constant solutions: y² = 0 gives y = 0.
Separate: y⁻² dy = dx. Integrate: −1/y = x + C.
Initial condition: −1/(1/2) = −2 = 0 + C, so C = −2. Then −1/y = x − 2, which flips to y = 1/(2 − x).
The formula divides by zero at x = 2. The solution starts at x = 0, so it lives on the piece of the graph that contains 0: every x below 2. As x approaches 2, y shoots up to infinity.
y = 1/(2 − x) for x < 2Nothing in dy/dx = y² warns you about x = 2. The equation looks perfectly smooth, yet the solution reaches infinity in finite time because the slope grows faster than the value. That's why step 6 exists. Also notice that no value of C turns y = −1/(x + C) into y = 0, so if the problem had said y(0) = 0, the only correct answer would be the constant solution you wrote down in the second step.
Adding C after you exponentiate. In Example 2, writing ln|y| = x², then y = e^(x²) + C, then C = 4 gives y = e^(x²) + 4. It passes through (0, 5), so it feels right, but it fails the equation. At x = 1 its slope is 2e ≈ 5.44, while 2xy = 2(e + 4) ≈ 13.44. The constant belongs in the line where you integrate, so it ends up as a multiplier, not an added term.