Exact & Linear Differential Equations

Learning Objectives

  • Identify and solve exact differential equations.
  • Apply integrating factors to solve non-exact and linear differential equations.
  • Transform and solve Bernoulli's 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:

∂M∂y=∂N∂x\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}

Method for Exact DEs

If exact, there exists a potential function F(x,y)=CF(x,y) = C such that:

∂F∂x=Mand∂F∂y=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)=∫M dx+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(∫M dx+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.
Recovering the Exact Potential

Exactness makes M dx + N dy a differential of one potential function; this diagram shows how its missing y-only term is recovered.

Check Mᵧ = Nₓ
Integrate M with respect to x: F = ∫M dx + g(y)
Use Fᵧ = N to determine g(y)
Set F(x,y) = C and verify by differentiation

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 (∂M∂y≠∂N∂x\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: ∂M∂y−∂N∂xN\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)=e∫f(x)dx\mu(x) = e^{\int f(x)dx}.
  • Case 2: IF depends only on yy Check the quantity: ∂N∂x−∂M∂yM\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)=e∫g(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

Interactive Simulation

Interact with the simulation below to explore integrating factors for exact and linear equations.

Linear DE

y′+2xy=4xy' + \frac{2}{x}y = 4x

Find an integrating factor μ(x)=xk\mu(x) = x^k to make it exact.

Select power kk

0.0

✗ Not Exact

μ(x)=x0\mu(x) = x^{0}
ddxμ(x)\frac{d}{dx}\mu(x)
P(x)μ(x)P(x)\mu(x)

To be exact, we need dμdx=P(x)μ(x)\frac{d\mu}{dx} = P(x)\mu(x). Match the blue curve to the dashed red curve.

Linear First-Order Differential Equations

A first-order DE is linear if the dependent variable yy and its derivative y′y' 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)=e∫P(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.
Why the Linear Integrating Factor Works

The integrating factor is selected so the left side becomes the derivative of a product, making the equation directly integrable.

Standard form: y′ + P(x)y = Q(x)
Choose μ(x) = exp ∫P(x) dx, so μ′ = Pμ
Product rule: (μy)′ = μQ
Integrate, then divide by μ on the interval

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 n≠0,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. Check the domain: The substitution requires y≠0y \neq 0 and a domain where the real power y1−ny^{1-n} is defined. Check separately whether y=0y=0 solves the original equation so division does not discard a solution.
  3. Divide: On a valid nonzero interval, divide by yny^n to get y−ny′+P(x)y1−n=Q(x)y^{-n}y' + P(x)y^{1-n} = Q(x).
  4. Substitute: Introduce v=y1−nv = y^{1-n}.
  5. Differentiate: v′=(1−n)y−ny′v' = (1-n)y^{-n}y', so y−ny′=v′/(1−n)y^{-n}y' = v'/(1-n).
  6. Transform: Substitute to obtain the linear equation v′+(1−n)P(x)v=(1−n)Q(x)v' + (1-n)P(x)v = (1-n)Q(x).
  7. Solve and back-substitute: Solve this linear equation on the valid interval, replace vv with y1−ny^{1-n}, and check any excluded y=0y=0 solution in the original equation.
Bernoulli Substitution Converts the Equation to Linear Form

The substitution replaces the nonlinear power of y with a new dependent variable; the transformation is valid only on a domain where division and the real power are defined.

y′ + Py = Qyⁿ, n ≠ 0, 1
On y ≠ 0: divide by yⁿ
Set v = y^(1−n), so v′ = (1−n)y^(−n)y′
Solve v′ + (1−n)Pv = (1−n)Q
Back-substitute and test excluded solutions

Method Selection Across Exact, Linear, and Bernoulli Forms

First-Order Exact, Linear, and Bernoulli Method Selection

Classify a first-order equation before applying an exact-equation, one-variable integrating-factor, linear integrating-factor, or Bernoulli method.

Work on an interval where the equation and every division or substitution used are defined. For M dx + N dy = 0, the x-only test is (M_y − N_x)/N and the y-only test is (N_x − M_y)/M; use each quotient only where its denominator is nonzero. For a Bernoulli equation, v = y^(1−n) is used on a domain where that real power is defined and y is nonzero. Check excluded zero solutions separately when the original equation permits them. Verify the resulting implicit or explicit solution in the original equation and state its valid interval.

First-Order Exact, Linear, and Bernoulli Method SelectionClassify a first-order equation before applying an exact-equation, one-variable integrating-factor, linear integrating-factor, or Bernoulli method.. Work on an interval where the equation and every division or substitution used are defined. For M dx + N dy = 0, the x-only test is (M_y − N_x)/N and the y-only test is (N_x − M_y)/M; use each quotient only where its denominator is nonzero. For a Bernoulli equation, v = y^(1−n) is used on a domain where that real power is defined and y is nonzero. Check excluded zero solutions separately when the original equation permits them. Verify the resulting implicit or explicit solution in the original equation and state its valid interval.. Start → Write the equation and valid interval; Write the equation and valid interval → Mᵧ = Nₓ?; Mᵧ = Nₓ? — Yes → Recover F(x,y) = C; Mᵧ = Nₓ? — No → (Mᵧ − Nₓ)/N is x-only?; Recover F(x,y) = C → Substitute into the original equation; (Mᵧ − Nₓ)/N is x-only? — Yes → Use μ(x) = exp ∫[(Mᵧ − Nₓ)/N] dx; (Mᵧ − Nₓ)/N is x-only? — No → (Nₓ − Mᵧ)/M is y-only?; Use μ(x) = exp ∫[(Mᵧ − Nₓ)/N] dx → Substitute into the original equation; (Nₓ − Mᵧ)/M is y-only? — Yes → Use μ(y) = exp ∫[(Nₓ − Mᵧ)/M] dy; (Nₓ − Mᵧ)/M is y-only? — No → Can write y′ + P(x)y = Q(x)?; Use μ(y) = exp ∫[(Nₓ − Mᵧ)/M] dy → Substitute into the original equation; Can write y′ + P(x)y = Q(x)? — Yes → Use μ(x) = exp ∫P(x) dx; Can write y′ + P(x)y = Q(x)? — No → Bernoulli form with n ≠ 0, 1?; Use μ(x) = exp ∫P(x) dx → Substitute into the original equation; Bernoulli form with n ≠ 0, 1? — Yes → Is v = y^(1−n) real with y ≠ 0?; Bernoulli form with n ≠ 0, 1? — No → Use another applicable first-order method; Is v = y^(1−n) real with y ≠ 0? — Yes → Check y = 0 separately and set the valid interval; Is v = y^(1−n) real with y ≠ 0? — No → Use another applicable first-order method; Check y = 0 separately and set the valid interval → Transform to a linear equation in v; Transform to a linear equation in v → Substitute into the original equation; Use another applicable first-order method → End chart and use selected method; Substitute into the original equation → Solution and domain check pass?; Solution and domain check pass? — Yes → Record solution and interval; Solution and domain check pass? — No → Recheck algebra, domain, and method conditions; Recheck algebra, domain, and method conditions → Write the equation and valid interval

Start → Write the equation and valid interval; Write the equation and valid interval → Mᵧ = Nₓ?; Mᵧ = Nₓ? — Yes → Recover F(x,y) = C; Mᵧ = Nₓ? — No → (Mᵧ − Nₓ)/N is x-only?; Recover F(x,y) = C → Substitute into the original equation; (Mᵧ − Nₓ)/N is x-only? — Yes → Use μ(x) = exp ∫[(Mᵧ − Nₓ)/N] dx; (Mᵧ − Nₓ)/N is x-only? — No → (Nₓ − Mᵧ)/M is y-only?; Use μ(x) = exp ∫[(Mᵧ − Nₓ)/N] dx → Substitute into the original equation; (Nₓ − Mᵧ)/M is y-only? — Yes → Use μ(y) = exp ∫[(Nₓ − Mᵧ)/M] dy; (Nₓ − Mᵧ)/M is y-only? — No → Can write y′ + P(x)y = Q(x)?; Use μ(y) = exp ∫[(Nₓ − Mᵧ)/M] dy → Substitute into the original equation; Can write y′ + P(x)y = Q(x)? — Yes → Use μ(x) = exp ∫P(x) dx; Can write y′ + P(x)y = Q(x)? — No → Bernoulli form with n ≠ 0, 1?; Use μ(x) = exp ∫P(x) dx → Substitute into the original equation; Bernoulli form with n ≠ 0, 1? — Yes → Is v = y^(1−n) real with y ≠ 0?; Bernoulli form with n ≠ 0, 1? — No → Use another applicable first-order method; Is v = y^(1−n) real with y ≠ 0? — Yes → Check y = 0 separately and set the valid interval; Is v = y^(1−n) real with y ≠ 0? — No → Use another applicable first-order method; Check y = 0 separately and set the valid interval → Transform to a linear equation in v; Transform to a linear equation in v → Substitute into the original equation; Use another applicable first-order method → End chart and use selected method; Substitute into the original equation → Solution and domain check pass?; Solution and domain check pass? — Yes → Record solution and interval; Solution and domain check pass? — No → Recheck algebra, domain, and method conditions; Recheck algebra, domain, and method conditions → Write the equation and valid interval

  • Start: terminator
  • Write the equation and valid interval: process
  • Mᵧ = Nₓ?: decision
  • Recover F(x,y) = C: process
  • (Mᵧ − Nₓ)/N is x-only?: decision
  • Use μ(x) = exp ∫[(Mᵧ − Nₓ)/N] dx: process
  • (Nₓ − Mᵧ)/M is y-only?: decision
  • Use μ(y) = exp ∫[(Nₓ − Mᵧ)/M] dy: process
  • Can write y′ + P(x)y = Q(x)?: decision
  • Use μ(x) = exp ∫P(x) dx: process
  • Bernoulli form with n ≠ 0, 1?: decision
  • Is v = y^(1−n) real with y ≠ 0?: decision
  • Check y = 0 separately and set the valid interval: process
  • Transform to a linear equation in v: process
  • Use another applicable first-order method: process
  • End chart and use selected method: terminator
  • Substitute into the original equation: process
  • Solution and domain check pass?: decision
  • Recheck algebra, domain, and method conditions: process
  • Record solution and interval: terminator
Key Takeaways
  • Exact Equations rely on partial derivatives; verify ∂M∂y=∂N∂x\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)=e∫P(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=y1−nv = y^{1-n}.
  • The Bernoulli substitution is used on a domain where y1−ny^{1-n} and division by yny^n are valid; check any excluded zero solution separately.
  • Always try to identify if an equation is Exact or Linear first, as these have reliable algorithmic solutions.