Skip to content

Exact Equations

You will learn how to recognize exact differential equations, verify they are exact using partial derivatives, and solve them by finding the potential function.

Some first-order differential equations can be written in differential form:

M(x,y)dx+N(x,y)dy=0M(x, y) \, dx + N(x, y) \, dy = 0

This equation is called exact if there exists a function ϕ(x,y)\phi(x, y) such that:

dϕ=Mdx+Ndyd\phi = M \, dx + N \, dy

A quick test tells us whether such a ϕ\phi exists:

My=Nx\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}

If this condition holds, we can reconstruct ϕ(x,y)\phi(x, y) by integrating MM with respect to xx (treating yy as constant), then adding the remaining terms from NN.

The solution is then simply:

ϕ(x,y)=C\phi(x, y) = C

The visual above shows the level curves of the potential function ϕ(x,y)=x2+xy+32y2\phi(x, y) = x^2 + xy + \frac{3}{2}y^2. Each ellipse is a solution curve where ϕ\phi is constant.

Example 1: Checking Exactness

Determine whether the equation (2x+y)dx+(x+3y)dy=0(2x + y) \, dx + (x + 3y) \, dy = 0 is exact.

Solution: Here M=2x+yM = 2x + y and N=x+3yN = x + 3y.

My=1,Nx=1\frac{\partial M}{\partial y} = 1, \quad \frac{\partial N}{\partial x} = 1

They are equal, so the equation is exact.

Example 2: Solving an Exact Equation

Solve (2x+y)dx+(x+3y)dy=0(2x + y) \, dx + (x + 3y) \, dy = 0.

Solution: Integrate MM with respect to xx:

ϕ(x,y)=x2+xy+h(y)\phi(x, y) = x^2 + xy + h(y)

Now take the partial with respect to yy and match to NN:

ϕy=x+h(y)=x+3y\frac{\partial \phi}{\partial y} = x + h'(y) = x + 3y

So h(y)=3yh'(y) = 3y which gives h(y)=32y2h(y) = \frac{3}{2}y^2.

Final potential function: ϕ(x,y)=x2+xy+32y2=C\phi(x, y) = x^2 + xy + \frac{3}{2}y^2 = C

Example 3: With Initial Condition

Solve the exact equation (y+ex)dx+(x+cosy)dy=0(y + e^x) \, dx + (x + \cos y) \, dy = 0 with y(0)=0y(0) = 0.

Solution: It is exact. Integrating gives:

ϕ(x,y)=xy+ex+siny=C\phi(x, y) = xy + e^x + \sin y = C

Using y(0)=0y(0) = 0: 0+1+0=C    C=10 + 1 + 0 = C \implies C = 1

Implicit solution: xy+ex+siny=1xy + e^x + \sin y = 1

Exact equations appear naturally in physics when working with conservative force fields. For example, finding the potential energy function from a force is essentially solving an exact equation. They also show up in thermodynamics (relating internal energy, entropy, and temperature) and in fluid dynamics when modeling irrotational flow. In engineering, they help solve problems involving exact differentials in electrical networks and heat transfer.

A differential equation $M\,dx + N\,dy = 0$ is exact if:
After verifying exactness, the next step is to:
The general solution to an exact equation has the form:
The equation $(2xy)\,dx + (x^2)\,dy = 0$ is:
Exact equations often arise in physics when modeling: