A first order equation is separable when you can write $\dfrac{dy}{dx}=g(x)h(y)$. Every factor that depends only on $x$ can move to one side. Every factor that depends only on $y$ can move to the other. Then both sides become integrals you already know how to attempt.

The method is popular because so many first course models factor this way: exponential growth, cooling, some mixing problems, and the simplest autonomous equations. It is not a universal solvent. If the right hand side will not factor as $g(x)h(y)$, forcing the algebra invents a different equation.

Zoom out on the differential equations pillar. Refresh what a slope number means in what a derivative actually measures. This walkthrough is part of the explainer library, and it is the differential equation step on the AP Calculus AB bridge. The scalar growth equation below is also the one dimensional picture on eigenvalues in plain language: the constant $k$ is the eigenvalue of a $1\times 1$ matrix.

The steps, in the order that avoids lost solutions

  1. Write $\dfrac{dy}{dx}=g(x)h(y)$, and pause. If $h(y_*)=0$ for a constant $y_*$, then $y(x)\equiv y_*$ has derivative $0$ and matches the equation. Those constants are solutions. Write them down before you divide.
  2. If $h(y)\neq 0$, rewrite $\dfrac{1}{h(y)}\,dy = g(x)\,dx$.
  3. Integrate both sides: $\displaystyle\int \frac{1}{h(y)}\,dy = \int g(x)\,dx + C$. Absorb constants so that you have one $C$, not three.
  4. Solve for $y$ if you can. That is an explicit solution. If you cannot, leave an implicit relation $F(x,y)=C$.
  5. Apply an initial condition $y(x_0)=y_0$ to fix $C$ when you have an initial value problem. Check that the constant solutions from step 1 were not the intended IVP answer.
  6. Name a domain. A formula that crosses a vertical asymptote or a zero of $h$ may be valid only on an interval, not on the whole line.

Exponential growth, including the missing zero

Example Solve $\dfrac{dy}{dx}=ky$ with $y(0)=y_0$. Here $g(x)=k$ and $h(y)=y$. The constant $y\equiv 0$ solves the equation. For $y\neq 0$, separate:

$$\frac{dy}{y}=k\,dx.$$

Integrate: $\ln|y|=kx+C$, so $y=Ae^{kx}$ with $A=\pm e^{C}$. The missing solution $y\equiv 0$ corresponds to $A=0$, which you can include by allowing $A$ to be any real number. The initial condition yields $y=y_0 e^{kx}$, and this formula also covers $y_0=0$.

The slope field is simple. On the line $y=0$ the marks are horizontal. Above it, for $k>0$, the marks tilt up more steeply as $|y|$ grows. Solutions that start positive stay positive. That is the geometric reason the absolute value in $\ln|y|$ did not create a path from a positive start down through zero.

A separable equation whose solution stays implicit

Example Solve $\dfrac{dy}{dx}=\dfrac{x}{y}$ with $y(1)=2$. First, $h(y)=1/y$ is never zero, but it is undefined at $y=0$. There is no constant solution. Separate:

$$y\,dy = x\,dx.$$

Integrate: $\tfrac12 y^2 = \tfrac12 x^2 + C$, or $y^2-x^2=K$. The initial point $(1,2)$ gives $K=3$, so $y^2-x^2=3$. The explicit branch that meets the initial point is $y=\sqrt{x^2+3}$, which is defined for all $x$ and stays positive. The negative square root is a different solution curve. It does not pass through $(1,2)$.

This is the same geometry as a family of hyperbolas. The differential equation only asks that the tangent slope equal $x/y$. Implicit differentiation of $y^2-x^2=3$ recovers $2y y'-2x=0$, hence $y'=x/y$ wherever $y\neq 0$. The implicit relation was already the solution.

A logistic style factor and a lost equilibrium

Example Consider $\dfrac{dy}{dx}=y(2-y)$. Then $g(x)=1$ and $h(y)=y(2-y)$. The roots $y=0$ and $y=2$ are constant solutions. They are equilibria of an autonomous equation. For other $y$,

$$\frac{dy}{y(2-y)}=dx.$$

Partial fractions give $\tfrac12\ln|y|-\tfrac12\ln|2-y|=x+C$, which rearranges to $\dfrac{y}{2-y}=Ae^{2x}$. Solving for $y$ produces a family of logistic looking curves that run from near $0$ toward $2$ when $A>0$ and the start is between the equilibria. If you divided first and never listed $y=0$ and $y=2$, those two solutions would have vanished from your writeup even though they satisfy the original equation. The partial fraction decomposition calculator writes $1/(y(2-y))$ as $(1/2)/y - (1/2)/(y-2)$ if you enter numerator $1$ and denominator $y(2-y)$. That is the same split: $2-y = -(y-2)$, so the minus sign sits on the second coefficient, and the integral is still $\tfrac12\ln|y|-\tfrac12\ln|2-y|$.

Example Add the initial condition $y(0)=1$. Then $1/(2-1)=A$, so $A=1$ and $y/(2-y)=e^{2x}$. Solving for $y$ gives

$$y=\frac{2e^{2x}}{1+e^{2x}}.$$

At $x=0$ this is $2/2=1$. As $x$ grows, $y$ approaches $2$ from below and never reaches it. As $x$ runs to $-\infty$, $y$ approaches $0$ from above. The constant solutions are fences. This formula lives on the whole line because the denominator $1+e^{2x}$ never vanishes. That is a fact about this solution, not a general license. The next examples show a formula that stays smooth forever and a formula that does not.

Read the sign of $y'=y(2-y)$ before you trust the picture. If $y<0$, the product is negative, so solutions decrease and move away from $0$. If $0<y<2$, both factors are positive, so solutions increase toward $2$. If $y>2$, the product is negative, so solutions decrease toward $2$. The equilibrium $0$ is unstable. The equilibrium $2$ is stable. A slope field would show horizontal marks on those two lines and arrows pointing as the signs just said.

Pitfall. Absolute values and domains matter. Extending a local solution through a singularity of $h(y)$ or $g(x)$ can be invalid. Dividing by an expression that might be zero loses constant solutions. Also, not every ODE is separable. A right hand side such as $x+y$ will not factor as $g(x)h(y)$. Treating it as if it did is a different problem.

A sum is not a product

Example The equation $\dfrac{dy}{dx}=x+y$ is not separable. Suppose there were functions $g$ and $h$ with $g(x)h(y)=x+y$ for all $x$ and $y$ near the origin. Set $y=0$. Then $g(x)h(0)=x$. If $h(0)=0$, the left side is $0$ and the right side is $x$, which is absurd. If $h(0)\neq 0$, then $g(x)=x/h(0)$, so

$$\frac{x}{h(0)}\,h(y)=x+y$$

for all $x$ and $y$. Put $x=1$. Then $h(y)/h(0)=1+y$, so $h(y)=h(0)(1+y)$. Substitute back: $x(1+y)=x+y$ for all $x$ and $y$, hence $xy=y$ for all $y$, which is false. The factorization does not exist. Equations of the form $y'+p(x)y=q(x)$ are a later method, an integrating factor. Forcing a separation here does not solve $y'=x+y$. It solves something else, or it solves nothing.

By contrast, $\dfrac{dy}{dx}=xy$ is separable, with $g(x)=x$ and $h(y)=y$. And $\dfrac{dy}{dx}=y/x$ is separable wherever $x\neq 0$, with $g(x)=1/x$ and $h(y)=y$. The test is a product, not a vague feeling that $x$ and $y$ both appear.

Cooling toward a constant you must not lose

Example Let $\dfrac{dT}{dt}=-0.1\,(T-20)$ with $T(0)=80$. The number $20$ is a fixed room temperature in this classroom model, and $0.1$ is a positive rate constant. Set $u=T-20$. Then $u'=-0.1\,u$ and $u(0)=60$. This is the exponential equation already solved, with $k=-0.1$. The constant $u\equiv 0$, meaning $T\equiv 20$, solves the differential equation and does not meet the initial condition. For the initial value we want,

$$T=20+60e^{-0.1 t}.$$

Check it. The derivative is $60\cdot(-0.1)e^{-0.1 t}=-0.1\,(T-20)$, which is the original right hand side. And $T(0)=80$. At $t=10$, the formula gives $20+60e^{-1}$, about $42.1$. The slope there is $-0.1$ times about $22.1$, so about $-2.2$. The explicit derivative $-6e^{-1}$ is the same number. The numerical derivative calculator should land near that slope if you enter the explicit formula and a modest step.

As $t$ grows, $T$ falls toward $20$ and does not cross it. The constant solution you would have lost by dividing is the horizontal asymptote of the solution you kept. The formula is valid for every real $t$, because the exponential never breaks. Name that domain in the writeup. "Valid for all $t$" is a conclusion you earned here, not a default.

A formula that stops at a vertical wall

Example Solve $\dfrac{dy}{dx}=y^2$ with $y(0)=1$. Here $h(y)=y^2$, so $y\equiv 0$ is a constant solution. It does not satisfy $y(0)=1$. For $y\neq 0$,

$$\frac{dy}{y^2}=dx.$$

Integrate: $-1/y=x+C$. The initial condition gives $-1=C$, so $-1/y=x-1$, and

$$y=\frac{1}{1-x}.$$

Differentiate to audit. The derivative of $(1-x)^{-1}$ is $(1-x)^{-2}$, which equals $y^2$. The initial value is $1$. The algebra succeeded, and the formula still cannot be the solution on the whole line. The denominator vanishes at $x=1$. Starting at $x=0$, the solution increases and becomes infinite as $x$ approaches $1$ from the left. The interval that contains the initial time and stays inside the hypotheses is $x<1$.

The same expression $1/(1-x)$ is negative for $x>1$, and on that side it does solve $y'=y^2$. It is not a continuation of the solution that passed through $(0,1)$. A vertical asymptote split the plane. Copying the formula across the wall silently changes which solution you are talking about. When you report an answer, name the interval.

Pitfall. A separated antiderivative can look global while the solution is local. Check three things before you extend a formula. Does it still satisfy the differential equation? Does it still meet the initial condition without a jump? Does it cross a zero of $h$, a zero of a denominator, or a vertical asymptote? If it does, stop at that wall and say so.

A decision framework

  1. Look at the right hand side. If it is a sum of a piece that depends on $x$ and a piece that depends on $y$, it is probably not separable. The argument for $x+y$ shows how to prove a refusal when you need one.
  2. If it factors, write $g(x)$ and $h(y)$ on a domain where both make sense.
  3. List the roots of $h$. Each root is a constant solution. Compare those constants with the initial condition before you divide.
  4. Separate, integrate, and keep a single constant $C$.
  5. Apply the initial condition to the whole family, including the constant solutions. Plug the point into the integrated relation, not into an unfinished integral.
  6. If you cannot solve for $y$, keep the implicit relation. Check it by implicit differentiation, the way the hyperbola example recovered $y'=x/y$.
  7. Differentiate an explicit answer and substitute back into the original equation.
  8. Name the interval. Equilibria of an autonomous equation are fences. A blowup, as in $y=1/(1-x)$, ends the solution that started on the other side of the wall.

How to know you understood

  1. State the factor test. You need $\dfrac{dy}{dx}=g(x)h(y)$, not merely an equation that mentions both variables.
  2. For $\dfrac{dy}{dx}=ky$ and $y(0)=y_0$, recover $y=y_0 e^{kx}$, and say why $y_0=0$ had to be checked separately.
  3. For $\dfrac{dy}{dx}=x/y$ and $y(1)=2$, get $y^2-x^2=3$ and choose the positive branch.
  4. For $\dfrac{dy}{dx}=y(2-y)$, name the equilibria $0$ and $2$, and say that solutions between them increase toward $2$.
  5. For $\dfrac{dy}{dx}=y^2$ and $y(0)=1$, get $y=1/(1-x)$ and refuse to use that expression at $x=1$ and beyond as the same solution.
  6. For the cooling model, compute the derivative of $20+60e^{-0.1 t}$ and match it with $-0.1\,(T-20)$.

What a solution is promising

Solving $y'=f(x,y)$ means finding a function whose slope at each point matches the rule $f$. An initial condition selects one curve from a family. Existence and uniqueness theorems tell you when that selection is reliable, roughly when $f$ is smooth enough near the starting point. Separable algebra can still produce a formula that leaves the interval where uniqueness holds. The formula is not a license to ignore the hypotheses.

Before you integrate, a slope field is worth a sketch. At each point $(x,y)$ draw a short segment with slope $f(x,y)$. Solution curves must thread those segments. Equilibria where $y'=0$, and whether nearby solutions approach or flee them, often matter more than a closed form.

Try it with practice tools

This page does not separate an equation for you. Two calculus tools still let you practice the pieces of the method. After you separate, you integrate. The Riemann sum calculator estimates definite integrals by adding rectangle areas. That is a numerical cousin of the antiderivative step, useful when you want to see accumulation rather than guess an antiderivative. After you have an explicit $y(x)$, the numerical derivative calculator estimates $y'(x_0)$. You can compare that slope with $g(x_0)h(y(x_0))$ from the original equation.

Try it. For $y=2e^{0.5x}$, which solves $y'=0.5y$ with $y(0)=2$, open the numerical derivative calculator near $x=0$ and confirm the slope is about $1$. Then check $0.5\cdot y(0)=1$. Next, on the Riemann sum calculator, estimate $\int_0^1 0.5\,dx$ as a reminder that the separated $x$ side really is an ordinary integral. The tools do not replace the algebra. They audit the calculus you used.

Audit a proposed explicit solution by estimating its slope, then compare that number with the original right hand side.

Open the derivative calculator

Next step, when the order is two

Separation is a first order method. A constant-coefficient equation $a y''+b y'+c y=0$ is a different family. The characteristic equation $a r^2+b r+c=0$ sorts it into two real roots, one repeated root, or a complex pair. The second order differential equation calculator writes that algebra and, when you give $y(x_0)$ and $y'(x_0)$, solves for the two constants. If you already have two or three candidate solutions, the Wronskian calculator builds the determinant that tests linear independence. A zero at one point is not, by itself, a proof of dependence. A different route, once those initial values are known, is the Laplace transform. The Laplace transform calculator applies the table and inverts the transform of y. It is not a separation method.

How to practice

  1. Ask whether the right hand side factors as $g(x)h(y)$ before you move anything.
  2. List constant solutions from $h(y)=0$.
  3. Separate, integrate, and simplify $C$ once.
  4. Plug the initial point into the family, not into an unfinished integral.
  5. Differentiate your answer and substitute back. If the original equation does not return, the algebra slipped.

Glossary anchors: differential equation, initial value problem, slope field, integral.

Citations and further reading

Last reviewed: 21 September 2026.