The Central Idea

Suppose a function \(F(x,y)\) is constant along a family of curves:

\[ F(x,y)=C. \]

Differentiating implicitly gives

\[ F_x\,dx+F_y\,dy=0. \]

Therefore, a differential equation of the form

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

is exact when there exists a function \(F(x,y)\) such that

\[ F_x=M \]

and

\[ F_y=N. \]

The solution is then

\[ \boxed{F(x,y)=C}. \]

From Total Differentials to Differential Equations

For a differentiable function \(F(x,y)\), the total differential is

\[ dF=F_x\,dx+F_y\,dy. \]

If

\[ dF=0, \]

then

\[ F_x\,dx+F_y\,dy=0. \]

This means that the differential equation describes curves along which \(F\) remains constant.

Standard Form

Exact equations are commonly written as

\[ \boxed{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\).

The goal is to determine whether these two functions can be the partial derivatives of a single potential function \(F(x,y)\).

The Exactness Test

If

\[ F_x=M \]

and

\[ F_y=N, \]

then, under the usual smoothness conditions,

\[ F_{xy}=F_{yx}. \]

Therefore,

\[ \frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}. \]

This gives the standard exactness test:

\[ \boxed{M_y=N_x}. \]

Why the Exactness Test Works

Since

\[ M=F_x, \]

differentiating \(M\) with respect to \(y\) gives

\[ M_y=F_{xy}. \]

Since

\[ N=F_y, \]

differentiating \(N\) with respect to \(x\) gives

\[ N_x=F_{yx}. \]

When the mixed partial derivatives are continuous,

\[ F_{xy}=F_{yx}, \]

so exactness requires

\[ M_y=N_x. \]

Example: Test for Exactness

Consider

\[ (2x+y)\,dx+(x+4y)\,dy=0. \]

Identify

\[ M(x,y)=2x+y \]

and

\[ N(x,y)=x+4y. \]

Compute

\[ M_y=1 \]

and

\[ N_x=1. \]

Since

\[ M_y=N_x, \]

the equation is exact.

Reconstructing the Potential Function

Once exactness is confirmed, we seek \(F(x,y)\) satisfying

\[ F_x=M \]

and

\[ F_y=N. \]

One common strategy is:

  1. Integrate \(M\) with respect to \(x\).
  2. Add an unknown function of \(y\).
  3. Differentiate the result with respect to \(y\).
  4. Compare with \(N\).
  5. Determine the missing function.

Why We Add a Function Instead of a Constant

Suppose

\[ F_x=2x+y. \]

Integrating with respect to \(x\) gives

\[ F=x^2+xy+g(y). \]

The term \(g(y)\) appears because any function depending only on \(y\) behaves like a constant when differentiated with respect to \(x\).

Indeed,

\[ \frac{\partial}{\partial x}g(y)=0. \]

Example: Solve an Exact Equation

Solve

\[ (2x+y)\,dx+(x+4y)\,dy=0. \]

We already found

\[ M_y=N_x=1. \]

Integrate \(M\) with respect to \(x\):

\[ F(x,y) = \int(2x+y)\,dx. \]

Therefore,

\[ F=x^2+xy+g(y). \]

Finding the Missing Function

Differentiate

\[ F=x^2+xy+g(y) \]

with respect to \(y\):

\[ F_y=x+g'(y). \]

But we need

\[ F_y=N=x+4y. \]

Therefore,

\[ g'(y)=4y. \]

Integrate:

\[ g(y)=2y^2. \]

Thus,

\[ F(x,y)=x^2+xy+2y^2. \]

The Implicit Solution

Since the exact equation corresponds to

\[ dF=0, \]

the solution is

\[ \boxed{x^2+xy+2y^2=C}. \]

Exact equations naturally produce implicit solutions.

Verification by Differentiation

Start with

\[ x^2+xy+2y^2=C. \]

Differentiate:

\[ 2x\,dx+y\,dx+x\,dy+4y\,dy=0. \]

Group the differentials:

\[ (2x+y)\,dx+(x+4y)\,dy=0. \]

The original differential equation returns, so the solution is verified.

Solving by Integrating \(N\) First

We do not have to begin with \(M\).

Starting from

\[ F_y=N, \]

we may integrate \(N\) with respect to \(y\):

\[ F(x,y)=\int N(x,y)\,dy+h(x). \]

We then differentiate with respect to \(x\) and compare with \(M\).

Both approaches should produce equivalent potential functions.

Example: Integrate \(N\) First

For

\[ (2x+y)\,dx+(x+4y)\,dy=0, \]

integrate

\[ N=x+4y \]

with respect to \(y\):

\[ F=xy+2y^2+h(x). \]

Differentiate with respect to \(x\):

\[ F_x=y+h'(x). \]

Compare with

\[ M=2x+y. \]

Therefore,

\[ h'(x)=2x, \]

so

\[ h(x)=x^2. \]

Again,

\[ \boxed{F=x^2+xy+2y^2}. \]

Example with Polynomial Terms

Solve

\[ (3x^2+2xy)\,dx+(x^2+6y)\,dy=0. \]

Let

\[ M=3x^2+2xy \]

and

\[ N=x^2+6y. \]

Compute

\[ M_y=2x \]

and

\[ N_x=2x. \]

The equation is exact.

Complete the Polynomial Example

Integrate \(M\) with respect to \(x\):

\[ F = \int(3x^2+2xy)\,dx = x^3+x^2y+g(y). \]

Differentiate with respect to \(y\):

\[ F_y=x^2+g'(y). \]

Compare with

\[ N=x^2+6y. \]

Thus,

\[ g'(y)=6y, \]

so

\[ g(y)=3y^2. \]

Therefore,

\[ \boxed{x^3+x^2y+3y^2=C}. \]

Exact Equations in \(dy/dx\) Form

Exact equations do not always arrive in differential form.

Suppose

\[ \frac{dy}{dx} = -\frac{M(x,y)}{N(x,y)}. \]

Multiply by \(N(x,y)\,dx\):

\[ N\,dy=-M\,dx. \]

Rearranging gives

\[ M\,dx+N\,dy=0. \]

We can then test for exactness.

Example: Convert to Exact Form

Consider

\[ \frac{dy}{dx} = -\frac{2x+y}{x+4y}. \]

Multiply through:

\[ (2x+y)\,dx+(x+4y)\,dy=0. \]

This is the exact equation solved earlier, so

\[ \boxed{x^2+xy+2y^2=C}. \]

Initial Conditions with Exact Equations

An initial condition selects one level curve from the family

\[ F(x,y)=C. \]

Suppose

\[ x^2+xy+2y^2=C \]

and

\[ y(1)=1. \]

Substitute the point \((1,1)\):

\[ C=1^2+(1)(1)+2(1)^2. \]

Therefore,

\[ C=4. \]

The particular implicit solution is

\[ \boxed{x^2+xy+2y^2=4}. \]

Why Implicit Form Is Often Best

Exact equations naturally produce

\[ F(x,y)=C. \]

It may be possible to solve this relation explicitly for \(y\), but doing so is not always necessary or desirable.

The implicit equation already describes the solution curves and often preserves the underlying structure more clearly.

Level Curves and Exact Equations

The equation

\[ F(x,y)=C \]

describes a family of level curves of the function \(F\).

Along each solution curve, \(F\) remains constant.

Exact differential equations therefore connect differential equations with the geometry of scalar fields and level sets.

The Gradient Connection

If

\[ F_x=M \]

and

\[ F_y=N, \]

then

\[ \nabla F = \langle M,N\rangle. \]

The vector field

\[ \langle M,N\rangle \]

is therefore the gradient of a scalar potential \(F\).

This is the same structural idea that appears later in conservative vector fields.

Exactness and Conservative Fields

In two dimensions, the differential form

\[ M\,dx+N\,dy \]

can be associated with the vector field

\[ \mathbf{F} = \langle M,N\rangle. \]

When this field is the gradient of a scalar potential, the differential form is exact.

Thus exact differential equations are closely connected to conservative fields and potential functions.

Domain Conditions Matter

The condition

\[ M_y=N_x \]

is powerful, but the domain also matters.

On a suitably simple region, such as a simply connected domain where the relevant partial derivatives are continuous, equality of the mixed partial expressions supports the existence of a potential function.

When a domain contains holes or singularities, additional care may be required.

A Nonexact Equation

Consider

\[ (y+2x)\,dx+x^2\,dy=0. \]

Here,

\[ M=y+2x \]

and

\[ N=x^2. \]

Compute

\[ M_y=1 \]

and

\[ N_x=2x. \]

These are not equal in general, so the equation is not exact.

Not Exact Does Not Mean Unsolvable

If

\[ M_y\ne N_x, \]

the equation is not exact in its current form.

It may still be:

Classification helps determine the next strategy.

Integrating Factors for Nonexact Equations

Sometimes a nonexact equation

\[ M\,dx+N\,dy=0 \]

becomes exact after multiplication by a nonzero function

\[ \mu(x,y). \]

The transformed equation is

\[ \mu M\,dx+\mu N\,dy=0. \]

The function \(\mu\) is called an integrating factor.

This extends the same general idea encountered with first-order linear equations.

Integrating Factor Depending Only on \(x\)

For

\[ M\,dx+N\,dy=0, \]

suppose

\[ \frac{M_y-N_x}{N} \]

simplifies to a function of \(x\) alone.

Then an integrating factor depending only on \(x\) may be found from

\[ \boxed{ \mu(x) = e^{\int \frac{M_y-N_x}{N}\,dx} }. \]

This criterion is useful in selected nonexact equations.

Integrating Factor Depending Only on \(y\)

If

\[ \frac{N_x-M_y}{M} \]

simplifies to a function of \(y\) alone, then an integrating factor depending only on \(y\) may be found from

\[ \boxed{ \mu(y) = e^{\int \frac{N_x-M_y}{M}\,dy} }. \]

These formulas are specialized tools rather than universal methods.

Example: A Simple Integrating Factor

Consider

\[ y\,dx+x^2\,dy=0. \]

Here,

\[ M=y, \qquad N=x^2. \]

Then

\[ M_y=1 \]

and

\[ N_x=2x. \]

The equation is not exact.

We would next investigate whether a simple integrating factor depending on one variable can make the equation exact.

In this course, the primary emphasis remains recognizing and solving equations that are already exact.

Choosing Whether to Integrate \(M\) or \(N\)

Either route is valid, but one may be more efficient.

If \(M\) is easier to integrate with respect to \(x\), begin with

\[ F_x=M. \]

If \(N\) is easier to integrate with respect to \(y\), begin with

\[ F_y=N. \]

Good method selection reduces algebra and lowers the chance of error.

Common Error: Testing the Wrong Partial Derivatives

For

\[ M\,dx+N\,dy=0, \]

the comparison is

\[ \boxed{M_y\text{ versus }N_x}. \]

It is not

\[ M_x\text{ versus }N_y. \]

The cross-partials are the quantities associated with the mixed partials of the potential function.

Common Error: Forgetting the Missing Function

Suppose

\[ F_x=3x^2+2xy. \]

Integrating with respect to \(x\) gives

\[ F=x^3+x^2y+g(y), \]

not merely

\[ F=x^3+x^2y. \]

The function \(g(y)\) contains the information that differentiation with respect to \(x\) cannot detect.

Common Error: Treating \(g(y)\) as a Numerical Constant

When integrating a partial derivative with respect to \(x\), the integration constant may depend on \(y\).

Similarly, when integrating with respect to \(y\), the missing term may be a function of \(x\).

This is one of the key differences between ordinary integration and reconstructing a multivariable potential.

Common Error: Forgetting to Check Exactness First

The potential-function method assumes that the equation is exact.

If

\[ M_y\ne N_x, \]

blindly integrating \(M\) and matching \(N\) will generally lead to contradictions.

Test exactness before reconstructing \(F\).

Common Error: Mixing Partial and Ordinary Derivatives

In the exactness test,

\[ M_y \]

means the partial derivative of \(M(x,y)\) with respect to \(y\), treating \(x\) as constant.

Likewise,

\[ N_x \]

treats \(y\) as constant.

This is a multivariable derivative calculation.

Common Error: Forcing Explicit Form

If the exact-equation solution is

\[ x^2+xy+2y^2=C, \]

this is already a complete implicit solution.

Solving for \(y\) may introduce unnecessary algebra and may split the solution into multiple branches.

Keep implicit form unless the problem specifically requires an explicit expression.

Common Error: Ignoring the Initial Point

A general exact solution has the form

\[ F(x,y)=C. \]

If an initial condition is given, substitute the initial point to determine \(C\).

Without this step, the solution remains a family rather than the requested particular solution.

A Reliable Procedure for Exact Equations

  1. Write the equation as \(M(x,y)\,dx+N(x,y)\,dy=0\).
  2. Identify \(M\) and \(N\).
  3. Compute \(M_y\).
  4. Compute \(N_x\).
  5. Verify that \(M_y=N_x\).
  6. Integrate \(M\) with respect to \(x\), or \(N\) with respect to \(y\).
  7. Add the missing function of the other variable.
  8. Differentiate the reconstructed expression in the other variable.
  9. Compare with the remaining coefficient.
  10. Determine the missing function.
  11. Write the implicit solution \(F(x,y)=C\).
  12. Apply any initial condition.
  13. Differentiate to verify the result.

Example: Full Workflow

Solve

\[ (4x^3+2y)\,dx+(2x+6y^2)\,dy=0. \]

Identify

\[ M=4x^3+2y \]

and

\[ N=2x+6y^2. \]

Test:

\[ M_y=2, \qquad N_x=2. \]

The equation is exact.

Complete the Full Workflow

Integrate \(M\) with respect to \(x\):

\[ F = \int(4x^3+2y)\,dx. \]

Thus,

\[ F=x^4+2xy+g(y). \]

Differentiate with respect to \(y\):

\[ F_y=2x+g'(y). \]

Compare with

\[ N=2x+6y^2. \]

Therefore,

\[ g'(y)=6y^2. \]

Integrate:

\[ g(y)=2y^3. \]

The solution is

\[ \boxed{x^4+2xy+2y^3=C}. \]

Example with an Initial Condition

Continue with

\[ x^4+2xy+2y^3=C \]

and suppose

\[ y(1)=1. \]

Substitute:

\[ C=1^4+2(1)(1)+2(1)^3. \]

Therefore,

\[ C=5. \]

The particular solution is

\[ \boxed{x^4+2xy+2y^3=5}. \]

Practice 1: Test for Exactness

Determine whether

\[ (2x+3y)\,dx+(3x+4y)\,dy=0 \]

is exact.

Practice 2: Test for Exactness

Determine whether

\[ (x+y)\,dx+x^2\,dy=0 \]

is exact.

Practice 3: Solve an Exact Equation

Solve

\[ (2x+y)\,dx+(x+2y)\,dy=0. \]

Practice 4: Polynomial Exact Equation

Solve

\[ (3x^2+2y)\,dx+(2x+4y^3)\,dy=0. \]

Practice 5: Initial Condition

Solve

\[ (2x+y)\,dx+(x+2y)\,dy=0, \qquad y(0)=2. \]

Practice 6: Convert from \(dy/dx\) Form

Rewrite

\[ \frac{dy}{dx} = -\frac{2x+y}{x+2y} \]

in differential form and solve.

Practice 7: Find the Missing Function

Suppose

\[ F_x=4x^3+3y. \]

After integrating with respect to \(x\), write the most general form of \(F(x,y)\).

Practice 8: Verify a Potential Function

Show that

\[ F(x,y)=x^2+xy+y^2 \]

generates the exact differential equation

\[ (2x+y)\,dx+(x+2y)\,dy=0. \]

Practice 9: Identify the Error

A student solves

\[ (3x^2+2y)\,dx+(2x+4y^3)\,dy=0 \]

by integrating \(M\) and writing

\[ F=x^3+2xy. \]

Explain what is missing.

Practice 10: Interpret the Solution Geometrically

If an exact equation has solution

\[ F(x,y)=C, \]

what geometric objects do these equations describe?

Practice Answers

Practice 1

Let

\[ M=2x+3y, \qquad N=3x+4y. \]

Then

\[ M_y=3 \]

and

\[ N_x=3. \]

Therefore,

\[ \boxed{\text{the equation is exact}}. \]

Practice 2

Here,

\[ M=x+y, \qquad N=x^2. \]

Then

\[ M_y=1 \]

and

\[ N_x=2x. \]

Therefore,

\[ \boxed{\text{the equation is not exact}}. \]

Practice 3

We have

\[ M=2x+y, \qquad N=x+2y. \]

Since

\[ M_y=1=N_x, \]

the equation is exact.

Integrate \(M\):

\[ F=x^2+xy+g(y). \]

Then

\[ F_y=x+g'(y)=x+2y, \]

so

\[ g'(y)=2y. \]

Hence

\[ g(y)=y^2. \]

Therefore,

\[ \boxed{x^2+xy+y^2=C}. \]

Practice 4

Here,

\[ M=3x^2+2y, \qquad N=2x+4y^3. \]

Since

\[ M_y=2=N_x, \]

the equation is exact.

Integrate:

\[ F=x^3+2xy+g(y). \]

Then

\[ F_y=2x+g'(y)=2x+4y^3. \]

Thus,

\[ g'(y)=4y^3 \]

and

\[ g(y)=y^4. \]

Therefore,

\[ \boxed{x^3+2xy+y^4=C}. \]

Practice 5

From Practice 3,

\[ x^2+xy+y^2=C. \]

Apply

\[ y(0)=2. \]

Then

\[ C=0+0+4=4. \]

Therefore,

\[ \boxed{x^2+xy+y^2=4}. \]

Practice 6

Rewrite:

\[ (2x+y)\,dx+(x+2y)\,dy=0. \]

This is the equation from Practice 3, so

\[ \boxed{x^2+xy+y^2=C}. \]

Practice 7

Integrate with respect to \(x\):

\[ F = \int(4x^3+3y)\,dx. \]

Therefore,

\[ \boxed{F=x^4+3xy+g(y)}. \]

Practice 8

Compute the partial derivatives:

\[ F_x=2x+y \]

and

\[ F_y=x+2y. \]

Therefore,

\[ dF=(2x+y)\,dx+(x+2y)\,dy. \]

Hence

\[ dF=0 \]

gives exactly

\[ \boxed{(2x+y)\,dx+(x+2y)\,dy=0}. \]

Practice 9

Integrating \(M\) with respect to \(x\) should produce

\[ F=x^3+2xy+g(y). \]

The student omitted the unknown function \(g(y)\).

Comparing with \(N\) gives

\[ g'(y)=4y^3, \]

so

\[ g(y)=y^4. \]

The complete solution is

\[ \boxed{x^3+2xy+y^4=C}. \]

Practice 10

The equations

\[ F(x,y)=C \]

describe

\[ \boxed{\text{level curves of }F}. \]

Each solution curve lies along a set where the potential function remains constant.

What to Remember

An exact first-order differential equation has the form

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

and comes from the total differential of a potential function

\[ F(x,y). \]

The key test is

\[ \boxed{M_y=N_x}. \]

When the equation is exact:

The central structural idea is

\[ \boxed{ M\,dx+N\,dy=dF }. \]

Solving an exact equation means recovering the hidden potential function whose level curves form the solution family.

Where We Go Next

Exact equations emphasize structure: a differential equation can sometimes be understood as the differential of a hidden scalar function.

The next lesson, Growth and Decay, shifts the focus to one of the most important applied first-order models:

\[ \frac{dQ}{dt}=kQ. \]

We will study exponential growth, exponential decay, half-life, doubling time, continuous compounding, parameter interpretation, and model fitting.