On this page
Separable equations are usually the first differential equations you learn to solve, and many later methods turn a harder equation into one of these. Three slips are common: a solution lost when you divide, a careless constant, and a missed substitution.
What is a variable separable differential equation?
OpenStax defines a separable differential equation as any equation that can be written in the form y′ = f(x)g(y) (OpenStax Calculus Volume 2, section 4.3). In words, the right-hand side breaks into a function of x only, multiplied by a function of y only.
To test an equation, try to factor the right-hand side:
dy/dx = xy is separable: f(x) = x and g(y) = y.
dy/dx = e^(x+y) is separable once you write it as e^x times e^y.
dy/dx = x + y is not separable. A sum does not split into a product.
How do you solve a separable equation, step by step?
The OpenStax problem-solving strategy has five steps:
Find the values of y where g(y) = 0. Each one gives a constant solution.
Rearrange to dy/g(y) = f(x) dx.
Integrate both sides.
Solve for y if you can. OpenStax notes that it is not always possible to write y as an explicit function of x.
Use the initial condition to find the constant.
Worked example: solve dy/dx = xy with y(0) = 2.
Step 1: g(y) = y is zero at y = 0, so y = 0 is a solution. Check it: both sides are 0.
Step 2: for y ≠ 0, dy/y = x dx.
Step 3: ln|y| = x²/2 + C.
Step 4: |y| = e^C · e^(x²/2), so y = A·e^(x²/2), where A = ±e^C. Letting A = 0 brings back the solution from step 1, so one formula covers every case.
Step 5: y(0) = A·e^0 = A = 2, so y = 2e^(x²/2).
Check: dy/dx = 2x·e^(x²/2) = x·y. It works. If you want a habit for this last step, our guide on checking whether a function solves a differential equation walks through it.
Where does the constant of integration go?
Integrating both sides gives two constants, one on each side. Move them to one side and they combine into a single C, so you only ever need one. You can rename it (C became e^C, then A) as long as you track which values it can take. Writing ln|C| instead of C is a common shortcut. Our post on why log C appears in differential equations explains when that is safe.
The general solution is a family of curves, one for each value of A. The initial condition chooses one of them. In the diagram above, the highlighted curve is the only member of the family that passes through (0, 2).
What if the equation is not separable yet?
Some equations become separable after you change the variable. Paul's Online Notes from Lamar University describes two standard substitutions: v = y/x for equations of the form dy/dx = F(y/x), and v = ax + by for equations of the form dy/dx = G(ax + by).
First example: dy/dx = (x + y)². Let v = x + y. Then dv/dx = 1 + dy/dx = 1 + v². Separating gives dv/(1 + v²) = dx, so tan⁻¹ v = x + C. That gives y = tan(x + C) − x. Check: dy/dx = sec²(x + C) − 1 = tan²(x + C) = (x + y)².
Second example: dy/dx = 1 + y/x. The right-hand side depends only on y/x, so put y = vx. Then dy/dx = v + x·dv/dx, and the equation becomes v + x·dv/dx = 1 + v. That leaves dv = dx/x, so v = ln|x| + C and y = x·ln|x| + Cx. If the equation has constant terms, such as (x + y + 1)/(x − y + 3), first shift the origin. Our guide on reducing equations to homogeneous form shows how.
A checklist before you hand in the answer
Does the right-hand side factor into f(x)·g(y)? If not, would v = y/x or v = ax + by turn it into that form?
Did you note every y where g(y) = 0 before dividing?
Is there exactly one constant, and do you know which values it can take?
Did you use the initial condition to find a number for the constant?
Does your answer satisfy the original equation when you differentiate it?
If your answer keeps coming out wrong and you cannot see which step broke, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. If the gap is further back, in integration or logarithms, the Fermi Concept Library gives each concept its own lesson.
Next step: solve three textbook equations, ticking off the five steps as you go.



