DIFFERENTIAL EQUATIONS • FIRST-ORDER DIFFERENTIAL EQUATIONS

Integrating Factors: Non-Exact — Integrating Factors for Non-Exact Equations (Intro)

Learn how a single multiplying function can transform an unsolvable equation into one with a clean solution.

Historical Context & Motivation

For centuries, mathematicians and scientists have struggled with equations that describe how quantities change over time. A differential equation relates a function to its derivatives, and finding solutions often requires clever techniques. One of the earliest breakthroughs came when mathematicians realized that some equations could be solved by multiplying both sides by a carefully chosen function — an integrating factor. This idea transformed equations that seemed impossible to solve into ones that practically solve themselves.

The concept of exact equations and integrating factors grew out of the broader development of calculus in the 17th and 18th centuries. As physicists modeled problems like planetary motion, heat flow, and fluid dynamics, they encountered differential equations that did not fall neatly into solvable categories. The hunt for systematic solution methods drove much of early mathematical research.

1675
Leibniz Formalizes Calculus Notation
Gottfried Wilhelm Leibniz introduces the notation dy/dx and ∫, giving mathematicians a language to write and manipulate differential equations systematically.
1739
Euler Develops Solution Methods
Leonhard Euler publishes techniques for solving first-order differential equations, including methods that lay the groundwork for integrating factors.
1760s
Clairaut's Exactness Condition
Alexis Clairaut and others formalize the test for exact equations using the condition ∂M/∂y = ∂N/∂x, clarifying which equations can be solved directly.
1800s
Systematic Integrating Factor Theory
Mathematicians develop systematic rules for finding integrating factors when the exactness condition fails, making a much larger class of equations solvable.

The central question this lesson addresses is: What do you do when a first-order differential equation is not exact? Instead of giving up, you can often find a special multiplying function — an integrating factor — that converts the non-exact equation into an exact one, opening the door to a solution.

Core Principles & Definitions

Before diving into integrating factors, let's review the key ideas you need. This review assumes you're already comfortable with partial derivatives from multivariable calculus, since the exactness test relies on them directly. A first-order differential equation written in the form M(x, y) dx + N(x, y) dy = 0 is called exact if there exists some function F(x, y) whose total differential equals the left side. The test for exactness is straightforward: compute the partial derivative of M with respect to y and the partial derivative of N with respect to x. If these two partial derivatives are equal, the equation is exact. When they are not equal, the equation is non-exact, and that's where integrating factors come in.

1

Exact Equation

An equation M dx + N dy = 0 where ∂M/∂y = ∂N/∂x. A potential function F(x, y) exists so that dF = M dx + N dy, and the solution is F(x, y) = C.
2

Non-Exact Equation

An equation M dx + N dy = 0 where ∂M/∂y ≠ ∂N/∂x. No potential function exists in its current form, so direct integration won't work.
3

Integrating Factor μ

A function μ(x), μ(y), or μ(x, y) that you multiply through the equation so the result μM dx + μN dy = 0 becomes exact.
4

The Exactness Test

Check: does ∂M/∂y equal ∂N/∂x? If yes, proceed to solve directly. If no, seek an integrating factor to force exactness.
KEY TAKEAWAY
Think of an integrating factor like a key that unlocks a stubborn door. The equation itself is the locked door — it won't open no matter how hard you push (integrate). The integrating factor is a special key (a multiplying function) that, once applied, transforms the lock mechanism so the door swings open easily. You're not changing what's behind the door (the solution), just making the door openable.

Visual Explanation

The diagram below illustrates the overall strategy. You start with a differential equation and apply the exactness test. Depending on the result, you either solve directly or search for an integrating factor. The flow shows how multiplying by μ converts a non-exact equation into an exact one, after which you apply the standard exact-equation solution technique.

The flowchart shows the decision process: test for exactness first, then find an integrating factor μ if the equation is non-exact. After multiplying by μ, the equation becomes exact and is solved using the standard method.

Notice that the integrating factor doesn't change the solution — it only transforms the equation into a form where the solution technique works. The green path on the left represents equations that are already exact. The red-to-yellow-to-violet path on the right shows the detour you take when the equation isn't exact: find μ, multiply, then follow the same green-path technique.

Mathematical Framework

Let's build up the math step by step. You begin with an equation of the form M(x, y) dx + N(x, y) dy = 0 that fails the exactness test. The goal is to find a function μ so that when you multiply through, the new equation μM dx + μN dy = 0 passes the test.

EXACTNESS CONDITION
∂M/∂y = ∂N/∂x
If this equality holds, the equation is exact. M and N are functions of x and y. The partial derivative ∂M/∂y means "differentiate M with respect to y while treating x as a constant," and similarly for ∂N/∂x.
INTEGRATING FACTOR CONDITION (μ DEPENDS ONLY ON x)
dμ/dx = [(∂M/∂y − ∂N/∂x) / N] × μ
This formula works when the expression (∂M/∂y − ∂N/∂x) / N depends only on x (not on y). If so, you can separate variables and solve for μ(x).
RESULTING INTEGRATING FACTOR μ(x)
μ(x) = e^{∫ [(∂M/∂y − ∂N/∂x) / N] dx}
After separating variables in the condition above and integrating both sides, you obtain μ as an exponential of an integral. The "e raised to an integral" pattern appears because the equation for μ is itself a separable first-order ODE.
INTEGRATING FACTOR CONDITION (μ DEPENDS ONLY ON y)
μ(y) = e^{∫ [(∂N/∂x − ∂M/∂y) / M] dy}
If (∂N/∂x − ∂M/∂y) / M depends only on y, then this formula gives the integrating factor. Notice the numerator is flipped (N before M) and you divide by M instead of N.
💡 Which Formula Do I Use?
Compute (∂M/∂y − ∂N/∂x) / N first. If it's a function of x alone, use μ(x). If not, try (∂N/∂x − ∂M/∂y) / M. If that is a function of y alone, use μ(y). If neither works, a more advanced technique is needed.

Strategy Breakdown: Finding the Right Factor

Finding an integrating factor follows a clear decision tree. The diagram below walks you through the computational steps from the moment you identify a non-exact equation to the point where you've determined which type of integrating factor applies.

This decision tree shows the two main paths for finding an integrating factor: first try μ(x) by checking if (∂M/∂y − ∂N/∂x)/N is a function of x alone, then try μ(y) by checking if (∂N/∂x − ∂M/∂y)/M is a function of y alone.
  1. Step 1: Compute ∂M/∂y and ∂N/∂x. If they're equal, the equation is already exact — no integrating factor needed.
  2. Step 2: Form the ratio (∂M/∂y − ∂N/∂x) / N. If this simplifies to a function of x only, integrate it and exponentiate to get μ(x).
  3. Step 3: If Step 2 didn't work, form (∂N/∂x − ∂M/∂y) / M. If this depends only on y, integrate and exponentiate to get μ(y).
  4. Step 4: Multiply the original equation by the integrating factor and solve the resulting exact equation.

Worked Example

Let's work through the technique on a complete example from start to finish, following the decision tree from the previous section. Afterward, we'll look at a second equation where the μ(x) and μ(y) formulas do not succeed, which shows why more advanced integrating-factor techniques exist.

Solve: (3xy + y²) dx + (x² + xy) dy = 0
1
Step 1 — Identify M and NHere, M(x, y) = 3xy + y² and N(x, y) = x² + xy.
2
Step 2 — Test for ExactnessCompute ∂M/∂y = 3x + 2y. Compute ∂N/∂x = 2x + y. Since 3x + 2y ≠ 2x + y, the equation is non-exact.
∂M/∂y − ∂N/∂x = (3x + 2y) − (2x + y) = x + y
3
Step 3 — Try μ(x)Compute (∂M/∂y − ∂N/∂x) / N = (x + y) / (x² + xy) = (x + y) / [x(x + y)] = 1/x. This is a function of x alone! So we can find μ(x).
(∂M/∂y − ∂N/∂x) / N = 1/x → function of x only ✓
4
Step 4 — Find μ(x)μ(x) = e^{∫ (1/x) dx} = e^{ln|x|} = x. So the integrating factor is simply μ(x) = x.
μ(x) = x
5
Step 5 — Multiply Through by μ(x) = xMultiply the original equation by x: x(3xy + y²) dx + x(x² + xy) dy = 0, which gives (3x²y + xy²) dx + (x³ + x²y) dy = 0. Now let M* = 3x²y + xy² and N* = x³ + x²y.
6
Step 6 — Verify Exactness∂M*/∂y = 3x² + 2xy and ∂N*/∂x = 3x² + 2xy. They are equal! The equation is now exact.
∂M*/∂y = ∂N*/∂x = 3x² + 2xy ✓ Exact!
7
Step 7 — Solve the Exact EquationFind F(x, y) such that ∂F/∂x = M* = 3x²y + xy². Integrate with respect to x: F = x³y + (x²y²)/2 + g(y). Now use ∂F/∂y = N*: x³ + x²y + g'(y) = x³ + x²y. So g'(y) = 0, meaning g(y) = C₀ (a constant we absorb). The general solution is:
x³y + x²y²/2 = C

Not every non-exact equation yields to the μ(x) or μ(y) formulas on the first try. The next example works through both diagnostic ratios for an equation where neither one simplifies to a function of a single variable, showing why more general integrating-factor techniques are needed for some problems.

Attempt: (xy + y²) dx + (x²) dy = 0
1
Step 1 — Identify M and NCompare the equation to the standard form M dx + N dy = 0. Here, M = xy + y² and N = x².
2
Step 2 — Test for ExactnessCompute the partial derivatives: ∂M/∂y = ∂(xy + y²)/∂y = x + 2y, and ∂N/∂x = ∂(x²)/∂x = 2x. Since x + 2y ≠ 2x in general, the equation is not exact.
∂M/∂y = x + 2y, ∂N/∂x = 2x → Not exact
3
Step 3 — Try μ(x): Compute (∂M/∂y − ∂N/∂x) / NForm the ratio: (∂M/∂y − ∂N/∂x) / N = (x + 2y − 2x) / x² = (2y − x) / x². This expression contains y, so it is not a function of x alone. The μ(x) path does not work here.
(2y − x)/x² depends on y → μ(x) path fails
4
Step 4 — Try μ(y): Compute (∂N/∂x − ∂M/∂y) / MForm the other ratio: (∂N/∂x − ∂M/∂y) / M = (2x − x − 2y) / (xy + y²) = (x − 2y) / (y(x + y)). This still contains both x and y, so μ(y) does not work either. Since neither ratio reduces to a function of one variable, this equation needs a more general integrating factor μ(x, y) — a technique that goes beyond the μ(x) and μ(y) formulas covered in this introductory lesson.
Neither μ(x) nor μ(y) applies; a more general integrating factor is required.

Strengths, Limitations & Comparison of Methods

The integrating factor method for non-exact equations is powerful, but it has its limits. Understanding when it works well and when it falls short helps you choose the right strategy for any given problem.

Strengths and limitations of the integrating factor method for non-exact equations
FeatureStrengthsLimitations
ApplicabilityWorks on many first-order equations that no other elementary method handlesOnly works if (∂M/∂y − ∂N/∂x)/N or (∂N/∂x − ∂M/∂y)/M simplifies to a function of one variable
Systematic processFollows a clear, step-by-step algorithm — no guessing requiredThe integral ∫f(x) dx or ∫g(y) dy may itself be difficult to evaluate
Preserves solutionsMultiplying by μ does not introduce or lose solutions (when μ ≠ 0)Must verify μ ≠ 0 on the domain of interest to avoid dividing by zero
Algebra loadOnce μ is found, solving reduces to the familiar exact-equation routinePartial derivative computations can be algebra-heavy for complicated M and N
🔗 CONTEXT IN THE BIGGER PICTURE
The integrating factor method is just one tool in a larger toolbox for first-order ODEs. Separable equations, linear equations (which also use integrating factors, but a simpler formula), and exact equations each have their own techniques. When none of the standard methods apply, numerical methods or power series solutions can step in. Integrating factors for non-exact equations bridge the gap between "easy" separable/linear equations and harder problems.

Connection to Advanced Theory

The integrating factor concept extends far beyond the introductory cases covered here. In more advanced courses, you'll encounter integrating factors that depend on both x and y simultaneously, or even on combinations like xy or x² + y². The theory connects to deep ideas in mathematics about symmetry groups and differential forms.

How this introductory material connects to more advanced theory
This Lesson (Intro)Advanced Extensions
μ depends on x alone or y aloneμ can depend on combinations like xy, x/y, or x² + y²
Test uses a single ratio formulaLie symmetry analysis provides a systematic way to find μ(x, y)
Applied to first-order equations onlyGeneralized integrating factors apply to higher-order and partial differential equations
Integrating factor is a functionIn differential geometry, the integrating factor relates to the concept of an exact differential form on a manifold

For now, mastering the μ(x) and μ(y) cases gives you a solid foundation. Later in your differential equations coursework, you'll revisit these ideas with more powerful tools. The key insight — that multiplying by the right function can unlock an equation — remains the central idea at every level.

Practice Problems

PROBLEM 1CONCEPTUAL
In your own words, explain what it means for a first-order differential equation M dx + N dy = 0 to be "non-exact." Why can't we solve it the same way we solve an exact equation?
PROBLEM 2BASIC CALCULATION
Given the equation (2y) dx + (x) dy = 0, show that it is not exact. Then compute (∂M/∂y − ∂N/∂x) / N and determine whether an integrating factor μ(x) exists.
PROBLEM 3INTERMEDIATE
Solve the equation (y² + y) dx + (x) dy = 0 using an integrating factor. (Hint: try μ(y).) Find the general solution.
PROBLEM 4APPLIED
A mixing tank problem gives rise to the equation (3t²c + t³) dt + (t³) dc = 0, where c is the concentration and t is time. Determine whether this is exact. If not, find an integrating factor and write the general solution.
PROBLEM 5CRITICAL THINKING
Consider the equation (y) dx + (−x + y³) dy = 0. Show that neither (∂M/∂y − ∂N/∂x)/N nor (∂N/∂x − ∂M/∂y)/M yields a function of one variable. What does this tell you about finding μ(x) or μ(y)? Can the equation still have an integrating factor?

Lesson Summary

When a first-order equation M dx + N dy = 0 fails the exactness test (∂M/∂y ≠ ∂N/∂x), you can often rescue it by multiplying through by an integrating factor μ. If the ratio (∂M/∂y − ∂N/∂x) / N depends only on x, then μ(x) = e^{∫ f(x) dx}. If instead (∂N/∂x − ∂M/∂y) / M depends only on y, then μ(y) = e^{∫ g(y) dy}. After multiplying the equation by μ, the new equation is exact and can be solved using the standard method of finding a potential function F(x, y) = C.

The key steps are: (1) test for exactness, (2) compute the diagnostic ratios to determine what kind of integrating factor to use, (3) multiply through by μ, (4) verify the new equation is exact, and (5) solve using partial integration. This method extends your ability to solve first-order equations well beyond what separable and linear techniques can handle.

Varsity Tutors • Differential Equations • Integrating Factors: Non-Exact — Integrating Factors for Non-Exact Equations (Intro)