JustToThePoint English Website Version
JustToThePoint en español

Exact Differential Equations and Integrating Factors

All those who seem stupid, they are, and also so are half of those who do not, Quevedo

I will be dust, but dust in love, Quevedo

Exact differential equation

Recall. Algebraic and differential equations.

An algebraic equation is a mathematical statement asserting that two algebraic expressions are equal.. These expressions are constructed using:

  1. Dependent and independent variables. Variables are symbols representing unknown quantities. Variables can be:
    Independent Variables: Variables or input that can be chosen (or change) freely.
    Dependent Variables: Variables that depend on the independent variables.
  2. Constants. Fixed numerical values that do not change, e.g., 2, π, 7.
  3. Algebraic operations. Operations such as addition, subtraction, multiplication, division, exponentiation, powers, and root.

An algebraic equation typically has the following general form: Expression1 = Expression2, where the two expressions are set equal to each other.

Examples: y = 2x + 4 (simple linear equation, represents a straight line with a slope of 2 and a y-intercept of 4), ax2 + bx + c = 0 (quadratic equation, it represents a parabola), $ln(xy + t) = z·sin(\sqrt{x})$.

Definition. A differential equation is an equation that involves one or more functions and their derivatives. It relates the function itself (the dependent variable), its derivatives with respect to one or more independent variables (rates of change), and the independent variable(s) themselves, e.g., $\frac{dy}{dx} = 3x +5y, y' + y = 4xcos(2x), \frac{dy}{dx} = x^2y+y, etc.$

If an algebraic equation is a “snapshot” of a relationship, a differential equation is the “instruction manual” for how that relationship moves and changes.

Key Components (e.g., $\frac{dy}{dx} = 3x +5y$):

Exact differential equation

An exact differential equation is a type of first-order differential equation that can be written in the form: M(x, y) + N(x, y)y' = 0. Or equivalently, using differentials: $M(x, y) + N(x, y)\frac{dy}{dx} = 0$ or $M(x, y) \, dx + N(x, y) \, dy = 0$ where M(x, y) and N(x, y) are functions of x and y, and y’ = $\frac{dy}{dx}$ represents the derivative of y with respect to x.

This equation is called exact if there exists a function F(x,y), called the potential function, such that:

  1. $\frac{\partial F}{\partial x} = F_x = M(x, y)$
  2. $\frac{\partial F}{\partial y} = F_y = N(x, y)$

In other words, F(x, y) is a function whose total differential matches the expression in the differential equation. Specifically, the total differential of F is defined as $dF = \frac{\partial F}{\partial x}dx + \frac{\partial F}{\partial y}dy = F_xdx + F_ydy$.

If the equation is exact, then $dF = M \, dx + N \, dy = 0$. The solution to the differential equation is then implicitly given by F(x, y) = C, where C is an arbitrary constant.

The Test for Exactness

To confirm that a differential equation $M \, dx + N \, dy = 0$ is exact, we check the condition: $\boxed{\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}}$. If this condition is satisfied, then the equation is indeed exact, and there exists a potential function F(x, y) such that Fx = M and Fy = N.

Definition. We say a differential equation is exact if it can be written as M(x, y) + N(x, y)y' = 0, and if it satisfies $\frac{∂N}{∂x}=\frac{∂M}{∂y}$. Then, a solution y(x) is then implicitly described by F(x, y) = C where $\frac{∂F}{∂x}=M(x,y), \frac{∂F}{∂y} = N(x, y).$

Exact differential equation

Examples

Rewrite it in differential form: $(2xy-9x^2)dx + (2y+x^2+1) = 0$ where M(x, y) = $2xy-9x^2$ and N(x, y) = $2y+x^2+1$.

  1. Verify Exactness
    To verify if the differential equation is exact, we need to check whether: $\frac{∂}{∂x}(2y+x^2+1) = 2x = \frac{∂}{∂y}(2xy-9x^2)$. Since $\frac{∂N}{∂x} = 2x = \frac{∂M}{∂y}$, the equation is indeed exact.
    We aim to find a function F(x, y) such that: Fx = M(x, y) = 2xy -9x2 and Fy = N(x, y) = 2y+x2 +1.
  2. Integrate M with respect to x: Fx = 2xy -9x2 $\implies F = \int (2xy -9x^2)dx = x^2y -3x^3 + g(y)$ where g(y) is the “constant” of integration with respect to x, which may be a function of y.
  3. Differentiate F with respect to y and set it equal to N: $\frac{∂F}{∂y} = \frac{∂}{∂y}(x^2y -3x^3 + g(y))= 2y + x^2+ 1 ↭ x^2 + g'(y) = 2y + x^2+ 1 ⇒ g'(y) = 2y + 1$
  4. Find g(y) by integrating g’(y): g(y) = $\int (2y +1)dy = y^2 + y$. The constant C can be absorbed into the final constant when setting F(x, y) = C, so we can omit it here.
  5. Write the complete expression for F(x, y): F(x, y) = $x^2y -3x^3 + g(y) = x^2y -3x^3 + y^2 + y$. The implicit solution is $\boxed{F(x, y) = x^2y -3x^3 + y^2 + y = C}.$ In other words, this equation implicitly defines y as a function of x, representing the general solution to the differential equation.

Here, M(x, y) = sin(x)cos(y) and N(x,y) = cos(x)sin(y). We seek a function F(x, y) such that: Fx = sin(x)cos(y) and Fy = cos(x)sin(y).

  1. Step 1: Check for Exactness $\frac{∂}{∂x}(cos(x)sin(y)) = -sin(x)sin(y) = \frac{∂}{∂y}(sin(x)cos(y))$. This is a exact differential equation.
  2. Step 2: Integrate M with respect to x:
    Fx = sin(x)cos(y) $\implies F = \int (sin(x)cos(y))dx = -cos(x)cos(y) + g(y)$ where g(y) is a function of y alone (the “constant” of integration with respect to x).
  3. *Step 3: Differentiate F with respect to y and set it equal to N:
    $\frac{∂F}{∂y} = \frac{∂}{∂y}( -cos(x)cos(y) + g(y))= cos(x)sin(y) + g'(y) = cos(x)sin(y) ↭ g'(y) = 0$
  4. Step 4: Find g(y) by integrating g’(y): g(y) = $\int 0·dy = C$. Again, the constant C can be absorbed into the final constant when setting F(x, y) = C.
  5. Step 5: Write the complete expression for F(x, y): F(x, y) = $-cos(x)cos(y)$. The implicit solution is $F(x, y) = -cos(x)cos(y) = C_1.$ We can also write this as F(x, y) = cos(x)cos(y) = C, by absorbing the negative sign into the constant $C = -C_1$.

Transforming Non-exact Equations into Exact ODEs

When we encounter a non-exact differential equation, it is sometimes possible to transform it into an exact one by finding an appropriate integrating factor, denoted as μ(x,y). Multiplying the entire equation by μ may make it exact, allowing us to apply methods for solving exact equations.

Given a differential equation of the form: $M \, dx + N \, dy = 0$, we can attempt to find a suitable integrating factor μ such that: μMdx + μNdy = 0 is exact.

For the equation to be exact after multiplication, it must satisfy the following condition: $\frac{∂}{∂y}(μM) = \frac{∂}{∂x}(μN) ↭[\text{which expands as}] μ_yM + μM_y = μ_xN + μN_x ↭[\text{Simplifying, we get}] μ_yM -μ_xN = μ(N_x -M_y)$

Assuming μ(x, y) = f(x)·g(y), we then have μx = f’(x)g(y) and μy = f(x)g’(y), and the condition $μ_yM -μ_xN = μ(N_x -M_y)$ simplifies to: $f(x)g'(y)M -f'(x)g(y)N = f(x)g(x)(N_x -M_y)$ ⇒[Let’s divide both terms by 1⁄μ] $\boxed{\frac{g'(y)}{g(y)}M -\frac{f'(x)}{f(x)}N = N_x -M_y}$

Because finding a general function $\mu(x,y)$ is difficult, we usually test three simplified cases:

Case 1, 2: Integrating Factors in Terms of x or y Alone

If μ = μ(x), i.e., f(x) = μ(x), g(y) = 1 ⇒ g’(y) = 0.

Using these new restrictions, we get: $-\frac{f'(x)}{f(x)}N = N_x -M_y ↭ \frac{μ'}{μ} = \frac{M_y-N_x}{N}$. By assumption μ = μ(x), so the left hand side of the equation is a function of x, then the right hand side of the equation, $\frac{M_y-N_x}{N}$, is also a function of x.

Let’s integrate: $\int \frac{μ'}{μ}dx = \int \frac{M_y-N_x}{N}dx ↭ ln(μ) = \int \frac{M_y-N_x}{N}dx ↭ μ = e^{\int \frac{M_y-N_x}{N}dx}$

The differential equation M + Ny' = 0 ↭ Mdx + Ndy = 0 can be transformed to an exact differential equation μM + μNy' = 0.

  1. If $\frac{M_y-N_x}{N}$ is a function of x alone, then we let $\boxed{\mu = \mu(x) = e^{\int \frac{M_y - N_x}{N} \, dx}}$.
  2. If $\frac{N_x-M_y}{M}$ is a function of y alone, then we let $\boxed{\mu = \mu(y) = e^{\int \frac{N_x - M_y}{M} \, dy}}$
  3. If $\frac{N_x-M_y}{xM-yN}$ is a function of xy (meaning it can be written solely in terms of xy), then we let μ = μ(xy) = $e^{\int \frac{N_x-M_y}{xM-yN}(t)dt}$

Case 3. Integrating Factor in terms of the product xy, μ = μ(xy)

Using the chain rule: $\frac{∂}{∂x}μ = μ'(xy)\frac{∂}{∂x}(xy) = μ'y, \frac{∂}{∂y}μ = μ'(xy)\frac{∂}{∂y}(xy) = μ'x$

Mdx + Ndy = 0 is exact ↭ $\frac{∂}{∂x}(μN) = \frac{∂}{∂y}(μM) ↭ μ'yN + μN_x = μ'xM + μM_y ↭ μ(N_x-M_y) = μ'(xM -yN) ↭ \frac{μ'}{μ} = \frac{N_x-M_y}{xM -yN}$
$\implies \int \frac{μ'}{μ}(t)dt = \int \frac{N_x-M_y}{xM -yN}(t)dt ⇒ ln(μ(t)) = \int \frac{N_x-M_y}{xM -yN}(t)dt + C ⇒ μ(t) = e^Ce^{\int \frac{N_x-M_y}{xM -yN}(t)dt}$. Since eC is an arbitrary constant, we can absorb it into μ(t). $\boxed{\mu(t) = e^{\int \frac{N_x-M_y}{xM -yN}(t)dt}}$.

Rewrite this equation as: $(3xy + y^2)dx + (x^2+xy)dy = 0$ where M = $3xy + y^2$ and N = $x^2+xy$

Step 1: Check for Exactness. Check if My = Nx: $M_y = 3x + 2y ≠ N_x = 2x + y$. We don’t have an exact equation 🤔, but it’s still possible that we can transform it to an exact differential equation.

Step 3: Find an Integrating Factor: Compute $\frac{M_y-N_x}{N} = \frac{3x + 2y -(2x + y)}{x^2+xy} = \frac{x + y}{x(x +y)} = \frac{1}{x}$ which depends only on x.

This suggests using an integrating factor $μ = μ(x) = e^{\int \frac{M_y-N_x}{N}dx} = e^{\int \frac{1}{x}dx} = e^{ln|x| + C} = e^C·|x|$ =[Let $k = \pm e^C$, a constant] kx = [Since integrating factors are determined up to a multiplicative constant, we can set k = 1 without loss of generality] x.

Step 3: Multiply by the Integrating Factor μ(x) and simplify.

$μM(x, y)dx + μN(x, y)dy = 0 ↭ x(3xy + y^2)dx + x(x^2+xy)dy = 0 ↭ (3x^2y + xy^2)dx + (x^3 + x^2y)dy = 0$

Step 4: Verify Exactness of the Transformed Equation: $\frac{∂}{∂y}(3x^2y + xy^2) = 3x^2 + 2yx = \frac{∂}{∂x}(x^3 + x^2y)$. It is now exact!

Step 5. Solve the Exact Differential Equation

  1. Integrate M with respect to x, $\frac{∂F}{∂x} = F_x = 3x^2y + xy^2, F = \int (3x^2y + xy^2)dx = x^3y + \frac{1}{2}x^2y^2 + g(y)$
  2. Differentiate F with respect to y and set it equal to N: $\frac{∂F}{∂y} = F_y = \frac{∂}{∂y}( x^3y + \frac{1}{2}x^2y^2 + g(y))= x^3 + x^2y + g'(y) = x^3 + x^2y ⇒ g'(y) = 0. $
  3. Find g(y) by integrating g’(y): g(y) = $\int 0dy = C$. The constant C can be absorbed into the final constant when setting F(x, y) = C.
  4. Write the complete expression for F(x, y): F(x, y) = $x^3y + \frac{1}{2}x^2y^2$. The implicit solution is $x^3y + \frac{1}{2}x^2y^2 = C$.

Step 1: Check for Exactness

With M = 5xy +2x +5 and N = 2x, compute: My and Nx: $M_y = 5x ≠ N_x = 2$. Since My ≠ Nx, the equation is not exact. However, we can look for an integrating factor to transform it into an exact differential equation.

Step 2. Find an Integrating Factor:

We check if the expression $\frac{M_y-N_x}{N} = \frac{5x -2}{2x} = \frac{5}{2} - \frac{1}{x}$ results in a function that depends solely on x.

Because this expression depends only on x, we can find our integrating factor, $\mu(x)$, using the formula $μ = μ(x) = e^{\int \frac{M_y-N_x}{N}dx} = e^{\int \frac{5}{2} - \frac{1}{x}dx} = e^{\frac{5}{2}x -ln(x) + C} = e^{\frac{5}{2}x +ln(\frac{1}{x}) + C} =[\text{Using exponent rules, we can separate the terms}] e^{ln(\frac{1}{x})}e^{\frac{5}{2}x}e^C$ =[let the arbitrary constant k = eC] $k\frac{1}{x}e^{\frac{5}{2}x}$.

$e^{-ln(x)} = e^{ln(x^{-1})} = x^{-1} = \frac{1}{x}$

Since integrating factors are determined up to a multiplicative constant, we can set k = 1 without loss of generality, and our integrating factor is $\frac{1}{x}e^{\frac{5}{2}x}$.

(Note: We assume x > 0 here to simplify the natural logarithm, which is standard practice for this type of problem).

Step 3. Multiply our differential equation by the integrating factor μ(x) and simplify.

$(5ye^{\frac{5}{2}x} +2e^{\frac{5}{2}x} + \frac{5}{x}e^{\frac{5}{2}x})dx + 2e^{\frac{5}{2}x}dy = 0$

Let’s verify it is now exact.

New $M = 5ye^{\frac{5}{2}x} + 2e^{\frac{5}{2}x} + \frac{5}{x}e^{\frac{5}{2}x} \implies M_y = 5e^{\frac{5}{2}x}$

New $N = 2e^{\frac{5}{2}x} \implies N_x = 2 \left( \frac{5}{2} e^{\frac{5}{2}x} \right) = 5e^{\frac{5}{2}x}$

Since $M_y = N_x$, the equation is successfully exact!

Step 4. Solve the Exact Differential Equation.
Because the equation is exact, there exists a potential function $F(x,y) = C$ such that $F_x = M$ and $F_y = N$.

  1. Integrate N with respect to y, $\frac{∂F}{∂y} = F_y = 2e^{\frac{5}{2}x}, F = \int (2e^{\frac{5}{2}x})dy = 2ye^{\frac{5}{2}x} + g(x)$
  2. Differentiate F with respect to x and set it equal to M: $\frac{∂F}{∂x} = F_x = \frac{∂}{∂x}( 2ye^{\frac{5}{2}x} + g(x))= 5ye^{\frac{5}{2}x} + g'(x) = 5ye^{\frac{5}{2}x} +2e^{\frac{5}{2}x} + \frac{5}{x}e^{\frac{5}{2}x} ⇒ g'(x) = +2e^{\frac{5}{2}x} + \frac{5}{x}e^{\frac{5}{2}x}. $
  3. Find g(x) by integrating g’(x): g(x) = $\int (2e^{\frac{5}{2}x} + \frac{5}{x}e^{\frac{5}{2}x})dx = \frac{4}{5}e^{\frac{5}{2}x} + 5\int \frac{e^{\frac{5x}{2}}}{x}dx + C$. The constant C can be absorbed into the final constant when setting F(x, y) = C, and the integral $5\int \frac{e^{\frac{5x}{2}}}{x}dx$ does not have an elementary antiderivative, so we leave it in its integral form.
  4. Write the complete expression for F(x, y): F(x, y) = $2ye^{\frac{5}{2}x} + \frac{4}{5}e^{\frac{5}{2}x} + 5\int \frac{e^{\frac{5x}{2}}}{x}dx$. Setting F(x, y) = C, the implicit solution is $\boxed{F(x, y) = 2ye^{\frac{5}{2}x} + \frac{4}{5}e^{\frac{5}{2}x} + 5\int \frac{e^{\frac{5x}{2}}}{x}dx = C}$.

    This equation implicitly defines y as a function of x. The integral $\int \frac{e^{\frac{5x}{2}}}{x}dx$ does not have an elementary antiderivative and must remain as is or you can express it in terms of the Exponential Integral function: $\int \frac{e^{\frac{5x}{2}}}{x}dx = Ei(\frac{5}{2}x)+C'$.

Bibliography

This content is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
  1. NPTEL-NOC IITM, Introduction to Galois Theory.
  2. Algebra, Second Edition, by Michael Artin.
  3. LibreTexts, Calculus. Abstract and Geometric Algebra, Abstract Algebra: Theory and Applications (Judson).
  4. Field and Galois Theory, by Patrick Morandi. Springer.
  5. Michael Penn, and MathMajor.
  6. Contemporary Abstract Algebra, Joseph, A. Gallian.
  7. YouTube’s Andrew Misseldine: Calculus. College Algebra and Abstract Algebra.
  8. MIT OpenCourseWare, 18.01 Single Variable Calculus, Fall 2007M. 18.02 Multivariable Calculus, Fall 2007. 18.03 Differential Equations, Spring 2006.
  9. Calculus Early Transcendentals: Differential & Multi-Variable Calculus for Social Sciences.
Bitcoin donation

JustToThePoint Copyright © 2011 - 2026 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun. Social Issues, Join us.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.