Integrating Factors for Non-Exact Equations
Suppose you meet the differential equation . You want to solve it in closed form. It is not exact. The mixed partials of its coefficient functions disagree. So the shortcut of writing it as for some potential seems unavailable. Yet the equation is not hopeless. Multiplying every term by turns it into an exact equation. It then has a genuine potential function, and the solution falls out immediately. This trick, hunting for a multiplier that repairs exactness, is one of the oldest and most useful moves. It belongs to the theory of first-order Ordinary Differential Equations. The idea matters because most first-order equations are not handed to us in exact form. They arise this way from physics, chemistry, and economics. Exactness is a fragile, coordinate-dependent property. Rescaling an equation by any nonvanishing function changes whether it holds. It does this without changing the set of solution curves. This means every non-exact equation with a suitably nice solution structure secretly has an exact companion equation. Finding the rescaling factor — the integrating factor — converts an unsolved problem into a solved one. It does this using nothing but Exact Equations theory. The big picture is that integrating factors form a bridge between two techniques you already know. On one side are separable/exact equations. On the other are Linear First-Order Equations. In fact the standard integrating factor for a linear equation is a special case. It is exactly the machinery developed here. Recognizing this unifies what might otherwise look like two unrelated tricks. It becomes a single conceptual method. This article gives the precise definition of an integrating factor. It proves the two classical criteria for when such a factor exists. These criteria cover factors depending on alone or alone. The article works through the algebra in full. It also shows where the method breaks down. It closes by connecting the search for solutions here to a deeper question. That question asks when solutions exist and are unique at all. This is the subject of Existence and Uniqueness (Picard-Lindelof).
- An integrating factor is a nonvanishing function that, multiplied through a non-exact equation , makes it exact.
- Exactness of is checked by the same cross-partial condition used for exact equations.
- A factor depending only on exists iff depends only on ; a symmetric criterion in governs .
- Once is found, solve by the same potential-function method as for exact equations, applied to .
- The classical linear-equation integrating factor is the special case , .
- Key idea: multiplying by the right function restores a lost potential without changing the solution curves.
Where this lives today
Integrating factors appear constantly wherever a first-order balance law is rescaled to expose a conserved quantity. In classical thermodynamics, the existence of entropy as a state function is, formally, the statement that is an integrating factor for the inexact differential of heat exchanged in a reversible process — Clausius's construction of entropy is a direct physical incarnation of this theorem. In chemical kinetics and population models, integrating factors convert non-exact rate equations into potentials that reveal conserved combinations of concentrations. In electrical circuit theory, the same linear-equation integrating factor underlies the transient analysis of RL and RC circuits. In numerical analysis and control theory, recognizing an equation as (after multiplication) exact, or as linear, dictates whether closed-form solutions or Lyapunov-type energy functions are available, feeding into stability arguments. In pure mathematics, the exactness criterion generalizes to the statement that a closed differential form is locally exact (Poincaré's lemma) on simply connected domains, linking this elementary technique to algebraic topology and to the theory that will let you rigorously address when solutions to a first-order equation exist and are unique at all, taken up in Existence and Uniqueness (Picard-Lindelof).
Ask the tutor: How do I find an integrating factor when it depends on a combination like or rather than on or alone?
Let and be functions continuous with continuous first partial derivatives on an open, simply connected region , and consider the first-order differential equation
A function , continuous and nonvanishing on , is called an integrating factor for this equation if the equation
is exact on , meaning there exists a function with and throughout . Because is never zero, the original equation and the multiplied equation have identical solution curves (implicit relations or satisfying the differential equation), so solving the exact equation solves the original one.
Intuition
Think of as prescribing, at every point of the plane, a direction field: the tangent line to the solution curve through has slope . Multiplying both and by the same nonzero scalar function does not change this ratio, hence does not change the direction field, hence does not change the solution curves at all. What it can change is whether the vector field happens to be the gradient of some scalar potential . Exactness is really the statement that ; it is a property of the specific representative of the direction field, not of the direction field itself. Since rescaling by leaves the field of directions alone while adjusting the "steepness" in a position-dependent way, some rescalings turn a non-gradient field into a gradient field even though the underlying geometry — the family of solution curves — never moves. The picture below shows this for the example equation to be solved fully later: the family of curves stays fixed, but the "potential landscape" whose level sets they trace only becomes visible after rescaling.
Central results
Let be on an open, simply connected region . The equation is exact on — that is, , for some function — if and only if
() If and with , then by equality of mixed partials (Clairaut/Schwarz theorem, valid since is ),
() Suppose on . Fix a basepoint and, using simple connectivity, define
This is well-defined because is simply connected and is a , hence locally Lipschitz, vector field satisfying the mixed-partial condition; the line integral of between any two points along any path in is path-independent (a standard consequence of Green's theorem applied to any closed loop, since makes the circulation over any simple closed contractible loop vanish), so the particular "staircase" path used above computes the same value as any other path. Differentiate directly:
immediately from the Fundamental Theorem of Calculus applied to the second integral (the first integral does not depend on ). For , differentiate under the integral sign (justified since is , so is continuous and the integral in is over a compact interval):
using the hypothesis . By the Fundamental Theorem of Calculus, , so
Thus , , and is since are . Hence the equation is exact.
∎Let be on an open, simply connected region , with nonvanishing on .
(a) Suppose the quantity
is, on , actually a function of alone; write it . Assume further is a union of horizontal strips so that for each in the relevant interval , the fiber lies in (this holds automatically if is a rectangle or a vertical strip ). Then
is a nonvanishing, integrating factor for on , and the resulting equation is exact there.
(b) Symmetrically, if is nonvanishing on and
depends only on (call it ), with the analogous fibering condition on vertical strips, then
is a nonvanishing, integrating factor.
We prove (a); (b) follows by the symmetric argument swapping the roles of , and . Step 1 — reduce exactness of the new equation to an ODE for . Suppose is and nonvanishing. Exactness of requires, by Test for Exactness (stated above), that
Since depends only on , . By the product rule, . So exactness holds precisely when
This is a first-order linear (indeed separable) ODE for in the single variable , provided the right side depends only on — which is exactly our hypothesis that is a function of alone. Step 2 — solve that ODE. The equation is separable: since is required nonvanishing, on any interval where (WLOG, else replace by , which is also an integrating factor) we may write , i.e. . Integrating,
and exponentiating gives the one-parameter family . Since only a single integrating factor is needed (any positive multiple of an integrating factor is again an integrating factor, as scaling by a nonzero constant does not affect exactness), take :
This function is manifestly nonvanishing (it is an exponential) and (since is continuous, being a quotient of continuous functions with , its antiderivative is and the exponential of a function is ). Step 3 — verify exactness directly, not merely as a solved ODE. We must check this genuinely satisfies pointwise on , not just formally. Compute, using (true by construction, since is an antiderivative-exponential of ):
By definition , so , and substituting,
Hence identically on , confirming exactness. Step 4 — apply <span class="wiki-link-missing">Test for Exactness</span>. Since and are (products of functions), share continuous mixed partials, satisfy , and is open and simply connected (with the stated fibering ensuring the potential-construction integral in the proof of that theorem stays inside ), the sufficiency direction of the exactness test applies verbatim to . Therefore this equation is exact on , so is a genuine integrating factor.
∎Consider the standard linear first-order equation
so , . Then , , so
which indeed depends only on . By part (a) of the theorem, is an integrating factor — precisely the familiar formula from Linear First-Order Equations.
Direct substitution as shown above into the formula of part (a); no further argument is needed since the hypotheses ( everywhere, manifestly a function of alone, simply connected) are all immediately verified.
∎Worked examples
Example 1 (asymmetric coefficients, case). Solve
Step 1: test exactness. Here , . Compute
Since in general (they differ by , which is not identically zero), the equation is not exact. Step 2: test for . Compute
valid wherever and ; the factors cancel algebraically as an identity of rational functions, so holds on the open region , and in particular depends on alone. Good — restrict attention to, say, the simply connected rectangle-like region minus the curve ; on the component with this is an open simply connected set, and there. Step 3: build .
Step 4: multiply through.
Check exactness of the new equation: , and . They agree — exact, as guaranteed. Step 5: find the potential . We need . Integrate in , holding fixed:
for an unknown function . Differentiate in and match to :
Step 6: write the implicit solution. Absorbing the constant into the right-hand side,
This is the general solution, valid on the region where was constructed (and — since the original equation and the multiplied one share solution curves everywhere — the formula continues to define solution curves for too, by the same algebra with or simply by analytic continuation of the implicit relation). Verification by implicit differentiation. Differentiate with respect to :
which is exactly , i.e. — matching the exact equation derived, and dividing by recovers the original equation . This confirms the solution.
Example 2 (asymmetric coefficients, case, with an initial condition). Solve the initial value problem
Step 1: test exactness. , .
These differ ( unless ), so not exact. Step 2: try first.
provided . This also cancels to a function of alone! So in fact either route works here; to illustrate the technique deliberately, we instead check the criterion directly, treating this as a demonstration of part (b).
This is not a function of alone (the term in the denominator prevents cancellation), so the route fails here — only works for this particular equation. This is instructive: the two criteria are not symmetric in applicability, only in form, and one must check both. Step 3: build .
Step 4: multiply through.
Check: ; . Exact. Step 5: find potential.
Differentiate in : . Match to : so , const. Step 6: general solution.
Step 7: apply the initial condition. At :
So the solution of the IVP is
Sanity check at the initial point: plug into the original equation's slope: , , so . Differentiating the implicit solution: ; at : . Matches, confirming correctness.
Consider the equation
Here , , so , , not exact. Compute
which is a function of alone, formally satisfying the hypothesis of part (a) of the theorem — except at , where and blows up, so as given is not the right domain to apply the theorem on directly; one must restrict to , which already fails to be all of and, more importantly, is not simply connected once you try to patch the two half-planes back together around the puncture at the origin. Formally proceeding anyway, (for ). Multiplying through:
which is exact on the simply connected half-plane with potential , giving solution curves , i.e. straight lines through the origin — correct on that half-plane. But the same multiplier is undefined at and cannot be continued across the puncture to give one single global potential on all of consistently with both half-planes simultaneously, because the two half-plane potentials (for ) and (for ) do not glue into a function that is even continuous at (indeed is not even defined there) — reflecting the fact that the vector field has nonzero circulation ( around the origin), an obstruction that exists precisely because the natural domain is not simply connected. Dropping the simple-connectivity hypothesis (or the requirement that be nonvanishing throughout the region where you want to be defined) allows to look like a legitimate function of alone while no single global integrating factor and potential actually exist on the full punctured plane. The theorem's construction still produces a valid local integrating factor and solution on each half-plane, illustrating that the hypotheses are not decorative — they guarantee the potential-function integral construction in the exactness theorem is path-independent, which genuinely requires simple connectivity.
Scope, edge cases & common traps
| Situation | What to do |
|---|---|
| depends on both | Try for a ; if that also fails, more general forms , , etc., may be tried, or the equation may require a substitution instead. |
| on part of the domain | The formula for is undefined there; restrict to a subregion where , or use the criterion instead. |
| Domain is not simply connected (e.g. has a puncture or is an annulus) | The sufficiency direction of the exactness test can fail globally even though holds locally; see the counterexample. |
| Both and criteria happen to hold | Either produces a valid integrating factor; they need not coincide, but both yield the same family of solution curves. |
| found but vanishes somewhere on the domain of interest | Exactness fails to be meaningful (division issues) exactly where ; since our never vanishes, this is not actually an issue for the exponential form, but always double check the derivation used . |
The mathematician behind it
Origins · 1 minLeonhard Euler and how this was discovered
Euler systematized the method of integrating factors within his broader program of turning first-order differential equations into ones solvable by quadrature (direct integration). His investigations, alongside those of Alexis Clairaut on exact differentials, established the exactness criterion as a practical test, and Euler explicitly produced classes of multipliers — including and of the type proven above — as part of his systematic classification of first-order ODEs in his Institutiones Calculi Integralis.
What exactly is an integrating factor, in one sentence?
An integrating factor is a nonvanishing function that, when multiplied through a non-exact equation , makes the new equation exact, i.e. makes the gradient of some potential function . Because is never zero, multiplying by it does not change which curves solve the equation — it only changes whether those curves happen to be the level sets of an explicit function you can write down and solve for. The entire value of the technique is computational: it converts a differential equation without an obvious closed-form solution into one, , whose solution is simply .
Are the criteria for and the only ways to find an integrating factor?
No. They are the two most commonly taught sufficient conditions, covering a large fraction of textbook exercises, but far from exhaustive. Integrating factors of the form , , , or each have their own derivable existence criteria, obtained by the same method: substitute the ansatz into the exactness condition and see what ODE for results, then check whether that ODE is consistent (i.e., whether its right-hand side really only depends on the claimed single variable). In general, an integrating factor always exists locally near any point where , by the theory underlying Existence and Uniqueness (Picard-Lindelof), but it may not have a closed elementary form.
Why must be required to be nonvanishing in the definition?
If were allowed to vanish at some points, multiplying the equation by there would not be a reversible operation: solutions of near a zero of might get "erased" or extra spurious solutions (where identically satisfies the multiplied equation regardless of the true direction field) could be introduced. Requiring throughout the domain of interest guarantees the multiplied equation has exactly the same solution curves as the original, since dividing back through by recovers everywhere.
How does this connect to the linear first-order equation method I already know?
The standard linear equation can be rewritten as , which is generally not exact. Applying the criterion here gives exactly , so — the integrating factor taught for linear equations turns out to be a special case of the general theorem proven here, rather than an unrelated ad hoc trick. This unification is one of the chief payoffs of learning the general integrating-factor method.
What happens if neither the nor the criterion works?
Then this particular theorem does not directly hand you an integrating factor, but the equation may still be solvable by other means: trying integrating factors depending on a specific combination of and , recognizing the equation as separable or homogeneous after a substitution, or using a series or numerical method. It is also possible that no elementary closed-form integrating factor exists at all, even though a solution curve through any given point still exists locally, guaranteed abstractly by the hypotheses of Existence and Uniqueness (Picard-Lindelof) rather than by any explicit formula.
Does finding an integrating factor guarantee I've found ALL solutions?
It finds the solution curves passing through points where , , and are all well-defined and , (or for the case), matching the domain restrictions used in the derivation. Solutions can be lost or need separate handling at points where (vertical tangent lines to the solution curve, which the formulation cannot see) or where the original coefficient functions themselves are undefined. Always check such boundary or singular points by direct substitution into the original equation, separately from the integrating-factor-derived implicit solution.
Is the choice of integrating factor unique?
No — if is one integrating factor and its resulting potential, then is also an integrating factor for any differentiable function with , since is then also constant along the same solution curves and the chain rule shows is still an exact differential (of , in effect). The theorem singles out one convenient choice — often the simplest — but it is never the only one.