Exact Differential Equations — Theory
1. Standard form
A first-order differential equation is often written in differential form:
\[
M(x,y)\,dx+N(x,y)\,dy=0.
\]
Here \(M(x,y)\) is the coefficient of \(dx\), and \(N(x,y)\) is the coefficient of \(dy\).
2. What “exact” means
The equation is called exact if there is a function \(\Phi(x,y)\) such that:
\[
d\Phi=\Phi_x\,dx+\Phi_y\,dy.
\]
If this differential matches \(M\,dx+N\,dy\), then:
\[
\Phi_x=M,
\qquad
\Phi_y=N.
\]
The function \(\Phi(x,y)\) is called a potential function.
3. Exactness condition
If \(\Phi_x=M\) and \(\Phi_y=N\), then:
\[
M_y=\Phi_{xy},
\qquad
N_x=\Phi_{yx}.
\]
When the mixed partial derivatives are equal, the exactness test is:
\[
\frac{\partial M}{\partial y}
=
\frac{\partial N}{\partial x}.
\]
So the equation
\[
M(x,y)\,dx+N(x,y)\,dy=0
\]
is exact when:
\[
M_y=N_x.
\]
4. Solution form
If the equation is exact, then:
\[
M(x,y)\,dx+N(x,y)\,dy=d\Phi.
\]
Since the differential equation says \(d\Phi=0\), the solution is:
\[
\Phi(x,y)=C.
\]
This is usually an implicit solution.
5. How to find the potential function
Start with:
\[
\Phi_x=M.
\]
Integrate \(M\) with respect to \(x\):
\[
\Phi(x,y)=\int M(x,y)\,dx+h(y).
\]
The term \(h(y)\) is needed because integration with respect to \(x\) treats \(y\) as a constant.
Then differentiate this expression with respect to \(y\), and compare it with \(N\):
\[
\Phi_y=N.
\]
This determines \(h'(y)\), and then \(h(y)\).
6. Worked example
Solve:
\[
(2x+y)\,dx+(x+2y)\,dy=0.
\]
Identify:
\[
M(x,y)=2x+y,
\qquad
N(x,y)=x+2y.
\]
Compute the partial derivatives:
\[
M_y=1,
\qquad
N_x=1.
\]
Since \(M_y=N_x\), the equation is exact.
Now integrate \(M\) with respect to \(x\):
\[
\Phi(x,y)=\int(2x+y)\,dx=x^2+xy+h(y).
\]
Differentiate with respect to \(y\):
\[
\Phi_y=x+h'(y).
\]
Compare with \(N=x+2y\):
\[
x+h'(y)=x+2y.
\]
Therefore:
\[
h'(y)=2y.
\]
Integrate:
\[
h(y)=y^2.
\]
The potential function is:
\[
\Phi(x,y)=x^2+xy+y^2.
\]
So the implicit solution is:
\[
x^2+xy+y^2=C.
\]
7. Integrating factors
If an equation is not exact, it may become exact after multiplying by an integrating factor \(\mu\):
\[
\mu M\,dx+\mu N\,dy=0.
\]
Two common simple cases are an integrating factor depending only on \(x\), or only on \(y\).
8. Integrating factor depending only on \(x\)
If
\[
\frac{M_y-N_x}{N}
\]
is a function of \(x\) only, then an integrating factor is:
\[
\mu(x)=
\exp\left(
\int
\frac{M_y-N_x}{N}
\,dx
\right).
\]
9. Integrating factor depending only on \(y\)
If
\[
\frac{N_x-M_y}{M}
\]
is a function of \(y\) only, then an integrating factor is:
\[
\mu(y)=
\exp\left(
\int
\frac{N_x-M_y}{M}
\,dy
\right).
\]
10. Direction field connection
From
\[
M(x,y)\,dx+N(x,y)\,dy=0,
\]
divide by \(dx\):
\[
M(x,y)+N(x,y)\frac{dy}{dx}=0.
\]
Therefore:
\[
\frac{dy}{dx}=-\frac{M(x,y)}{N(x,y)}.
\]
This slope field should be tangent to the solution curves \(\Phi(x,y)=C\).
12. Common mistakes
- Mixing up \(M\) and \(N\): \(M\) is the coefficient of \(dx\), and \(N\) is the coefficient of \(dy\).
- Differentiating with respect to the wrong variable: exactness uses \(M_y\) and \(N_x\), not \(M_x\) and \(N_y\).
- Forgetting \(h(y)\): when integrating \(M\) with respect to \(x\), always add \(h(y)\).
- Stopping after the exactness check: after confirming exactness, you still need to build \(\Phi(x,y)\).
- Assuming every non-exact equation has a simple factor: a simple \(\mu(x)\) or \(\mu(y)\) may not exist.
- Confusing explicit and implicit solutions: exact equations often naturally produce \(\Phi(x,y)=C\), not \(y=\cdots\).
- Ignoring graph units: axis tick labels should show numerical values together with units.