In short

A variable-separable differential equation is one where you can rearrange the equation so that all terms involving y (and dy) are on one side and all terms involving x (and dx) are on the other. Then you integrate both sides independently. It is the simplest and most common method for solving first-order ODEs.

Radioactive material decays. If you start with N_0 atoms, the number remaining after time t satisfies

\frac{dN}{dt} = -\lambda N

where \lambda > 0 is a constant specific to the material. The rate of decay is proportional to how many atoms are left — fewer atoms, slower decay.

You want N as a function of t. Look at the equation carefully. On the right side, N and t are tangled together only through the derivative \frac{dN}{dt}. If you rewrite the equation as

\frac{dN}{N} = -\lambda\, dt

then the left side involves only N and the right side involves only t. The variables have been separated. Now integrate both sides:

\int \frac{dN}{N} = \int -\lambda\, dt
\ln|N| = -\lambda t + C
N = N_0 e^{-\lambda t}

where N_0 = e^C is the initial number of atoms. Three lines of algebra, and you have the law of radioactive decay — the same exponential curve that governs carbon dating, nuclear medicine, and the half-life calculations you have seen in chemistry.

That is the entire method: separate, then integrate. The rest of this article is about when you can do this, how to handle the details, and what to do with initial conditions.

When separation works

Not every differential equation is separable. The method works when the equation can be written in the form

\frac{dy}{dx} = f(x) \cdot g(y)

or equivalently, after rearranging,

\frac{dy}{g(y)} = f(x)\, dx

The key is that the right-hand side of \frac{dy}{dx} = \ldots is a product (or quotient) of a function of x alone and a function of y alone. If x and y are mixed in a way that cannot be untangled into such a product, the equation is not separable.

Quick test: \frac{dy}{dx} = x^2 y is separable (it is x^2 \cdot y). The equation \frac{dy}{dx} = x + y is not separable — there is no way to write x + y as a product f(x) \cdot g(y).

Variable Separable Form

A first-order ODE is called variable separable if it can be written as

\frac{dy}{dx} = f(x) \cdot g(y)

The solution method is:

Step 1. Separate: \dfrac{dy}{g(y)} = f(x)\, dx

Step 2. Integrate both sides: \displaystyle\int \frac{dy}{g(y)} = \int f(x)\, dx + C

The constant of integration C is placed on one side only — adding a constant to both sides is redundant.

The method in full detail

Take a specific equation and walk through every step.

\frac{dy}{dx} = \frac{x^2}{y}

Step 1. Separate. Multiply both sides by y and by dx:

y\, dy = x^2\, dx

Now the left side has only y and the right side has only x.

Step 2. Integrate both sides.

\int y\, dy = \int x^2\, dx
\frac{y^2}{2} = \frac{x^3}{3} + C

Step 3. Simplify (if you want). Multiply through by 2:

y^2 = \frac{2x^3}{3} + C_1

where C_1 = 2C is still an arbitrary constant. You can leave it in this form — not every solution needs to be solved explicitly for y.

This implicit form y^2 = \frac{2x^3}{3} + C_1 is a perfectly valid general solution. It represents a family of curves in the xy-plane, one for each value of C_1.

A subtlety: dividing by g(y)

When you separate variables, you divide by g(y). If g(y) = 0 for some value of y, you are dividing by zero — and that value of y might be a solution you are losing.

Take \frac{dy}{dx} = y. Separating gives \frac{dy}{y} = dx, which requires y \neq 0. Integrating: \ln|y| = x + C, so y = Ae^x where A = \pm e^C. But y = 0 is also a solution (if y = 0 for all x, then \frac{dy}{dx} = 0 = y). This constant solution y = 0 is recovered by setting A = 0 in y = Ae^x, so in this case no solution is truly lost. But you should always check whether g(y) = 0 gives a solution that the general formula misses.

Initial value problems

An initial value problem (IVP) is a differential equation together with a condition that pins the solution at a specific point: y(x_0) = y_0. This condition eliminates the arbitrary constant and gives you one specific curve.

The recipe: first solve the DE to get the general solution with constant C, then substitute the initial condition to find C.

Take the equation \frac{dy}{dx} = 2xy with the initial condition y(0) = 3.

Separate: \frac{dy}{y} = 2x\, dx (for y \neq 0).

Integrate: \ln|y| = x^2 + C.

Exponentiate: y = Ae^{x^2} where A = \pm e^C.

Apply the initial condition: y(0) = 3 gives Ae^0 = 3, so A = 3.

Particular solution: y = 3e^{x^2}.

This is the one curve in the family y = Ae^{x^2} that passes through the point (0, 3).

The family $y = Ae^{x^2}$ for several values of $A$. The red curve is the particular solution $y = 3e^{x^2}$ — the unique member of the family that passes through $(0, 3)$. Every curve grows rapidly because the exponent $x^2$ accelerates as $x$ moves away from zero.

Worked examples

Example 1: Solve dy/dx = (1 + y²)/(1 + x²)

Step 1. Separate variables. Divide both sides by (1 + y^2), multiply both sides by dx:

\frac{dy}{1 + y^2} = \frac{dx}{1 + x^2}

Why: the right-hand side is a ratio of a function of x and a function of y, so separation is possible. The left side now contains only y, the right side only x.

Step 2. Integrate both sides.

\int \frac{dy}{1 + y^2} = \int \frac{dx}{1 + x^2}
\arctan y = \arctan x + C

Why: both integrals are standard — \int \frac{du}{1+u^2} = \arctan u. The constant C goes on one side only.

Step 3. Solve for y (optional). Take the tangent of both sides:

y = \tan(\arctan x + C)

This can be simplified using the tangent addition formula:

y = \frac{x + \tan C}{1 - x \tan C}

Writing \tan C = k (just another constant):

y = \frac{x + k}{1 - kx}

Why: since C is an arbitrary constant, k = \tan C is also an arbitrary constant. The explicit form shows that the solution is a Möbius transformation in x — a ratio of linear functions.

Step 4. Check. If y = \frac{x+k}{1-kx}, then by the quotient rule:

\frac{dy}{dx} = \frac{(1-kx)(1) - (x+k)(-k)}{(1-kx)^2} = \frac{1 - kx + kx + k^2}{(1-kx)^2} = \frac{1+k^2}{(1-kx)^2}

And \frac{1+y^2}{1+x^2} = \frac{1 + \frac{(x+k)^2}{(1-kx)^2}}{1+x^2} = \frac{(1-kx)^2 + (x+k)^2}{(1-kx)^2(1+x^2)}. Expanding the numerator: (1-kx)^2 + (x+k)^2 = 1 - 2kx + k^2x^2 + x^2 + 2kx + k^2 = (1+k^2)(1+x^2). So the ratio is \frac{(1+k^2)(1+x^2)}{(1-kx)^2(1+x^2)} = \frac{1+k^2}{(1-kx)^2}. It matches.

Result: \arctan y = \arctan x + C, or equivalently y = \dfrac{x + k}{1 - kx}.

Several solution curves of $\frac{dy}{dx} = \frac{1+y^2}{1+x^2}$. The dashed line $y = x$ corresponds to $k = 0$. The red curve ($k = 2$) has a vertical asymptote at $x = \frac{1}{2}$ — beyond that point, the solution ceases to be a single-valued function. Each curve is a branch of a Möbius transformation.

The k = 0 case gives y = x — the simplest solution, where the function equals its argument everywhere. Each other value of k rotates and stretches this line into a different curve.

Example 2: Solve dy/dx = y cos x, with y(0) = 2

Step 1. Separate.

\frac{dy}{y} = \cos x\, dx

Why: divide by y, multiply by dx. The right side y \cos x is already in the form f(x) \cdot g(y) with f(x) = \cos x and g(y) = y.

Step 2. Integrate.

\int \frac{dy}{y} = \int \cos x\, dx
\ln|y| = \sin x + C

Why: \int \frac{dy}{y} = \ln|y| and \int \cos x\, dx = \sin x. Both are standard.

Step 3. Exponentiate to solve for y.

|y| = e^{\sin x + C} = e^C \cdot e^{\sin x}
y = Ae^{\sin x}

where A = \pm e^C is an arbitrary constant.

Why: exponentiating removes the logarithm. The absolute value goes away because A absorbs the \pm sign.

Step 4. Apply the initial condition y(0) = 2.

2 = Ae^{\sin 0} = Ae^0 = A

So A = 2.

Why: at x = 0, \sin 0 = 0 and e^0 = 1, so the entire exponential collapses to 1, and A is directly the value of y at x = 0.

Result: y = 2e^{\sin x}.

The particular solution $y = 2e^{\sin x}$ (solid red), alongside other members of the family. The function oscillates but never returns to zero — it reaches its maximum when $\sin x = 1$ (at $x = \pi/2$), giving $y = 2e \approx 5.44$, and its minimum when $\sin x = -1$ (at $x = -\pi/2$), giving $y = 2/e \approx 0.74$.

The solution oscillates because \sin x oscillates, but it is always positive (an exponential is always positive). The initial condition y(0) = 2 picks out one specific oscillating curve from the family.

Common confusions

Going deeper

If you came here to learn the variable-separable method, you have it — you can stop here. The rest is for readers who want to see the formal justification and the connections.

Why separation of variables works

The manipulation \frac{dy}{g(y)} = f(x)\, dx looks like treating \frac{dy}{dx} as a fraction. Here is what is actually happening.

Start with \frac{dy}{dx} = f(x) \cdot g(y). Divide both sides by g(y):

\frac{1}{g(y)} \cdot \frac{dy}{dx} = f(x)

Now integrate both sides with respect to x:

\int \frac{1}{g(y)} \cdot \frac{dy}{dx}\, dx = \int f(x)\, dx

On the left side, the chain rule says \frac{1}{g(y)} \cdot \frac{dy}{dx}\, dx = \frac{1}{g(y)}\, dy — this is just a u-substitution with u = y. So

\int \frac{dy}{g(y)} = \int f(x)\, dx

The "informal" separation of variables is a shorthand for a perfectly rigorous chain-rule argument. The notation was designed to make the shorthand work. That is one of the things that makes Leibniz's notation so powerful.

Orthogonal trajectories

Here is an application that connects differential equations to geometry. Given a family of curves, the orthogonal trajectories are curves that cross every member of the family at right angles.

If the original family satisfies \frac{dy}{dx} = f(x,y), then the orthogonal trajectories satisfy \frac{dy}{dx} = -\frac{1}{f(x,y)} (negative reciprocal, since perpendicular slopes multiply to -1).

For example, the family of parabolas y = cx^2 satisfies \frac{dy}{dx} = \frac{2y}{x} (as derived in the previous article). The orthogonal trajectories satisfy \frac{dy}{dx} = -\frac{x}{2y}. Separating: 2y\, dy = -x\, dx. Integrating: y^2 = -\frac{x^2}{2} + K, or \frac{x^2}{2} + y^2 = K — a family of ellipses. Every ellipse in this family crosses every parabola at a right angle. This kind of result appears in physics (electric field lines are orthogonal trajectories of equipotential curves) and in fluid dynamics (streamlines vs. potential lines).

Equations that are "almost" separable

Some equations are not separable as written, but become separable after a simple substitution. For instance, \frac{dy}{dx} = f(ax + by + c) is not separable because x and y are inside the same function f. But the substitution v = ax + by + c (so \frac{dv}{dx} = a + b\frac{dy}{dx}) turns it into a separable equation in v and x. These "reducible to separable" equations are the subject of the next article.

Where this leads next

Variable separation is the foundation. The next articles cover equations that are not directly separable but can be made so, and equations that require entirely different tools.