An equation that is really a surface
You have separated variables and you have run the linear recipe with its integrating factor. Both work by reshaping the equation until you can integrate. The exact equation is a different and more beautiful idea: the equation is already the disguised statement that some single surface stays at a constant height. Picture a hillside whose height at the point (x, y) is given by one function F(x, y). The level curves — the paths you walk while never going up or down — are exactly the curves F(x, y) = C, one for each height C. If your differential equation happens to describe those very paths, then solving it is nothing more than naming the hill.
To see this, write the equation not as dy/dx = something, but in the balanced form M(x, y) dx + N(x, y) dy = 0. Most first-order equations can be massaged into this shape — it is just the normal form with the pieces moved around so x and y stand on equal footing. The claim of an exact equation is that this expression M dx + N dy is the total differential dF of one hidden function F. That is, M is what you get by differentiating F with respect to x, and N is what you get by differentiating F with respect to y.
M(x, y) dx + N(x, y) dy = 0
is exact <=> there is F with
dF/dx = M and dF/dy = N
then dF = 0 along solutions
so the general solution is F(x, y) = CWhy dF = 0 hands you the answer
From single-variable calculus you know the chain rule for a function of two variables: as you move along a curve, the height changes at the rate dF = (dF/dx) dx + (dF/dy) dy. Now suppose M dx + N dy = 0 really is exact, so M = dF/dx and N = dF/dy. Substitute those in and the left side of the equation becomes literally dF. The equation M dx + N dy = 0 is therefore saying dF = 0 — the height of F does not change at all as you travel along a solution curve.
A quantity whose value never changes along the motion is a conserved quantity, and F earns that name here. The function F is the potential function of the equation. Once you possess it, the general solution requires no further integration: every solution curve lives on a single level set, so the answer is the implicit general solution F(x, y) = C. Different starting points sit at different heights and pick out different constants C; an initial condition just reads off which level curve you are standing on.
The cross-derivative test
All of this is wonderful only if such an F exists, and most equations are not exact — the lucky surface simply is not there. Happily there is a quick, mechanical test that needs no searching. If F exists and is smooth, then differentiating M = dF/dx with respect to y and N = dF/dy with respect to x produces the same mixed second derivative, because the order of mixed partial derivatives does not matter for a smooth function. That gives the exactness test: the equation M dx + N dy = 0 is exact precisely when dM/dy = dN/dx.
So the exactness test is a single line of arithmetic: compute the y-derivative of M, compute the x-derivative of N, and check whether they match. Take (2x + y) dx + (x + 2y) dy = 0. Here dM/dy = 1 and dN/dx = 1 — they agree, so the equation is exact, and a potential function is waiting. By contrast y dx - x dy = 0 has dM/dy = 1 but dN/dx = -1; the cross-derivatives clash, so no potential surface exists in this form. The mismatch is not a dead end, though: the very next guide shows how an integrating factor can multiply through and repair exactness.
Rebuilding the potential, piece by piece
Once the test passes, you reconstruct F by undoing the two partial derivatives in turn. This is the step of recovering the potential, and it has one twist worth watching. Start by integrating M with respect to x, holding y fixed. That recovers most of F — but because you held y constant, the ordinary constant of integration is now an unknown function of y, call it g(y), not just a number. Any term in F that depended only on y vanished when you differentiated with respect to x, so integrating in x cannot see it; g(y) is exactly that lost piece.
- Confirm exactness first: check dM/dy = dN/dx. If they differ, F does not exist in this form — stop and reach for an integrating factor instead.
- Integrate M with respect to x (treat y as a constant). This gives F(x, y) = (integral of M dx) + g(y), where g(y) is an unknown function of y alone.
- Differentiate your F with respect to y and set the result equal to N. Everything except g'(y) must cancel — that cancellation is a built-in sanity check that exactness really held.
- Solve the leftover for g'(y), integrate once in y to get g(y), and slot it back in. The general solution is then F(x, y) = C.
Run it on (2x + y) dx + (x + 2y) dy = 0. Integrating M = 2x + y in x gives F = x^2 + x y + g(y). Differentiating in y gives dF/dy = x + g'(y), and this must equal N = x + 2y, so g'(y) = 2y and g(y) = y^2. The potential is F = x^2 + x y + y^2, and the general solution is x^2 + x y + y^2 = C — a family of tilted ellipses, each one a level curve of the same quadratic hill. Notice you never once solved for y; the level-set form is the answer.
What this view gives you, and where it stops
The potential picture is more than a trick for one problem type. It is your first encounter with a theme that runs through the whole subject: a conserved quantity turns a differential equation into a purely algebraic relation. Later, energy in a frictionless oscillator and the conserved quantities of a Hamiltonian system are the same idea wearing heavier clothing — solutions confined to level sets of something that does not change. Recognizing exactness now trains the eye that will later read phase portraits at a glance.
Be honest about the limits, though. Exactness is rare; most equations fail the cross-derivative test outright, and even when an integrating factor exists, finding one is generally hard with no universal formula. And as always in this field, having a tidy implicit answer F(x, y) = C does not mean you can extract an explicit y, nor that the level curve is defined for all x — it can close up, pinch off, or run to a boundary. The exact method is a sharp, satisfying tool for the special equations that are secretly level curves; it joins separation and the linear recipe as the third member of your hand-solving toolkit, not as a universal key.