JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Separable & Exact Equations

The two most directly integrable first-order forms: pull the variables to opposite sides and integrate, or recognize a total differential in disguise — and when it isn't one, multiply by an integrating factor to make it one.

Two equations you can integrate on sight

In the last guide you learned to read any first-order equation dy/dx = f(x, y) as a slope field — a law that hands you a slope at every point, whose solution curves you can sketch even when you cannot solve it. This guide is about the happy minority you *can* solve, and solve cleanly. A differential equation is a relation between an unknown function and its derivative, so it should be no surprise that solving one ultimately means integrating. The whole art of these two methods is arranging the equation so that an honest integral is staring back at you.

Two shapes are friendliest of all. The first is separable: the right side factors as something in x times something in y, so each variable can be herded onto its own side of the equation. The second is exact: the equation is secretly the total differential of a single function F(x, y), so its solution is just the level curves of F. They look unrelated, but they are cousins — and a single tool, the integrating factor, can sometimes turn a stubborn equation into either one.

Separation: herd each variable home

A separable equation has the form dy/dx = g(x) h(y). The move is to treat dy/dx as a genuine ratio of differentials — a sleight of hand that the chain rule quietly justifies — and rearrange to dy / h(y) = g(x) dx. Now everything with a y sits on the left and everything with an x on the right, so you integrate both sides independently. The single constant of integration, written once, encodes the whole family of solutions; pinning it down needs one initial condition.

Take the most famous example, dy/dx = k y — exponential growth. Separate it to dy/y = k dx, integrate both sides to ln|y| = k x + C, and exponentiate to y = A e^{k x}, where A = e^C absorbs the constant. There it is: the whole family of exponentials, one curve for each starting value A. Notice the separation is what *forced* the exponential to appear — the integral of dy/y is a logarithm, and undoing the logarithm is what conjures e^{k x}. The growth law is not assumed; it is the inevitable consequence of integrating.

Exactness: a hidden function of two variables

Now rewrite a first-order equation in differential form: M(x, y) dx + N(x, y) dy = 0. The clever idea is to ask whether this left side is the total differential of some single function F(x, y). Recall from multivariable calculus that the total differential is dF = (partial F / partial x) dx + (partial F / partial y) dy. If our M is exactly partial F / partial x and our N is exactly partial F / partial y, then the equation simply says dF = 0 — and a function whose differential vanishes is constant. The entire solution is F(x, y) = C, a family of level curves. No separation needed.

But how do you know such an F exists before hunting for it? Here is the elegant test. If F is well behaved, its mixed second partial derivatives are equal: differentiating M = partial F / partial x with respect to y, and N = partial F / partial y with respect to x, must give the same thing. So the equation is an exact equation precisely when partial M / partial y = partial N / partial x. This is a one-line computation — take two partial derivatives, check they match. When they do, F is guaranteed to exist (on any simply connected region), and the term exact form names this property abstractly.

  1. Write the equation as M dx + N dy = 0 and test exactness: confirm partial M / partial y equals partial N / partial x. If they differ, it is not exact — yet.
  2. Integrate M with respect to x to recover F, treating y as constant: F = integral of M dx + g(y), where the unknown g(y) is the antiderivative's 'constant' (it can depend on y).
  3. Differentiate that F with respect to y and set it equal to N. This determines g'(y); integrate once more to get g(y), and you have F.
  4. Write the implicit solution F(x, y) = C. An initial condition fixes the single constant C and selects one level curve from the family.

When it isn't exact: the integrating factor

Most equations fail the exactness test — but failure is not the end. The trick is to multiply the whole equation by a cleverly chosen function mu(x, y), the integrating factor, so that the *new* equation mu M dx + mu N dy = 0 becomes exact even though the old one wasn't. You haven't changed the solution curves — multiplying both sides by a nonzero factor leaves the relation M dx + N dy = 0 untouched — you have only repackaged the equation into a form an antiderivative can swallow.

Finding mu in full generality is hard — it satisfies a partial differential equation as nasty as the one you started with. But two lucky cases save the day, and they are the ones worth memorizing. If the combination (partial M / partial y - partial N / partial x) / N depends on x alone, then mu is a function of x alone, found by a single integration. If instead (partial N / partial x - partial M / partial y) / M depends on y alone, then mu depends only on y. Either way you reduce a two-variable mystery to a one-variable integral.

Not exact:  M dx + N dy = 0   with   dM/dy  !=  dN/dx

Case 1:  (dM/dy - dN/dx) / N  depends on x only
            mu(x) = exp( integral of [(dM/dy - dN/dx)/N] dx )

Case 2:  (dN/dx - dM/dy) / M  depends on y only
            mu(y) = exp( integral of [(dN/dx - dM/dy)/M] dy )

Multiply through by mu  ->  now exact  ->  solve as F(x,y) = C
The two standard integrating factors: each turns the search for mu into one ordinary integral.

Why these methods are cousins

These ideas are not three separate tricks but one idea wearing three coats. A separable equation g(x) h(y) - dy/dx = 0, written as g(x) dx - dy/h(y) = 0, is automatically exact — that is precisely why you could integrate each side on its own. And the integrating factor is the universal repair: it is the same device that, in the very next guide, tames the linear first-order equation dy/dx + P(x) y = Q(x), where the factor turns out to be the clean mu = e^{integral of P dx}. Seeing separation, exactness, and the linear case as one family is what makes first-order theory feel coherent rather than a bag of recipes.

Exactness also pays a geometric dividend. Because the solution is the level curves F(x, y) = C, you instantly know a partner family: the curves that cross those level sets at right angles, the orthogonal trajectories. Replace each slope by its negative reciprocal and solve the new equation, and you have, for free, the field lines to your equipotentials — exactly the relationship between heat flow and isotherms, or current and voltage contours. A single F(x, y) thus carries two interlocking families of curves at once.