Exact & Linear Differential Equations

When separation of variables fails, we look for other structures. Two powerful methods are checking for exactness and transforming the equation into a linear form.

Exact Differential Equation

A differential equation of the form M(x,y)dx+N(x,y)dy=0M(x,y)dx + N(x,y)dy = 0 is exact if the mixed partial derivatives are equal:
My=Nx\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}

Exact Equation Solution Visualizer

Potential Function:

$F(x,y) = x^2 y - x^3 - y^2 = C$

Adjust the constant $C$ to see different level curves (solutions) of the exact equation $(2xy - 3x^2)dx + (x^2 - 2y)dy = 0$.

C = 0.0

Method for Exact DEs

If exact, there exists a potential function F(x,y)=CF(x,y) = C such that:
Fx=MandFy=N\frac{\partial F}{\partial x} = M \quad \text{and} \quad \frac{\partial F}{\partial y} = NSteps to Solve:
  1. Integrate MM with respect to xx (treating yy as constant):
    F(x,y)=Mdx+g(y)F(x,y) = \int M \, dx + g(y)
  2. Differentiate this result with respect to yy and set it equal to NN:
    y(Mdx+g(y))=N\frac{\partial}{\partial y} \left( \int M \, dx + g(y) \right) = N
  3. Solve for g(y)g'(y) and integrate to find g(y)g(y).
  4. The general solution is F(x,y)=CF(x,y) = C.

Theory of Integrating Factors

An Integrating Factor (IF), denoted by μ(x,y)\mu(x,y), is a function that, when multiplied by a non-exact differential equation Mdx+Ndy=0Mdx + Ndy = 0, turns it into an exact differential equation (μM)dx+(μN)dy=0(\mu M)dx + (\mu N)dy = 0.
This means the new equation must satisfy the exactness condition:
y(μM)=x(μN)\frac{\partial}{\partial y}(\mu M) = \frac{\partial}{\partial x}(\mu N)

Integrating Factors for Non-Exact DEs

If an equation is not exact (MyNx\frac{\partial M}{\partial y} \neq \frac{\partial N}{\partial x}), we can sometimes find an Integrating Factor (IF) that depends only on one variable, either μ(x)\mu(x) or μ(y)\mu(y). We check this by taking the difference of the partials and dividing by MM or NN.
  • Case 1: IF depends only on xx
    Check the quantity: MyNxN\frac{\frac{\partial M}{\partial y} - \frac{\partial N}{\partial x}}{N}. If this expression simplifies to a function f(x)f(x) dependent only on xx (no yy terms), then the integrating factor is μ(x)=ef(x)dx\mu(x) = e^{\int f(x)dx}.
  • Case 2: IF depends only on yy
    Check the quantity: NxMyM\frac{\frac{\partial N}{\partial x} - \frac{\partial M}{\partial y}}{M}. If this expression simplifies to a function g(y)g(y) dependent only on yy (no xx terms), then the integrating factor is μ(y)=eg(y)dy\mu(y) = e^{\int g(y)dy}.
Multiplying the original DE by the corresponding μ\mu will make it exact. You can then solve using the exact equation procedure.

Integrating Factor Visualizer

Integrating Factor Process

Follow the steps to see how \mu(x) transforms the equation.

The Problem: Non-Exact Equation

Consider the differential equation:

(3xy + y^2)dx + (x^2 + xy)dy = 0
M(x,y)
3xy + y^2
Partial w.r.t. y
\frac{\partial M}{\partial y} = 3x + 2y
\neq
N(x,y)
x^2 + xy
Partial w.r.t. x
\frac{\partial N}{\partial x} = 2x + y

Not Exact! The cross derivatives don't match.

Linear First-Order Differential Equations

A first-order DE is linear if the dependent variable yy and its derivative yy' appear to the first power.

Standard Linear Form

dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)y = Q(x)

Method of Integrating Factors (Linear)

To solve a linear DE:
  1. Calculate IF: Ensure the equation is in the standard form. Find the integrating factor μ(x)=eP(x)dx\mu(x) = e^{\int P(x)dx}.
  2. Multiply: Multiply the entire DE by μ(x)\mu(x). The left side automatically becomes the derivative of a product:
    ddx[μ(x)y]=μ(x)Q(x)\frac{d}{dx}[\mu(x)y] = \mu(x)Q(x)
  3. Integrate: Integrate both sides with respect to xx:
    μ(x)y=μ(x)Q(x)dx+C\mu(x)y = \int \mu(x)Q(x) \, dx + C
  4. Solve for y: Divide by μ(x)\mu(x) to obtain the explicit general solution.

Bernoulli's Equation

A Bernoulli Equation is a specific type of non-linear DE that can be systematically reduced to a linear one using a standard substitution.

Bernoulli Equation Form

dydx+P(x)y=Q(x)yn\frac{dy}{dx} + P(x)y = Q(x)y^n
where nn is any real number and n0,1n \neq 0, 1. (If n=0n=0 or n=1n=1, the equation is already linear).

Bernoulli Substitution Method

  1. Standardize: Write the equation in the Bernoulli form y+P(x)y=Q(x)yny' + P(x)y = Q(x)y^n.
  2. Divide: Divide the entire equation by yny^n to get: yny+P(x)y1n=Q(x)y^{-n}y' + P(x)y^{1-n} = Q(x).
  3. Substitute: Introduce a new variable v=y1nv = y^{1-n}.
  4. Differentiate: Differentiate vv with respect to xx: v=(1n)ynyv' = (1-n)y^{-n}y'. Note that this is proportional to the first term in step 2.
  5. Transform: Substitute vv and vv' into the equation from step 2. You will obtain a standard linear DE in terms of vv and xx: 11nv+P(x)v=Q(x)\frac{1}{1-n}v' + P(x)v = Q(x).
  6. Solve for v: Multiply by (1n)(1-n) and solve this new linear equation using the Integrating Factor method.
  7. Back-substitute: Replace vv with y1ny^{1-n} to find the solution in terms of yy.
Key Takeaways
  • Exact Equations rely on partial derivatives; verify My=Nx\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}. The solution is a potential surface F(x,y)=CF(x,y)=C.
  • Integrating Factors (Non-Exact) can convert certain non-exact equations into exact ones by multiplying by μ(x)\mu(x) or μ(y)\mu(y).
  • Linear Equations follow the standard form y+P(x)y=Q(x)y' + P(x)y = Q(x) and are solved using an Integrating Factor μ(x)=eP(x)dx\mu(x) = e^{\int P(x)dx}.
  • Bernoulli Equations are non-linear (y+P(x)y=Q(x)yny' + P(x)y = Q(x)y^n) but can be transformed into linear ones via the substitution v=y1nv = y^{1-n}.
  • Always try to identify if an equation is Exact or Linear first, as these have reliable algorithmic solutions.