Exact Equations
Suppose a curve in the plane is defined implicitly by an equation like . There is one level curve for each constant . Differentiating implicitly produces a first-order differential equation. The natural question is this: given only that differential equation, how would you reconstruct the hidden function ? This function's level sets are what the equation describes. This is the reverse problem solved by exact equations. It matters because a huge class of first-order differential equations that are not separable can still be solved in closed form. This works once they are recognized as disguised total differentials. The big picture is that a differential equation is really a statement about the differential of some scalar function . Solving the equation amounts to finding so that the solutions are simply the level curves . This turns a differential equation problem into a problem about partial derivatives and antiderivatives. These are tools already familiar from multivariable calculus. This article gives the precise definition of exactness. It proves the exactness test rigorously, in both directions, with correct hypotheses. It works through the reconstruction algorithm on two genuinely asymmetric examples. It also shows exactly what fails when the domain is not simply connected. This sets up the natural next tool, the Integrating Factor, for equations that fail the test as written.
- An equation is exact on a region if is the total differential of some function .
- On a simply connected region with , exactness is equivalent to the mixed-partial condition .
- Solutions are the implicit level curves , so no separation of variables is needed once is found.
- Recovering is a two-step antiderivative process: integrate in , then match against .
- The condition can fail to imply exactness if the domain has a "hole" — simple connectedness is essential.
- Key idea: exactness converts a differential equation into a calculus problem — reconstructing a potential function from its two partial derivatives.
Where this lives today
Exact equations are the differential-equations shadow of conservative vector fields in physics: a force field is conservative exactly when is an exact differential, and the potential function recovered here is (up to sign) the potential energy function from mechanics and electromagnetism. In thermodynamics, exact differentials distinguish state functions (internal energy, entropy) from path-dependent quantities (heat, work), and the equality reappears as a Maxwell relation. In circuit theory and control systems, exactness underlies conserved quantities and Lyapunov-function constructions for planar systems. Computationally, computer algebra systems that solve ODEs symbolically run the test as a first triage step before attempting more elaborate methods, and numerical schemes for Hamiltonian systems are built to preserve the exact/conservative structure explicitly. The same reconstruction algorithm — integrate one partial, differentiate to match the other — is the template later reused, with a corrective multiplier, when the equation fails the test as given, leading directly into the method of Integrating Factors.
Ask the tutor: How do I find an integrating factor when , and how do I know whether it depends only on , only on , or on both?
Let be an open region, and let be continuous functions. The first-order differential equation
is called exact on if there exists a function , differentiable on , such that
Such an is called a potential function for the equation. If is a differentiable function satisfying the equation implicitly, the chain rule gives
so for some constant . Consequently, every solution curve lies on a level set , and the general solution of an exact equation is given implicitly by
Intuition
Think of as a height function over the plane, like elevation on a topographic map. Its level curves are the contour lines. The gradient is a vector field that, at every point, points in the direction of steepest ascent — and it is always perpendicular to the contour line through that point. A differential equation is exactly the statement "move in a direction tangent to the contour," because says the height does not change to first order along that displacement. So solving an exact equation is literally the act of walking along contour lines of a hidden landscape ; the whole problem is to reconstruct the landscape from the vector field that describes its slopes. The condition is the familiar equality of mixed partial derivatives, , viewed from the outside: it is a necessary signature that really is a gradient field, before we've found . Geometrically, says the vector field has zero "rotation" (its scalar curl vanishes) — a gradient field can never rotate around a point, since going all the way around any small loop back to the start cannot change the height. The theorem below makes this precise and shows the converse holds provided the domain has no holes to trap a nonzero circulation.
Let be an open, simply connected region, and let and be functions with continuous partial derivatives and on . Then the differential equation
is exact on if and only if
Moreover, when this condition holds, a potential function can be constructed explicitly, and the general solution of the equation is .
We prove both directions. The proof technique is direct construction (sufficiency) and a computation using equality of mixed partials (necessity).
() Necessity: exactness implies . Suppose the equation is exact on , so there is with and throughout . Since is assumed continuous, has a continuous -partial, i.e. is continuous on . Likewise is continuous on . By Clairaut's theorem (equality of mixed partial derivatives), if and both exist and are continuous on an open set, then
Applying this with and gives on , as required. This direction uses only that is open (Clairaut's theorem needs no topological hypothesis on beyond openness, and does not require simple connectedness).
() Sufficiency: implies exactness, via explicit construction. Assume now on and is open and simply connected. Fix a base point . We construct directly by partial integration and verify it works; this is the standard algorithm, and simple connectedness is what guarantees the construction is consistent (single-valued) throughout . Step 1 (partial antiderivative in ). Define, for in a neighborhood where a straight path from to stays in ,
for an as-yet-undetermined function . By the Fundamental Theorem of Calculus (differentiating under the integral sign, valid since is continuous),
which matches the required condition automatically, for any choice of . Step 2 (determine by matching ). Differentiate with respect to , using that is continuous so differentiation under the integral sign is valid (Leibniz's rule):
Using the hypothesis pointwise inside the integral,
by the Fundamental Theorem of Calculus applied to over . For to equal exactly, we require
This is an equation in alone (the right side does not depend on , which is precisely what the hypothesis guaranteed), so it can be solved by direct antidifferentiation:
Step 3 (assemble and verify). Define
By Steps 1 and 2, and identically on the region where this construction is valid. This confirms is a genuine potential function there, so the equation is exact there. Step 4 (globalizing via simple connectedness). The construction above is local: it produces correctly on any rectangle or star-shaped neighborhood of contained in . To extend consistently over all of , note that the vector field satisfying is exactly a vector field with zero scalar curl. A standard fact from vector calculus (a consequence of Green's theorem) states: if is simply connected and with , then the line integral
is path-independent in — any two paths in with the same endpoints give the same integral, because the difference of the integrals over two such paths equals the integral over a closed loop enclosing a simply connected sub-region, which by Green's theorem equals
(Simple connectedness of is exactly what guarantees the region enclosed by any closed loop in is itself contained in , so Green's theorem applies with the correct hypotheses.) Path-independence lets us define, unambiguously for every ,
the integral taken along any path in from to . Choosing the specific path that goes horizontally from to and then vertically to reproduces exactly the formula from Step 3 (up to relabeling), and the same differentiation argument shows , on all of . Hence is a well-defined potential function on the entire region , proving exactness there.
Conclusion. Both directions are established: on an open, simply connected with , exactness of holds if and only if throughout , and in that case constructed above satisfies as the general implicit solution, by the remark following the definition.
∎Worked examples
Example 1 (asymmetric coefficients, requiring genuine bookkeeping). Solve
Step 1: Identify and and test exactness. Here
Compute the cross partials:
Since on all of (an open, simply connected region, and both are polynomials, hence everywhere), Exactness Criterion applies and guarantees an exact potential . Step 2: Integrate in , treating as constant.
where is an unknown function of alone (the "constant" of integration with respect to ). Step 3: Differentiate with respect to and match against .
Set this equal to :
Note that all the -dependent terms canceled exactly — this cancellation is not a coincidence, it is the content of verified in Step 1, and it is exactly what the general proof showed must happen. Step 4: Integrate to find , and assemble .
and absorbing the constant into the final answer,
Step 5: State the general solution.
Check. Differentiate implicitly with respect to (treating ):
Grouping terms:
which reproduces exactly , confirming the solution.
Example 2 (an initial value problem, and where the recipe subtly differs). Solve the initial value problem
Step 1: Test exactness.
Indeed everywhere on , which is open and simply connected, and , so Exactness Criterion applies. Step 2: Integrate with respect to . This time integrating directly is efficient:
(Here since is held fixed during this integration.) Step 3: Differentiate in and match against .
Comparing to gives , so is a genuine constant — in this example the entire -dependence was already captured in Step 2, a useful check that the arithmetic is consistent. Step 4: Assemble and apply the initial condition.
Impose :
So , and the solution of the IVP is given implicitly by
Remark. Unlike a separable equation, this solution cannot be split into "" form — the terms and genuinely mix and . Exactness succeeds precisely because it does not require separability; it only requires recognizing as a gradient field.
Consider the vector field
defined and on , the punctured plane. This is open but not simply connected — a loop around the origin cannot be contracted to a point without leaving . The cross-partial condition holds. A direct computation (quotient rule) gives
So everywhere on . But the equation is not exact on . If it were exact, there would be a potential with , on all of , and then by the Fundamental Theorem of Calculus for line integrals, the integral of around any closed loop in would be (it would equal for a closed loop). Test this on the unit circle , :
So no global potential function exists on : the equation satisfies but is not exact on the punctured plane. (In fact, , i.e. the angle , works locally away from any ray through the origin, but cannot be extended continuously to a single-valued function on all of — exactly the obstruction simple connectedness rules out.) This shows the hypothesis " simply connected" in Exactness Criterion cannot be dropped: without it, is necessary but no longer sufficient for exactness.
Scope, edge cases & common traps
| Situation | What to do |
|---|---|
| on a rectangle or the whole plane | Apply the theorem directly; such domains are automatically simply connected. |
| but domain has a hole (e.g. origin excluded) | Do not assume exactness; check path-independence directly, as in the counterexample. |
| The equation is not exact as written; look for an Integrating Factor to multiply through and restore exactness. | |
| Constant of integration turns out to depend on | Signals an arithmetic error, since the theorem guarantees the -dependence must cancel whenever truly holds. |
| Confusing "exact" with "separable" | These are different tests. A separable equation need not be exact and vice versa; exactness is checked via partials, not by attempting a variable split. |
The mathematician behind it
Origins · 1 minAlexis Clairaut and how this was discovered
Clairaut proved the equality of mixed partial derivatives underlying the necessity direction of the exactness test, and studied differential equations arising from celestial mechanics, including the singular equations that today bear his name.
How is exactness different from separability?
Separability asks whether can be algebraically rearranged into , so that both sides can be integrated independently, as in Separable Equations. Exactness instead asks whether the pair is literally the gradient of some scalar function , tested via . These are logically independent properties: some equations are separable but not exact, some are exact but not separable (such as Example 2 above, where mixes the variables inseparably), and some are both or neither. Exactness is checked by differentiating and ; separability is checked by attempting to factor the equation into single-variable pieces.
What if I find but forget to add the arbitrary constant ?
The differential equation only pins down up to an additive constant, since for any constant . The actual content of the solution is the family of level curves , one curve for each value of ; an initial condition selects the specific member of the family. Writing "" instead of "" silently throws away every solution except one, so the general solution must always retain the arbitrary constant until an initial or boundary condition is imposed.
Does the potential function always come out algebraically nice, like a polynomial?
No — can involve transcendental functions, as in Example 2 where . The construction algorithm (integrate in , differentiate to solve for the missing piece in ) works regardless of the functional form of and , as long as the relevant antiderivatives can be computed. If the required antiderivative has no elementary closed form, may need to be left as a definite integral, though the implicit solution remains perfectly valid and well-defined.
What happens if — is the equation unsolvable?
Not necessarily; it means the equation is not exact as currently written, but it may become exact after multiplying through by a suitable nonzero function , called an Integrating Factor. The product has the same solution curves as the original equation (since multiplying by a nonzero factor does not change where the differential vanishes), but can satisfy even when the original did not. Finding such a is the natural next technique after exactness.
Why does simple connectedness matter, in plain terms?
Simple connectedness means the domain has no holes that a loop could get "stuck around." The proof of sufficiency builds by integrating along paths from a fixed base point, and for to be a well-defined function, every path between the same two points must give the same answer. Green's theorem guarantees this path-independence, but only when every closed loop in the domain bounds a region entirely contained in the domain — exactly the definition of simple connectedness. The punctured-plane counterexample shows that when a loop encircles a missing point, the integral around it can be nonzero even though holds everywhere it is defined.
Can an exact equation have singular or extra solutions not captured by ?
Generically no — every differentiable solution curve of an exact equation with continuous satisfies for some constant, by the direct chain-rule argument in the definition. However, care is needed where , since the equation may then fail to be solvable for as a function of (the solution curve could have a vertical tangent there); the implicit relation still correctly describes the curve, even at such points, while an explicit form might not exist locally.
Is testing enough, or should I also check ?
Both matter. The theorem explicitly requires and to have continuous partial derivatives on the domain in question; this is what makes Clairaut's theorem and the differentiation-under-the-integral steps valid. If or has a jump discontinuity or the partials fail to exist at some points of the domain, the equality elsewhere does not guarantee a global potential function exists, and the construction in the proof can break down at the bad points.