Non-Exact Equations & Integrating Factors
Solution: Multiply by an integrating factor $\mu(x,y)$ to make it exact: $\mu M\,dx + \mu N\,dy = 0$ where $\frac{\partial(\mu M)}{\partial y} = \frac{\partial(\mu N)}{\partial x}$.
Learning Objectives
The Big Idea
When we encounter $M\,dx + N\,dy = 0$ and find it's not exact, we can't use the exact equation method directly. But here's the clever trick: multiply the entire equation by some function $\mu(x,y)$ that transforms it into an exact equation.
The integrating factor $\mu$ is not unique—many functions might work. However, when $\mu$ depends only on $x$ or only on $y$, we get explicit formulas to find it.
The search for integrating factors occupied some of the finest mathematical minds of the 18th century. Euler showed that finding an integrating factor is, in general, as difficult as solving the original equation — yet for special cases, elegant formulas exist. The art lies in recognizing which case applies.
Theory of Integrating Factors
General Setup
Expanding the exactness condition:
This is hard to solve in general, but special cases yield explicit formulas!
Case 1: Integrating Factor Depending Only on x
Condition: $h(x) = \frac{1}{N}\left(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x}\right)$ must not depend on $y$.
Case 2: Integrating Factor Depending Only on y
Condition: $k(y) = \frac{1}{M}\left(\frac{\partial N}{\partial x} - \frac{\partial M}{\partial y}\right)$ must not depend on $x$.
Case 3: Special Form $\mu = x^a y^b$
Important Notes
Step-by-Step Solution Method
6-Step Algorithm
Verify that $\frac{\partial M}{\partial y} \neq \frac{\partial N}{\partial x}$
Compute $h(x) = \frac{1}{N}\left(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x}\right)$
If $h$ has no $y$ terms, then $\mu(x) = e^{\int h(x)\,dx}$ and you're done with Case 1.
Compute $k(y) = \frac{1}{M}\left(\frac{\partial N}{\partial x} - \frac{\partial M}{\partial y}\right)$
If $k$ has no $x$ terms, then $\mu(y) = e^{\int k(y)\,dy}$ and you're done with Case 2.
Compute the new equation: $\mu M\,dx + \mu N\,dy = 0$
Check that $\frac{\partial(\mu M)}{\partial y} = \frac{\partial(\mu N)}{\partial x}$
Use the method from Section 1.4: find $F(x,y)$ such that $\frac{\partial F}{\partial x} = \mu M$ and $\frac{\partial F}{\partial y} = \mu N$
Solution: $F(x,y) = C$
Worked Examples
Solution (Case 1: μ depends on x)
Step 1: Check Non-Exactness
$M = 3xy + y^2 \Rightarrow \frac{\partial M}{\partial y} = 3x + 2y$
$N = x^2 + xy \Rightarrow \frac{\partial N}{\partial x} = 2x + y$
Since $3x + 2y \neq 2x + y$, the equation is not exact.
Step 2: Compute h(x)
$$h(x) = \frac{1}{N}\left(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x}\right) = \frac{(3x+2y) - (2x+y)}{x^2+xy} = \frac{x+y}{x(x+y)} = \frac{1}{x}$$
Since $h(x) = \frac{1}{x}$ contains no $y$, Case 1 applies! ✓
Step 3: Find μ(x)
$$\mu(x) = e^{\int \frac{1}{x}\,dx} = e^{\ln x} = x$$
Step 4: Multiply by μ
Multiply the entire equation by $x$:
$$(3x^2y + xy^2)\,dx + (x^3 + x^2y)\,dy = 0$$
Step 5: Verify Exactness
$M_{\text{new}} = 3x^2y + xy^2 \Rightarrow \frac{\partial M_{\text{new}}}{\partial y} = 3x^2 + 2xy$
$N_{\text{new}} = x^3 + x^2y \Rightarrow \frac{\partial N_{\text{new}}}{\partial x} = 3x^2 + 2xy$ ✓
Now it's exact!
Step 6: Solve
Find $F$ such that $\frac{\partial F}{\partial x} = 3x^2y + xy^2$:
$$F(x,y) = \int (3x^2y + xy^2)\,dx = x^3y + \frac{x^2y^2}{2} + g(y)$$
Check with $\frac{\partial F}{\partial y} = x^3 + x^2y + g'(y) = x^3 + x^2y$, so $g'(y) = 0$, thus $g(y) = C_1$.
$$\boxed{x^3y + \frac{x^2y^2}{2} = C}$$
Solution (Case 2: μ depends on y)
Step 1: Check Non-Exactness
$M = y^2 + y \Rightarrow \frac{\partial M}{\partial y} = 2y + 1$
$N = -x \Rightarrow \frac{\partial N}{\partial x} = -1$
Not exact since $2y + 1 \neq -1$.
Step 2: Check Case 1
$$h(x) = \frac{1}{N}\left(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x}\right) = \frac{(2y+1)-(-1)}{-x} = \frac{2y+2}{-x}$$
This depends on both $x$ and $y$, so Case 1 fails.
Step 3: Try Case 2
$$k(y) = \frac{1}{M}\left(\frac{\partial N}{\partial x} - \frac{\partial M}{\partial y}\right) = \frac{-1 - (2y+1)}{y^2+y} = \frac{-(2y+2)}{y(y+1)} = \frac{-2(y+1)}{y(y+1)} = \frac{-2}{y}$$
Since $k(y) = -\frac{2}{y}$ contains no $x$, Case 2 applies! ✓
Step 4: Find μ(y)
$$\mu(y) = e^{\int -\frac{2}{y}\,dy} = e^{-2\ln y} = e^{\ln y^{-2}} = \frac{1}{y^2}$$
Step 5: Multiply and Solve
Multiply by $\frac{1}{y^2}$:
$$\left(1 + \frac{1}{y}\right)dx - \frac{x}{y^2}\,dy = 0$$
This is now exact. Solving (integrate with respect to $x$):
$$F(x,y) = x + \frac{x}{y} = C$$
$$\boxed{x\left(1 + \frac{1}{y}\right) = C} \quad \text{or} \quad \boxed{\frac{x(y+1)}{y} = C}$$
Solution (Showing Non-Uniqueness)
This classic equation has multiple integrating factors!
$M = y, \quad N = -x$
$\frac{\partial M}{\partial y} = 1, \quad \frac{\partial N}{\partial x} = -1$ → Not exact.
Integrating Factor 1: $\mu = \frac{1}{x^2}$
$$\frac{y}{x^2}\,dx - \frac{1}{x}\,dy = 0$$
Verify: $\frac{\partial}{\partial y}\left(\frac{y}{x^2}\right) = \frac{1}{x^2}$, $\frac{\partial}{\partial x}\left(-\frac{1}{x}\right) = \frac{1}{x^2}$ ✓
Solution: $F(x,y) = -\frac{y}{x} = C$ or $y = -Cx$ or $\boxed{\frac{y}{x} = C}$
Integrating Factor 2: $\mu = \frac{1}{y^2}$
$$\frac{1}{y}\,dx - \frac{x}{y^2}\,dy = 0$$
Solution: $F(x,y) = \frac{x}{y} = C$ or $\boxed{x = Cy}$
Integrating Factor 3: $\mu = \frac{1}{x^2+y^2}$
$$\frac{y}{x^2+y^2}\,dx - \frac{x}{x^2+y^2}\,dy = 0$$
This equals $d(\arctan(y/x)) = 0$, so solution is $\boxed{\arctan(y/x) = C}$
Key Insight: All these forms are equivalent! They all describe the same family of straight lines through the origin. Different integrating factors, same solution family.
Solution (Initial Value Problem)
Step 1: Check Non-Exactness
$M = 2y^2 + 3x \Rightarrow \frac{\partial M}{\partial y} = 4y$
$N = 2xy \Rightarrow \frac{\partial N}{\partial x} = 2y$
Not exact: $4y \neq 2y$.
Step 2: Find Case 1
$$h(x) = \frac{4y - 2y}{2xy} = \frac{2y}{2xy} = \frac{1}{x}$$
Case 1 applies! $\mu(x) = e^{\int \frac{1}{x}\,dx} = x$
Step 3-5: Multiply and Verify
$$(2xy^2 + 3x^2)\,dx + 2x^2y\,dy = 0$$
Now exact: $\frac{\partial}{\partial y}(2xy^2 + 3x^2) = 4xy = \frac{\partial}{\partial x}(2x^2y)$ ✓
Step 6: Solve
Find $F$ with $\frac{\partial F}{\partial x} = 2xy^2 + 3x^2$:
$$F(x,y) = x^2y^2 + x^3 + g(y)$$
Check: $\frac{\partial F}{\partial y} = 2x^2y + g'(y) = 2x^2y$, so $g(y) = C_1$.
General solution: $$x^2y^2 + x^3 = C$$
Step 7: Apply Initial Condition
At $(1,1)$: $1 \cdot 1 + 1 = C \Rightarrow C = 2$
$$\boxed{x^2y^2 + x^3 = 2}$$
Solution (Engineering Application: Thermal Systems)
Context: In thermal engineering, the temperature distribution in certain systems leads to non-exact equations. Consider a coupled thermal-mechanical system where:
$$(2T)\,dt + (t + T)\,dT = 0$$
where $T$ is temperature (K) and $t$ is time (s) in a coupled thermal-mechanical system.
Step 1: Check Exactness
$M = 2T \Rightarrow \frac{\partial M}{\partial T} = 2$
$N = t + T \Rightarrow \frac{\partial N}{\partial t} = 1$
Not exact: $2 \neq 1$ ✗
Step 2: Check Case 1 (μ depends on t only)
$$h(t) = \frac{\frac{\partial M}{\partial T} - \frac{\partial N}{\partial t}}{N} = \frac{2 - 1}{t + T} = \frac{1}{t + T}$$
This depends on both $t$ and $T$, so Case 1 doesn't apply.
Step 3: Check Case 2 (μ depends on T only)
$$k(T) = \frac{\frac{\partial N}{\partial t} - \frac{\partial M}{\partial T}}{M} = \frac{1 - 2}{2T} = \frac{-1}{2T}$$
This depends on $T$ only! Case 2 applies.
Step 4: Find Integrating Factor μ(T)
$$\mu(T) = e^{\int \frac{-1}{2T}\,dT} = e^{-\frac{1}{2}\ln T} = e^{\ln T^{-1/2}} = \frac{1}{\sqrt{T}} = T^{-1/2}$$
Step 5: Multiply the Equation by μ
$$\frac{2T}{\sqrt{T}}\,dt + \frac{t + T}{\sqrt{T}}\,dT = 0$$
$$2\sqrt{T}\,dt + \left(\frac{t}{\sqrt{T}} + \sqrt{T}\right)\,dT = 0$$
$$2T^{1/2}\,dt + (tT^{-1/2} + T^{1/2})\,dT = 0$$
Step 6: Verify Exactness
$M^* = 2T^{1/2} \Rightarrow \frac{\partial M^*}{\partial T} = T^{-1/2}$
$N^* = tT^{-1/2} + T^{1/2} \Rightarrow \frac{\partial N^*}{\partial t} = T^{-1/2}$
Exact! $T^{-1/2} = T^{-1/2}$ ✓
Step 7: Solve the Exact Equation
Find $F(t, T)$ such that $\frac{\partial F}{\partial t} = 2T^{1/2}$:
$$F(t, T) = 2tT^{1/2} + g(T) = 2t\sqrt{T} + g(T)$$
Now use $\frac{\partial F}{\partial T} = N^*$:
$$\frac{\partial F}{\partial T} = 2t \cdot \frac{1}{2}T^{-1/2} + g'(T) = tT^{-1/2} + T^{1/2}$$
$$tT^{-1/2} + g'(T) = tT^{-1/2} + T^{1/2}$$
$$g'(T) = T^{1/2}$$
$$g(T) = \frac{2}{3}T^{3/2}$$
Step 8: General Solution
$$F(t, T) = 2t\sqrt{T} + \frac{2}{3}T^{3/2} = C$$
$$\boxed{2t\sqrt{T} + \frac{2}{3}T^{3/2} = C}$$
Solution (Finding μ(x) via Case 1)
Step 1: Check Non-Exactness
$M = 2xy^3 - 2x^3y^3 - 4xy^2 + 2x$
$N = 3x^2y^2 + 4y$
$\frac{\partial M}{\partial y} = 6xy^2 - 6x^3y^2 - 8xy$
$\frac{\partial N}{\partial x} = 6xy^2$
Not exact: $6xy^2 - 6x^3y^2 - 8xy \neq 6xy^2$ ✗
Step 2: Try Case 1 — Does μ(x) exist?
Compute the formula:
$$\frac{\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x}}{N} = \frac{-6x^3y^2 - 8xy}{3x^2y^2 + 4y}$$
Factor the numerator and denominator:
$$= \frac{-2x(3x^2y^2 + 4y)}{3x^2y^2 + 4y} = -2x$$
✓ This depends only on x! Case 1 applies.
Step 3: Find the Integrating Factor μ(x)
$$\mu(x) = e^{\int -2x\,dx} = e^{-x^2}$$
Step 4: Multiply by μ(x) = e^(-x²) and Verify Exactness
$$e^{-x^2}(2xy^3 - 2x^3y^3 - 4xy^2 + 2x)\,dx + e^{-x^2}(3x^2y^2 + 4y)\,dy = 0$$
New M* and N*:
$\frac{\partial M^*}{\partial y} = e^{-x^2}(6xy^2 - 6x^3y^2 - 8xy)$
$\frac{\partial N^*}{\partial x} = -2x \cdot e^{-x^2}(3x^2y^2 + 4y) + e^{-x^2}(6xy^2 + 4y)$
After simplification: Both equal $e^{-x^2}(6xy^2 - 6x^3y^2 - 8xy)$ ✓
Step 5: Solve the Exact Equation
Integrate $\frac{\partial F}{\partial y} = e^{-x^2}(3x^2y^2 + 4y)$ with respect to $y$:
$$F(x,y) = e^{-x^2}(x^2y^3 + 2y^2) + \psi(x)$$
Differentiate with respect to x and set equal to M*:
$$\frac{\partial F}{\partial x} = -2x \cdot e^{-x^2}(x^2y^3 + 2y^2) + e^{-x^2}(2xy^3 + 4y) + \psi'(x) = M^*$$
This gives $\psi'(x) = -2x e^{-x^2}$, so $\psi(x) = e^{-x^2}$.
Step 6: General Solution
$$\boxed{e^{-x^2}(y^2(x^2y + 2) - 1) = C}$$
Solution (Finding μ(y) via Case 2)
Step 1: Check Non-Exactness
$M = 2xy^3 \Rightarrow \frac{\partial M}{\partial y} = 6xy^2$
$N = 3x^2y^2 + x^2y^3 + 1 \Rightarrow \frac{\partial N}{\partial x} = 6xy^2 + 2xy^3$
Not exact: $6xy^2 \neq 6xy^2 + 2xy^3$ ✗
Difference: $\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x} = -2xy^3$
Step 2: Check Case 1 — Does μ(x) exist?
$$\frac{\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x}}{N} = \frac{-2xy^3}{3x^2y^2 + x^2y^3 + 1}$$
This contains both $x$ and other terms, and doesn't simplify to a function of $x$ only. Case 1 fails. ✗
Step 3: Check Case 2 — Does μ(y) exist?
$$\frac{\frac{\partial N}{\partial x} - \frac{\partial M}{\partial y}}{M} = \frac{2xy^3}{2xy^3} = 1$$
✓ This is a constant! (Depends only on y — or is independent.) Case 2 applies.
Step 4: Find the Integrating Factor μ(y)
$$q(y) = 1$$
$$\mu(y) = e^{\int 1\,dy} = e^y$$
Step 5: Multiply by μ(y) = e^y and Verify Exactness
$$2xy^3 e^y\,dx + (3x^2y^2 + x^2y^3 + 1)e^y\,dy = 0$$
New M* and N*:
$\frac{\partial M^*}{\partial y} = e^y(6xy^2 + 2xy^3)$
$\frac{\partial N^*}{\partial x} = e^y(6xy^2 + 2xy^3)$
Exact! ✓
Step 6: Solve the Exact Equation
Integrate $\frac{\partial F}{\partial x} = 2xy^3 e^y$ with respect to $x$:
$$F(x,y) = x^2y^3 e^y + \phi(y)$$
Differentiate with respect to y:
$$\frac{\partial F}{\partial y} = x^2(3y^2 + y^3)e^y + \phi'(y) = (3x^2y^2 + x^2y^3 + 1)e^y$$
Therefore: $\phi'(y) = e^y \Rightarrow \phi(y) = e^y$
Step 7: General Solution
$$\boxed{(x^2y^3 + 1)e^y = C}$$
Solution (Simple Integrating Factor μ(x) = x)
Step 1: Check Non-Exactness
$M = 3x + 2y^2 \Rightarrow \frac{\partial M}{\partial y} = 4y$
$N = 2xy \Rightarrow \frac{\partial N}{\partial x} = 2y$
Not exact: $4y \neq 2y$ ✗
Step 2: Check for Case 1
$$\frac{\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x}}{N} = \frac{4y - 2y}{2xy} = \frac{2y}{2xy} = \frac{1}{x}$$
✓ Depends only on x! Case 1 applies.
Step 3: Find the Integrating Factor μ(x)
$$p(x) = \frac{1}{x}$$
$$\mu(x) = e^{\int \frac{1}{x}\,dx} = e^{\ln x} = x$$
Step 4: Multiply by μ(x) = x and Verify Exactness
$$(3x^2 + 2xy^2)\,dx + 2x^2y\,dy = 0$$
New M* and N*:
$\frac{\partial M^*}{\partial y} = 4xy$
$\frac{\partial N^*}{\partial x} = 4xy$
Exact! ✓
Step 5: Solve the Exact Equation
Integrate $\frac{\partial F}{\partial x} = 3x^2 + 2xy^2$ with respect to $x$:
$$F(x,y) = x^3 + x^2y^2 + h(y)$$
Differentiate with respect to y and set equal to N*:
$$\frac{\partial F}{\partial y} = 2x^2y + h'(y) = 2x^2y$$
Therefore: $h'(y) = 0 \Rightarrow h(y) = C_1$ (a constant)
Step 6: General Solution
$$\boxed{x^3 + x^2y^2 = C}$$
📝 Exam-Style Practice Problems
These problems are similar in style and difficulty to past exam questions. Click each problem to reveal the step-by-step solution.
Solution
Step 1: Check for non-exactness
$M = 3y$, $N = 2x$
$$\frac{\partial M}{\partial y} = 3, \quad \frac{\partial N}{\partial x} = 2$$Since $3 \neq 2$, the equation is not exact.
Step 2: Test Case 1 for integrating factor $\mu(x)$
$$h(x) = \frac{1}{N}\left(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x}\right) = \frac{3-2}{2x} = \frac{1}{2x}$$Since $h(x)$ depends only on $x$, an integrating factor $\mu(x) = e^{\int h(x)\,dx}$ exists.
Step 3: Find $\mu(x) = x^\alpha$
Multiplying by $x^\alpha$: $3yx^\alpha\,dx + 2x^{1+\alpha}\,dy = 0$
For exactness, we need:
$$\frac{\partial(3yx^\alpha)}{\partial y} = \frac{\partial(2x^{1+\alpha})}{\partial x}$$ $$3x^\alpha = 2(1+\alpha)x^\alpha$$ $$3 = 2(1+\alpha)$$ $$\alpha = \frac{1}{2}$$Step 4: Multiply by $\mu = x^{1/2}$ and solve as exact equation
$$3yx^{1/2}\,dx + 2x^{3/2}\,dy = 0$$Integrate $N$ with respect to $y$:
$$F(x,y) = \int 2x^{3/2}\,dy = 2x^{3/2}y + h(x)$$Check: $\dfrac{\partial F}{\partial x} = 3x^{1/2}y + h'(x) = 3yx^{1/2}$ implies $h'(x) = 0$.
Step 5: Write the general solution
$$\boxed{2x^{3/2}y = C} \quad \text{or} \quad \boxed{y = \frac{C}{2x^{3/2}}}$$Solution
Step 1: Check for non-exactness
$M = 3xy + y^2$, $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 $\mu = x^a y^b$
After multiplying by $x^a y^b$:
$$\tilde{M} = 3x^{a+1}y^{b+1} + x^a y^{b+2}$$ $$\tilde{N} = x^{a+2}y^b + x^{a+1}y^{b+1}$$Step 3: Apply exactness condition
$$\frac{\partial \tilde{M}}{\partial y} = 3(b+1)x^{a+1}y^b + (b+2)x^a y^{b+1}$$ $$\frac{\partial \tilde{N}}{\partial x} = (a+2)x^{a+1}y^b + (a+1)x^a y^{b+1}$$Matching coefficients:
Coefficient of $x^{a+1}y^b$: $3(b+1) = a+2$
Coefficient of $x^a y^{b+1}$: $b+2 = a+1$
From the second equation: $a = b+1$. Substituting into the first:
$$3(b+1) = (b+1) + 2 \implies 2(b+1) = 2 \implies b = 0, \, a = 1$$Step 4: Multiply by $\mu = x$ and solve
$$(3x^2y + xy^2)\,dx + (x^3 + x^2y)\,dy = 0$$Verify: $\dfrac{\partial}{\partial y}(3x^2y + xy^2) = 3x^2 + 2xy = \dfrac{\partial}{\partial x}(x^3 + x^2y)$ ✓
Integrate: $F = \int (x^3 + x^2y)\,dy = x^3 y + \dfrac{x^2 y^2}{2} + h(x)$
Check: $\dfrac{\partial F}{\partial x} = 3x^2y + xy^2 + h'(x)$ implies $h'(x) = 0$.
Step 5: Write the general solution
$$\boxed{x^3y + \frac{x^2y^2}{2} = C}$$Interactive Non-Exactness Checker
Enter a differential equation $M(x,y)\,dx + N(x,y)\,dy = 0$ and see if it's exact, what integrating factor it might need, and visualize the solution curves.
Before & After: Vector Fields
This visualizer shows the vector field $(M, N)$ before and after applying an integrating factor. Notice how multiplying by $\mu$ "aligns" the field to be conservative (the solution curves become clearer).
Before: Non-Exact (M, N)
After: Exact (μM, μN)
Non-exact equations seem unsolvable at first — but with the right integrating factor, difficulty transforms into ease. Allah repeats this promise twice for emphasis. When you face a difficult equation, remember: the integrating factor is out there. Your job is to persist until you find it.
Practice: Quick Quiz
Q1: Is the equation $(2y)\,dx + (x)\,dy = 0$ exact?
Q2: For $(x + y)\,dx + (2xy)\,dy = 0$, compute $\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x}$:
Q3: Find the integrating factor for $y\,dx - x\,dy = 0$:
Q4: After multiplying $y\,dx - x\,dy = 0$ by $\mu = 1/y^2$, what is the solution?
Q5: Is the equation $(x + y^2)\,dx + (2xy)\,dy = 0$ exact?
Q6: For $(2y)\,dx + (x + y)\,dy = 0$, compute $(N_x - M_y)/M$:
Quick Reference: Integrating Factors
If $\frac{1}{N}\left(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x}\right) = h(x)$:
μ(x) = exp(∫h(x)dx)
If $\frac{1}{M}\left(\frac{\partial N}{\partial x} - \frac{\partial M}{\partial y}\right) = k(y)$:
μ(y) = exp(∫k(y)dy)
After multiplying by μ:
∂(μM)/∂y = ∂(μN)/∂x
Try: $x^a, y^b, x^ay^b, e^{ax}, e^{by}$, etc.
Check each by verifying exactness