1 / 10
Chapter 1 · First-Order ODEs

Non-Exact Equations & Integrating Factors

Making Non-Exact Equations Exact
Dr. Mohamed Mabrok · Qatar University

When an Equation is NOT Exact

For the equation $M(x,y)\,dx + N(x,y)\,dy = 0$, we check: is $\dfrac{\partial M}{\partial y} = \dfrac{\partial N}{\partial x}$?
The Problem
If $\dfrac{\partial M}{\partial y} \neq \dfrac{\partial N}{\partial x}$, the equation is NOT exact — and we can't use the exact equation method directly.
But there's a powerful trick: multiply the entire equation by a clever function $\mu(x,y)$ called an integrating factor.
$$\mu(x,y) \cdot M\,dx + \mu(x,y) \cdot N\,dy = 0$$
The multiplied equation IS exact, so it becomes solvable!
$$\frac{\partial(\mu M)}{\partial y} = \frac{\partial(\mu N)}{\partial x}$$

Case 1: Integrating Factor $\mu(x)$

If the integrating factor depends only on $x$ (not on $y$), we have a simple formula.
Case 1 Formula
If $\dfrac{1}{N}\left(\dfrac{\partial M}{\partial y} - \dfrac{\partial N}{\partial x}\right) = h(x)$ depends only on $x$, then:
$$\mu(x) = e^{\int h(x)\,dx}$$
Key insight: The function $h(x)$ must have NO $y$ terms — if it contains $y$, this case doesn't apply.
Quick Check
Compute $\dfrac{1}{N}\left(\dfrac{\partial M}{\partial y} - \dfrac{\partial N}{\partial x}\right)$. If the result is a function of $x$ alone (all $y$ terms cancel), you're in Case 1!

Case 2: Integrating Factor $\mu(y)$

If the integrating factor depends only on $y$ (not on $x$), we have a second formula.
Case 2 Formula
If $\dfrac{1}{M}\left(\dfrac{\partial N}{\partial x} - \dfrac{\partial M}{\partial y}\right) = k(y)$ depends only on $y$, then:
$$\mu(y) = e^{\int k(y)\,dy}$$
Note the difference: The subtraction order is reversed compared to Case 1: it's $\dfrac{\partial N}{\partial x} - \dfrac{\partial M}{\partial y}$, not the other way around.
Quick Check
Compute $\dfrac{1}{M}\left(\dfrac{\partial N}{\partial x} - \dfrac{\partial M}{\partial y}\right)$. If the result is a function of $y$ alone (all $x$ terms cancel), you're in Case 2!

The 6-Step Integrating Factor Algorithm

STEP 1
Verify NOT exact
Check that $\frac{\partial M}{\partial y} \neq \frac{\partial N}{\partial x}$
STEP 2
Try Case 1: $\mu(x)$
Compute $\frac{1}{N}(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x})$
STEP 3
Try Case 2: $\mu(y)$
If Case 1 fails, try $\frac{1}{M}(\frac{\partial N}{\partial x} - \frac{\partial M}{\partial y})$
STEP 4
Multiply by $\mu$
Multiply the original equation by the integrating factor
STEP 5
Verify NOW exact
Check that $\frac{\partial(\mu M)}{\partial y} = \frac{\partial(\mu N)}{\partial x}$ ✓
STEP 6
Solve as exact equation
Use the exact equation method to find $F(x,y) = C$
Worked Example 1: Case 1

Solve: $(3xy+y^2)\,dx + (x^2+xy)\,dy = 0$

STEP 1 Check if exact
$$M = 3xy + y^2, \quad N = x^2 + xy$$ $$\frac{\partial M}{\partial y} = 3x + 2y, \quad \frac{\partial N}{\partial x} = 2x + y$$
NOT exact! Since $3x+2y \neq 2x+y$.
STEP 2 Try Case 1: compute $\frac{1}{N}(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x})$
$$h(x) = \frac{1}{x^2+xy} \cdot [(3x+2y) - (2x+y)] = \frac{x+y}{x(x+y)} = \frac{1}{x}$$
Success! $h(x) = \frac{1}{x}$ depends only on $x$.
Worked Example 1 (continued)

Finding and Applying $\mu(x)$

STEP 3 Compute $\mu(x) = e^{\int h(x)\,dx}$
$$\mu(x) = e^{\int \frac{1}{x}\,dx} = e^{\ln x} = x$$
STEP 4 Multiply the original equation by $\mu = x$
$$x(3xy+y^2)\,dx + x(x^2+xy)\,dy = 0$$ $$(3x^2y + xy^2)\,dx + (x^3 + x^2y)\,dy = 0$$
STEP 5–6 Verify exact & solve
$$\boxed{x^3 y + \frac{x^2 y^2}{2} = C}$$
Worked Example 2: Case 2

Solve: $(y^2+y)\,dx - x\,dy = 0$

STEP 1–2 Check Case 1
$$M = y^2 + y, \quad N = -x$$ $$h(x) = \frac{1}{-x}[(2y+1) - (-1)] = \frac{2y+2}{-x}$$
✗ Case 1 fails (contains $y$ terms).
STEP 3 Try Case 2: $k(y) = \frac{1}{M}(\frac{\partial N}{\partial x} - \frac{\partial M}{\partial y})$
$$k(y) = \frac{1}{y^2+y}[(-1) - (2y+1)] = \frac{-2y-2}{y(y+1)} = \frac{-2(y+1)}{y(y+1)} = -\frac{2}{y}$$
Success! $\mu(y) = e^{\int -\frac{2}{y}\,dy} = e^{-2\ln y} = \dfrac{1}{y^2}$

Tips & Deeper Connections

Tip: Look for Common Factors
Before jumping to Case 1 or 2, check if $M$ and $N$ share a common factor. Dividing by it first might reveal hidden structure.
Linear Equations as Special Case
Linear equations $\frac{dy}{dx} + P(x)y = Q(x)$ rewrite as:
$[P(x)y - Q(x)]\,dx + dy = 0$
The integrating factor $\mu(x) = e^{\int P(x)\,dx}$ is exactly Case 1!
Important Note
Integrating factors are NOT unique. Any constant multiple of an integrating factor is also an integrating factor. Usually we pick the simplest form.

Key Takeaways

1️⃣
Try Case 1 First
Compute $\frac{1}{N}(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x})$. If it depends only on $x$, use $\mu(x) = e^{\int h(x)\,dx}$.
2️⃣
If Case 1 Fails, Try Case 2
Compute $\frac{1}{M}(\frac{\partial N}{\partial x} - \frac{\partial M}{\partial y})$. If it depends only on $y$, use $\mu(y) = e^{\int k(y)\,dy}$.
3️⃣
After Finding $\mu$, Solve as Exact
Multiply the equation by $\mu$ and use the exact equation method to find $F(x,y) = C$.
4️⃣
Linear Equations Are Special
The standard linear equation integrating factor $e^{\int P(x)\,dx}$ is exactly Case 1!
$$\text{Case 1:} \quad \mu(x) = e^{\int \frac{1}{N}(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x})\,dx}$$ $$\text{Case 2:} \quad \mu(y) = e^{\int \frac{1}{M}(\frac{\partial N}{\partial x} - \frac{\partial M}{\partial y})\,dy}$$
🔊 Voice