Integrating Factors and Exact Equations
Write a first-order ODE not as but in the even-handed differential form , and a geometric question replaces the analytic one: is the one-form the total differential of some scalar ? If it is, the equation says , and every solution is a level curve — the whole problem collapses to two partial integrations. Such an equation is called exact, and there is a single test that decides the matter: the mixed-partial equality , Clairaut's symmetry of second derivatives read backwards. That test is necessary everywhere and, on any simply connected region, sufficient — the Poincaré-lemma statement that a closed form is locally exact. It is the same "curl-free implies conservative" fact that lets a force field carry a potential energy and makes a line integral path-independent, transplanted from vector calculus into the theory of ODEs. When the test fails, the form is not exact — but multiplying by a well-chosen nonzero scalar , the integrating factor, can make it exact without disturbing the solution curves, since leaves the zero set untouched. Every first-order equation has such a factor in principle, though finding it is generically as hard as solving the equation. The method's real payoff is the structured cases where falls out in closed form: when the normalised defect or depends on a single variable. The linear equation's universal factor , the thermodynamic factor that builds entropy, and the weight that makes an operator self-adjoint are all one idea wearing different clothes.
- A first-order ODE in the form is exact when its left side is the total differential of a potential ; the general solution is then just , a family of level curves.
- The test is the equality of mixed partials, , which holds because for smooth and, on a simply connected region, is also sufficient (Poincaré's lemma).
- When the test fails, seek an integrating factor making exact; in general finding is as hard as solving the ODE.
- Two cases are tractable: if depends on alone then ; if depends on alone then .
- The linear equation is the flagship special case: its textbook factor is exactly the multiplier that makes it an exact total differential.
- Key idea: write the ODE as ; if it is exact and the solution is the potential with , and otherwise hunt for an integrating factor making exact — solvable in closed form when or depends on a single variable.
Write the ODE as . If it is exact and the solution is the potential with . Otherwise hunt for an integrating factor making exact — solvable in closed form when or depends on a single variable.
Where this lives today
The exactness test and its factor are not a museum piece; they are working infrastructure. In thermodynamics the entire scaffold of Maxwell relations is the statement that the differentials of the potentials are exact, so their mixed partials agree — every relation like is one application of , and Carathéodory's 1909 axiomatisation makes the existence of an integrating factor for the mathematical form of the second law. In computer algebra, symbolic ODE solvers implement exactly the branches derived above: SymPy's `dsolve` carries an explicit `1st_exact` hint, and the classical Prelle–Singer algorithm (1983) searches for elementary integrating factors when the two heuristics fail, connecting the problem to Lie's theorem that an integrating factor is equivalent to a one-parameter symmetry. In differential geometry the failure mode of the warning box becomes a measurement: the punctured-plane angle form generates the first de Rham cohomology , so "closed but not exact" is quantified rather than merely warned against, and the same distinction organises electromagnetism and Hamiltonian mechanics. The one idea — rescale a one-form until it is a gradient — reaches from a homework ODE to the topology of the domain it lives on.
The physical picture
Cover the plane with the contour lines of an unknown height function . The combination measures how much changes under a tiny step ; setting it to zero means "move so the height does not change." The solution curves of the ODE are therefore exactly the contours , and the coefficient field is the gradient , which crosses every contour at a right angle. The first figure makes this concrete on the exact equation solved below.
The exactness test asks whether the field is a gradient — equivalently, whether its two-dimensional curl vanishes. A curl-free field on a hole-free region is conservative, so a potential exists; this is literally "the work done by a conservative force is path-independent." When the curl does not vanish the field is not a gradient, but an integrating factor is a point-by-point rescaling that straightens it into one. Multiplying by can kill the excess curl while leaving the zero set of the form — and hence the solution curves — exactly where they were. The second figure contrasts a non-exact field with the exact gradient it becomes after the factor .
The core equations
The starting point is to abandon the asymmetry of and treat and as equal partners. Any first-order equation can be cleared of denominators into the symmetric form below, in which is read as a planar vector field.
where: — coefficient functions of , together the components of a planar field; — differentials, the basis one-forms on the plane. A residual sign choice remains, so fix the form once and track signs. The equation is exact precisely when its left side is the total differential of a scalar potential . Everything operational follows from this definition.
where: — the potential whose level sets are the solution curves; — the one-form . When (2) holds the ODE reads , integrating at once to . Since a potential is rarely visible by inspection, one needs a test that uses only and . Equality of mixed partials supplies it.
where: — rate of change of in at fixed ; — rate of change of in at fixed . Their equality is the two-dimensional curl-free condition and is necessary always, sufficient on a simply connected domain. Once the test passes, the potential is reconstructed by integrating in and fixing the leftover function of by matching .
where: — partial antiderivative of in with held fixed; — the "constant" of integration, itself a function of set by . Because , the right side for is guaranteed to be free of . When the test fails, one rescales the form by a nonzero factor and demands that the rescaled form be exact. That is a single first-order linear PDE for .
where: — a nowhere-zero integrating factor. Equation (5) always has local solutions, but solving it in full is generically no easier than solving the original ODE. The PDE becomes an ordinary, separable equation in the lucky case that the normalised exactness defect is a function of alone.
where: — the normalised defect, which must be independent of for this branch to apply. The mirror case, with a function of alone, gives . The most important instance is the linear first-order equation, whose familiar integrating factor is exactly the output of rule (6).
where: — coefficient of in standard form; — forcing term; — arbitrary constant. Multiplying by collapses the left side to , the signature of exactness. Finally, the connection to vector calculus is Green's theorem, which shows the exactness defect is precisely the enclosed circulation of the field.
where: — a closed loop bounding region ; — the two-dimensional curl. A vanishing curl makes every loop integral zero, which is path-independence, which is exactness.
The exactness criterion can look like a fortunate coincidence, but it is forced in one direction by the symmetry of second derivatives and returned in the other by the topology of the domain. The goal here is to prove both halves cleanly: that the existence of a potential makes the mixed-partial equality unavoidable, and that on a simply connected region the same equality is enough to build a potential explicitly, so that checking one equation decides solvability outright.
Step 1. Suppose the form is exact, , so that and . Differentiate the first across and the second across : and . Why: the test is a statement about and , so we push the assumption about down onto their derivatives, where the two sides become the two orders of the same mixed partial.
Step 2. For the mixed partials agree, , which is Clairaut's (Schwarz's) theorem, so . Why: this is the entire content of necessity — any exact form automatically passes the test, with no assumption beyond continuity of the second derivatives.
Step 3. For the converse, construct a candidate potential , which already satisfies . Its -derivative must equal , forcing . Why: we are trying to invert the definition, recovering from ; the only freedom left after matching is the additive .
Step 4. Differentiate that right side in : , which vanishes exactly when . So the bracket is independent of , can be found by a single integration in , and exists. On a simply connected region this construction never gets trapped by a hole, which is the Poincaré lemma: closed implies exact. Why: sufficiency is not free — it needs the domain to have no holes, precisely the loophole the punctured-plane counterexample exploits. *Verified: differentiating the constructed returns by the fundamental theorem and by Step 3, so ; necessity uses only , sufficiency only simple connectivity.*
Go deeper · Derivation B · 1 minThe general equation for an integrating factor and its two solvable reductions
Multiplying by a scalar leaves the solution curves untouched but changes the exactness defect, so there is always some that makes the form exact. The goal is to write down the equation must satisfy, see why it is generically intractable, and isolate the two circumstances — a defect depending on only, or on only — in which the partial differential equation degenerates to an elementary separable ordinary one.
Step 1. Impose exactness on the rescaled form, , and expand each side by the product rule to get . Why: this is the defining condition (5) written out; it is a first-order linear PDE in the unknown , and in general solving it is a reformulation of the original problem, not a simplification.
Step 2. Gamble that depends on only, so . The PDE reduces to , that is . Why: the left side is a function of alone, so the equation is consistent only if the right side is too — that requirement is the exact condition under which an -only factor exists.
Step 3. When that ratio is indeed -only, integrate to . By the mirror argument, setting gives and whenever that ratio is -only. Why: these two closed forms are the practical heart of the method — every routine "integrating factor" a student computes is one of these two branches, and the linear equation below is the -only branch in disguise. *Verified: substituting from Step 3 back into gives , which vanishes by construction; the -branch checks identically.*
Go deeper · Derivation C · 1 minThe linear first-order equation as a disguised exact equation
The universal integrating factor that every course attaches to is usually presented as a trick to memorise. The goal here is to show it is not a trick at all but the -only reduction of the previous derivation applied to the linear equation, so that the collapse of the left side into a single derivative is nothing more than the statement that the rescaled form has become exact.
Step 1. Put the linear equation in symmetric form: becomes , so and . Then and . Why: writing it as is what lets the exact-equation machinery see the linear equation at all.
Step 2. The normalised defect is , a function of alone, so the -only branch applies and gives . Why: the factor is not guessed — it is forced by requiring , and it is unique up to a multiplicative constant.
Step 3. Multiply the original equation by : . The left side is exactly because , so . Why: the exactness we just engineered is visible here as a perfect derivative — that is what "exact" means once one variable has been trivially integrated.
Step 4. Integrate once: , hence . As a check, constant give , , and . Why: recovering the standard relaxation solution from the general formula confirms the whole chain, from symmetric form to integrating factor to quadrature. *Verified: with constant coefficients satisfies ; the general satisfies by construction.*
Limiting cases
Recognising when the general machinery collapses to something elementary is most of the practical skill.
| Case | Result | Meaning |
|---|---|---|
| Already exact | No factor needed; integrate and match to get directly. | |
| -only factor exists | Multiply by ; the defect depends on alone. | |
| -only factor exists | Multiply by ; the defect depends on alone. | |
| Linear equation | The case ; the standard factor is the -only branch. | |
| Separable equation | Automatically exact — — so separation of variables is a special case of exactness. | |
| Closed but not exact | on a punctured domain | Test passes locally yet no global potential exists; simple connectivity is essential. |
Worked examples
1 · An exact equation solved end to end (confidence builder)
Solve , with and .
Step 1. Test exactness. and . They are equal, so the equation is exact and a potential exists.
Step 2. Integrate in , holding fixed: , where is the unknown function of .
Step 3. Match . Differentiating, , and this must equal . The terms cancel — a check that Step 1 was right — leaving , so up to a constant absorbed into .
Step 4. Assemble the implicit general solution: . Where one may solve explicitly, .
Step 5. Verify by differentiating back: , which reproduces the original form exactly. The solution is , and confirmed exactness.
2 · Building an integrating factor from scratch
Solve , with , .
Step 1. Test exactness. and , so : not exact as written.
Step 2. Try the -only branch: . This depends on alone, so an -only factor exists.
Step 3. Compute it: . Multiply the equation through by to get .
Step 4. Confirm the new form is exact: and — equal, as designed.
Step 5. Recover the potential: . Then must equal , so and is constant.
Step 6. The solution is . Back-substitution shows , confirming . Factor , solution .
3 · The integrating factor 1/T that builds entropy
For a reversible process on an ideal gas, the first law gives the heat one-form (using ). Show it is not exact, but that makes it exact, defining entropy.
Step 1. Read off (in the variable ) and (in the variable ). Test exactness: but , so is not exact — heat is a path-dependent process quantity, not a state function.
Step 2. Try . The rescaled form is , so now and .
Step 3. Re-test: and — equal, so is exact. There is a potential, and it is the entropy.
Step 4. Integrate to recover it: , the Sackur-style ideal-gas entropy up to a constant. The factor turns path-dependent heat into the exact differential — the same construction as every ODE integrating factor, now doing thermodynamics.
Physics of the portrait
Exact equations and integrating factors sit at a rare crossroads: an eighteenth-century calculation about total differentials that turned out to encode conservative forces, thermodynamic state functions, and, two centuries later, the cohomology of differential forms. The person whose name is stamped on the test itself is Alexis Clairaut.
Origins · 1 minAlexis Clairaut and how this was discovered
Clairaut was the prodigy of the French Enlightenment mathematics: he read l'Hôpital's calculus text at nine, presented original geometry to the Académie des sciences at thirteen, and was elected a full member at eighteen, its youngest ever. His deepest technical legacy for this article is a pair of memoirs of 1739–1740 on the integral calculus, in which he studied when a differential expression is the total differential of a single function and stated the integrability condition — the exactness test, and the two-dimensional shadow of what we now call Clairaut's (or Schwarz's) theorem on the symmetry of mixed second derivatives. The question was not abstract: Clairaut needed it for geodesy and the shape of the rotating Earth, where the equilibrium of a fluid figure demands that the force field derive from a potential, and his celebrated theorem relating a planet's flattening to its surface gravity is exactly a statement that a certain one-form is exact. The complementary idea — that a non-exact equation can be rescued by an integrating factor, or "multiplier" — belongs chiefly to Leonhard Euler, who developed the systematic theory in the 1730s and after, giving the method that Clairaut's condition tests. Clairaut went on to a triumph of applied analysis in 1759, when his integration of the perturbed three-body problem predicted the return of Halley's comet to within a month. What began as his bookkeeping for total differentials is now the first thing one checks about any first-order ODE.
Going further
Texts. Arfken & Weber, Mathematical Methods for Physicists, 7th ed., first-order ODE section · Hassani, Mathematical Physics, chapters on ODEs and differential forms · Stone & Goldbart, Mathematics for Physics, ODE chapter · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, Ch. 14 · Boyce & DiPrima, Elementary Differential Equations, §2.6 · Nakahara, Geometry, Topology and Physics, §5 (closed and exact forms, de Rham cohomology).
Provenance. The exactness test and potential-recovery procedure follow Riley–Hobson–Bence Ch. 14 and Boyce & DiPrima §2.6; the integrating-factor PDE and its two single-variable reductions follow the Arfken & Weber first-order ODE section; the linear factor is standard across all three. A verifier should recompute: (1) for each worked example; (2) that reproduces the boxed solutions by direct differentiation; (3) giving in Example 2; (4) that is exact for the ideal gas, with ; (5) that the polar-angle one-form is the canonical closed-not-exact form on the punctured plane, with .
Prerequisites. First-Order Ordinary Differential Equations · Existence and Uniqueness Theorems for ODEs. Leads to. Variation of Parameters · Reduction of Order · Sturm–Liouville Theory.
Ask the tutor: Hand me any first-order ODE and I will put it in symmetric form, run the test, and either integrate out the potential or build the integrating factor with you step by step.
What does it actually mean for an equation to be exact?
It means the left side is the total differential of a single scalar function , so the equation is secretly saying . Once you see that, solving is trivial: a quantity whose differential is zero is constant, so , and the solution "curves" are the contour lines of . Geometrically the coefficient field is the gradient , and the solution curves run perpendicular to it — along a contour the height never changes. Everything else is machinery for checking whether such an exists (the mixed-partial test) or manufacturing one when it does not (the integrating factor).
How do I know whether to look for μ(x) or μ(y)?
Compute the defect and try to normalise it into a single-variable function. If simplifies to something with no in it, an -only factor works and equals . If instead comes out free of , a -only factor works. The practical routine is to form both ratios and see which one loses a variable — often only one does, and sometimes neither, in which case you need a different method. In Example 2 the ratio collapsed to , the tell that is available.
Does every first-order ODE really have an integrating factor?
Locally, yes — this is a theorem, essentially a restatement of the existence-and-uniqueness theory. Near any point where the field is well behaved, a nonzero exists that makes exact. The catch is that finding it means solving the PDE , which in general is exactly as hard as solving the original equation, so the guarantee is not constructive. The method is powerful only because a handful of structured situations — the defect depending on alone, or alone, or the equation being linear — hand you in closed form. Outside those, often nothing elementary exists.
Why is the constant of integration a function g(y) rather than a number?
Because you integrated a partial derivative, not an ordinary one. When you undo by writing , you held fixed, so anything that depends on alone was invisible to the -integration and could have been present. The most general antiderivative therefore carries an unknown , not a constant. That leftover function is not a nuisance — it is where the entire equation gets used: differentiating in and setting it equal to pins down , and hence . Forget the and you throw away half the information in the problem, usually getting a wrong or incomplete solution.
How is this connected to conservative forces and potential energy?
Directly — it is the same mathematics. A planar force field is conservative exactly when it is the gradient of a potential, which is exactly when is exact, which is exactly the curl-free condition . The potential that exact-equation integration produces is (minus) the potential energy , and the statement along a trajectory is conservation of energy. The punctured-plane counterexample has a physical echo too: a field that is curl-free except at an inaccessible singularity can fail to have a global single-valued potential — the classical shadow of the Aharonov–Bohm effect.
Why does 1/T work as an integrating factor for heat?
Empirically and then structurally. The reversible heat one-form is not exact — heat is path-dependent, so there is no "heat content" state function — and Worked Example 3 shows the test failing for an ideal gas. Multiplying by passes the test, and the resulting exact differential is , the entropy. Carathéodory turned this around in 1909: he took the existence of an integrating factor for , with the reciprocal absolute temperature as that factor, to be the precise mathematical content of the second law of thermodynamics. So the same operation you perform on a homework ODE is, in disguise, the definition of entropy.
Do I need the language of differential forms to use any of this?
No — the whole method works with partial derivatives and integrals, exactly as in the worked examples, and most physics and engineering courses never mention forms. But the language pays off in understanding. Calling a one-form, the condition (closed), and exactness the condition , makes the Poincaré lemma ("closed implies exact on a simply connected region") the clean statement of why the test works and when it fails. It also generalises immediately to higher dimensions and to manifolds, where the failure of closed-to-imply-exact is measured by de Rham cohomology. For solving a specific ODE you can ignore all of it; for seeing why the topic is one idea, it is worth learning.