- Algebra
- Arithmetic
- Whole Numbers
- Numbers
- Types of Numbers
- Odd and Even Numbers
- Prime & Composite Numbers
- Sieve of Eratosthenes
- Number Properties
- Commutative Property
- Associative Property
- Identity Property
- Distributive Property
- Order of Operations
- Rounding Numbers
- Absolute Value
- Number Sequences
- Factors & Multiples
- Prime Factorization
- Greatest Common Factor
- Least Common Multiple
- Squares & Perfect Squares
- Square Roots
- Squares & Square Roots
- Simplifying Square Roots
- Simplifying Radicals
- Radicals that have Fractions
- Multiplying Radicals

- Integers
- Fractions
- Introducing Fractions
- Converting Fractions
- Comparing Fractions
- Ordering Fractions
- Equivalent Fractions
- Reducing Fractions
- Adding Fractions
- Subtracting Fractions
- Multiplying Fractions
- Reciprocals
- Dividing Fractions
- Adding Mixed Numbers
- Subtracting Mixed Numbers
- Multiplying Mixed Numbers
- Dividing Mixed Numbers
- Complex Fractions
- Fractions to Decimals

- Decimals
- Exponents
- Percent
- Scientific Notation
- Proportions
- Equality
- Properties of equality
- Addition property of equality
- Transitive property of equality
- Subtraction property of equality
- Multiplication property of equality
- Division property of equality
- Symmetric property of equality
- Reflexive property of equality
- Substitution property of equality
- Distributive property of equality

- Commercial Math

- Calculus
- Differential Calculus
- Limits calculus
- Mean value theorem
- L’Hôpital’s rule
- Newton’s method
- Derivative calculus
- Power rule
- Sum rule
- Difference rule
- Product rule
- Quotient rule
- Chain rule
- Derivative rules
- Trigonometric derivatives
- Inverse trig derivatives
- Trigonometric substitution
- Derivative of arctan
- Derivative of secx
- Derivative of csc
- Derivative of cotx
- Exponential derivative
- Derivative of ln
- Implicit differentiation
- Critical numbers
- Derivative test
- Concavity calculus
- Related rates
- Curve sketching
- Asymptote
- Hyperbolic functions
- Absolute maximum
- Absolute minimum

- Integral Calculus
- Fundamental theorem of calculus
- Approximating integrals
- Riemann sum
- Integral properties
- Antiderivative
- Integral calculus
- Improper integrals
- Integration by parts
- Partial fractions
- Area under the curve
- Area between two curves
- Center of mass
- Work calculus
- Integrating exponential functions
- Integration of hyperbolic functions
- Integrals of inverse trig functions
- Disk method
- Washer method
- Shell method

- Sequences, Series & Tests
- Parametric Curves & Polar Coordinates
- Multivariable Calculus
- 3d coordinate system
- Vector calculus
- Vectors equation of a line
- Equation of a plane
- Intersection of line and plane
- Quadric surfaces
- Spherical coordinates
- Cylindrical coordinates
- Vector function
- Derivatives of vectors
- Length of a vector
- Partial derivatives
- Tangent plane
- Directional derivative
- Lagrange multipliers
- Double integrals
- Iterated integral
- Double integrals in polar coordinates
- Triple integral
- Change of variables in multiple integrals
- Vector fields
- Line integral
- Fundamental theorem for line integrals
- Green’s theorem
- Curl vector field
- Surface integral
- Divergence of a vector field
- Differential equations
- Exact equations
- Integrating factor
- First order linear differential equation
- Second order homogeneous differential equation
- Non homogeneous differential equation
- Homogeneous differential equation
- Characteristic equations
- Laplace transform
- Inverse laplace transform
- Dirac delta function

- Differential Calculus
- Matrices
- Pre-Calculus
- Lines & Planes
- Functions
- Domain of a function
- Transformation Of Graph
- Polynomials
- Graphs of rational functions
- Limits of a function
- Complex Numbers
- Exponential Function
- Logarithmic Function
- Sequences
- Conic Sections
- Series
- Mathematical induction
- Probability
- Advanced Trigonometry
- Vectors
- Polar coordinates

- Probability
- Geometry
- Angles
- Triangles
- Types of Triangles
- Special Right Triangles
- 3 4 5 Triangle
- 45 45 90 Triangle
- 30 60 90 Triangle
- Area of Triangle
- Pythagorean Theorem
- Pythagorean Triples
- Congruent Triangles
- Hypotenuse Leg (HL)
- Similar Triangles
- Triangle Inequality
- Triangle Sum Theorem
- Exterior Angle Theorem
- Angles of a Triangle
- Law of Sines or Sine Rule
- Law of Cosines or Cosine Rule

- Polygons
- Circles
- Circle Theorems
- Solid Geometry
- Volume of Cubes
- Volume of Rectangular Prisms
- Volume of Prisms
- Volume of Cylinders
- Volume of Spheres
- Volume of Cones
- Volume of Pyramids
- Volume of Solids
- Surface Area of a Cube
- Surface Area of a Cuboid
- Surface Area of a Prism
- Surface Area of a Cylinder
- Surface Area of a Cone
- Surface Area of a Sphere
- Surface Area of a Pyramid
- Geometric Nets
- Surface Area of Solids

- Coordinate Geometry and Graphs
- Coordinate Geometry
- Coordinate Plane
- Slope of a Line
- Equation of a Line
- Forms of Linear Equations
- Slopes of Parallel and Perpendicular Lines
- Graphing Linear Equations
- Midpoint Formula
- Distance Formula
- Graphing Inequalities
- Linear Programming
- Graphing Quadratic Functions
- Graphing Cubic Functions
- Graphing Exponential Functions
- Graphing Reciprocal Functions

- Geometric Constructions
- Geometric Construction
- Construct a Line Segment
- Construct Perpendicular Bisector
- Construct a Perpendicular Line
- Construct Parallel Lines
- Construct a 60° Angle
- Construct an Angle Bisector
- Construct a 30° Angle
- Construct a 45° Angle
- Construct a Triangle
- Construct a Parallelogram
- Construct a Square
- Construct a Rectangle
- Locus of a Moving Point

- Geometric Transformations

- Sets & Set Theory
- Statistics
- Collecting and Summarizing Data
- Common Ways to Describe Data
- Different Ways to Represent Data
- Frequency Tables
- Cumulative Frequency
- Advance Statistics
- Sample mean
- Population mean
- Sample variance
- Standard deviation
- Random variable
- Probability density function
- Binomial distribution
- Expected value
- Poisson distribution
- Normal distribution
- Bernoulli distribution
- Z-score
- Bayes theorem
- Normal probability plot
- Chi square
- Anova test
- Central limit theorem
- Sampling distribution
- Logistic equation
- Chebyshev’s theorem

- Difference
- Correlation Coefficient
- Tautology
- Relative Frequency
- Frequency Distribution
- Dot Plot
- Сonditional Statement
- Converse Statement
- Law of Syllogism
- Counterexample
- Least Squares
- Law of Detachment
- Scatter Plot
- Linear Graph
- Arithmetic Mean
- Measures of Central Tendency
- Discrete Data
- Weighted Average
- Summary Statistics
- Interquartile Range
- Categorical Data

- Trigonometry
- Vectors
- Multiplication Charts
- Time Table
- 2 times table
- 3 times table
- 4 times table
- 5 times table
- 6 times table
- 7 times table
- 8 times table
- 9 times table
- 10 times table
- 11 times table
- 12 times table
- 13 times table
- 14 times table
- 15 times table
- 16 times table
- 17 times table
- 18 times table
- 19 times table
- 20 times table
- 21 times table
- 22 times table
- 23 times table
- 24 times table

- Time Table

# Integrating Factor – Definition, Method, and Examples

The **integrating factor method **allows us to work on ordinary differential equations that are more complex than exact equations. Since there is no guarantee that the first-order differential equation that we’re dealing with is an exact equation, it’s important that we learn supplementary methods such as utilizing integrating factors.

*The integrating factor represents the factor that we multiply on both sides of the differential equation to make a non-exact DE into an exact equation. Once we have the integrating factor, we can use previous methods to solve the new exact equation.*

This article covers the fundamentals of integrating factors including its definition, conditions, and formula. We’ll also show you how to find integrating factors from differential equations and how to use utilize this method when solving non-exact differential equations.

This discussion will require an understanding of the exact equation, so make sure you have your notes handy or are familiar with the process of solving exact equations. For now, we’ll begin slowly – doing a quick recap on an equation’s exactness then diving into the definition of integrating factor and the method itself.

**What Is an Integrating Factor?**

An integrating factor is a function that we use to solve differential equations that are not exact equations. Suppose that we have $P(x, y)$ and $Q(x, y)$ forming the differential equation written in the form shown below.

\begin{aligned}P(x, y) \phantom{x}dx + Q(x, y) \phantom{x}dy = 0 \end{aligned}

We’ve learned how separable equations like the ones shown above can be solved by separating terms based on their variables. In the past, we’ve established how to identify differential equations based on their “exactness”.

| \begin{aligned}\dfrac{\partial P}{\partial y} = \dfrac{\partial Q}{\partial x} \end{aligned} |

| \begin{aligned}\dfrac{\partial P}{\partial y} \neq \dfrac{\partial Q}{\partial x} \end{aligned} |

We’ve learned about solving differential equations that are in their exact forms, so it’s time that we know how to deal with differential equations that are not exact. One of the most commonly used approaches is the use of integrating factors. This method uses a **factor that is multiplied on both sides of the differential equation to make the differential equation exact**.

\begin{aligned}\mu (x, y)P(x, y) \phantom{x}dx +\mu (x, y) Q(x, y) \phantom{x}dy = 0 \end{aligned}

The factor, $\mu (x, y)$, is what we call the integrating factor of the differential equation. Once we’ve rewritten the equation into an exact equation, we can then apply the appropriate steps to solve the resulting differential equation.

**Integrating factor formula**

Let’s now establish the integrating factor’s general expression given a differential equation, $ P(x, y) \phantom{x}dx + Q(x, y) \phantom{x}dy = 0$. The goal of this method is to rewrite the equation so that it has an exact form.

\begin{aligned}\mu (x, y)P(x, y) \phantom{x}dx +\mu (x, y) Q(x, y) \phantom{x}dy = 0 \end{aligned}

If we want this to be an exact equation, the partial derivatives of the expression must also satisfy the condition we’ve established for exact equations.

\begin{aligned}\dfrac{\partial}{\partial y} [\mu (x, y)P(x, y)] = \dfrac{\partial}{\partial x}[ \mu (x, y) Q(x, y)]\end{aligned}

Apply the product rule for derivatives and rearrange the equation as shown below.

\begin{aligned}P\dfrac{\partial \mu}{\partial y} + \mu\dfrac{\partial P}{\partial y} &= Q\dfrac{\partial \mu}{\partial x} + \mu\dfrac{\partial Q}{\partial x}\\P\dfrac{\partial \mu}{\partial y} -Q\dfrac{\partial \mu}{\partial y}&= \mu \left(\dfrac{\partial Q}{\partial x} – \dfrac{\partial P}{\partial y}\right ) \end{aligned}

The expression for the integrating factor will depend on whether $\mu$ depends on $x$ or $y$. When $\mu$ is defined by $x$, we’ll be isolating $\dfrac{\partial \mu}{\partial x}$ and when $\mu$ is dependent on $y$, we isolate $\dfrac{\partial \mu}{\partial y}$ instead. Here are the two possible outcomes on how the differential equation reduces to- accounting for both $\mu(x)$ and $\mu(y)$:

\begin{aligned}\boldsymbol{\dfrac{\partial \mu}{\partial x}}\end{aligned} | \begin{aligned}\boldsymbol{\dfrac{\partial \mu}{\partial y}}\end{aligned} |

\begin{aligned}-Q\dfrac{\partial \mu}{\partial x}&= \mu \left(\dfrac{\partial Q}{\partial x} – \dfrac{\partial P}{\partial y}\right )\\\dfrac{\partial \mu}{\partial x}&= \dfrac{\mu \left(\dfrac{\partial Q}{\partial x} – \dfrac{\partial P}{\partial y}\right )}{-Q}\\\dfrac{\partial \mu}{\partial x}&= \dfrac{\mu \left(\dfrac{\partial P}{\partial y} -\dfrac{\partial Q}{\partial x}\right )}{Q} \end{aligned} | \begin{aligned}P\dfrac{\partial \mu}{\partial y} &= \mu \left(\dfrac{\partial Q}{\partial x} – \dfrac{\partial P}{\partial y}\right ) \\\dfrac{\partial \mu}{\partial y} &= \dfrac{\mu \left(\dfrac{\partial Q}{\partial x} – \dfrac{\partial P}{\partial y}\right )}{P} \end{aligned} |

Integrate each of the equation and we’ll have the two forms of the integrating factors.

\begin{aligned}\boldsymbol{\mu(x)}\end{aligned} | \begin{aligned}\boldsymbol{\mu(y)}\end{aligned} |

\begin{aligned}\mu&= \text{exp}\left[\int\dfrac{ \left(\partial P/\partial y -\partial Q/\partial x \right )}{Q} \phantom{x}dx\right ]\end{aligned} | \begin{aligned}\mu&= \text{exp} \left[\int\dfrac{ \left(\partial Q/\partial x – \partial P/\partial y\right )}{P} \phantom{x}dy \right ] \end{aligned} |

Hence, we’ve established the general expression for integrating factors. Why don’t we summarize the integrating factor’s formula?

If we have a first-order differential equation, $P(x, y) \phantom{x}dx + Q(x, y) \phantom{x}dy = 0$, we can make it an exact equation by multiplying both sides by $\mu$. We call this the integrating factor is defined by a single variable (either $x$ or $y$). \begin{aligned}\textbf{Defined by }\boldsymbol{x} &: \mu= \text{exp}\left[\int\dfrac{\left(\partial P/\partial y -\partial Q/\partial x \right )}{Q} \phantom{x}dx\right ]\\\textbf{Defined by }\boldsymbol{y} &: \mu= \text{exp} \left[\int\dfrac{\left(\partial Q/\partial x – \partial P/\partial y\right )}{P} \phantom{x}dy \right ]\end{aligned} |

There are instances when the integrating factor is defined by more than one variable, but for now, we’ll limit our discussion to $\mu$ defined by one variable. In the next sections, we’ll show you how to find expression for $\mu$ and how to eventually solve differential equations using the method of integrating factors.

**How To Find the Integrating Factor?**

Use the formula for integrating factors to find the expression for $\mu$ – we want the integrating factor to be defined by one variable. Here is a guideline to keep in mind when finding the right integrating factor for your differential equation:

- Identify the expressions for $P(x, y)$ and $Q(x, y)$ given our differential equation.
- Take the partial derivative of $P$ with respect to $x$ and the partial derivative of $Q$ with respect to $y$.
- Use either of the two formulas and select the one that reduced the expression in terms of one variable.

\begin{aligned}\boldsymbol{\mu(x)}\end{aligned} | \begin{aligned}\boldsymbol{\mu(y)}\end{aligned} |

\begin{aligned}\mu&= \text{exp}\left[\int\dfrac{ \left(\partial P/\partial y -\partial Q/\partial x \right )}{Q} \phantom{x}dx\right ]\end{aligned} | \begin{aligned}\mu&= \text{exp} \left[\int\dfrac{ \left(\partial Q/\partial x – \partial P/\partial y\right )}{P} \phantom{x}dy \right ] \end{aligned} |

Use either of the two formulas and select the one that reduces the expression in terms of one variable.

Let’s work on the differential equation, $(2x^2+ y) \phantom{x}dx + (x^2y – x)\phantom{x}dy = 0$, and try to find its integrating factor. From the equation, we have $P(x, y) = 2x^2 + y$ and $Q(x, y) = x^2y – x$. Now, take the partial derivatives of $P$ and $Q$ with respect to $y$ and $x$, respectively.

\begin{aligned}\boldsymbol{\dfrac{\partial \mu}{\partial y}} &: \dfrac{\partial}{\partial y}(2x^2 + y)\\&= 1\end{aligned} | \begin{aligned}\boldsymbol{\dfrac{\partial \mu}{\partial x}} &: \dfrac{\partial}{\partial x}(x^2y – x)\\&= 2xy – 1\end{aligned} |

From the partial derivatives alone, we can see that the equation is not exact. This also shows us that the equation is not exact, so the integrating factor will definitely come in handy if we want to solve the differential equation. Let us show you the expressions for $\mu(x)$ and $\mu(y)$ first before choosing the best option for our equation.

\begin{aligned}\boldsymbol{\mu(x)}\end{aligned} | \begin{aligned}\boldsymbol{\mu(y)}\end{aligned} |

\begin{aligned}\mu (x)&= \text{exp}\left[\int\dfrac{ \left(\partial P/\partial y -\partial Q/\partial x \right )}{Q} \phantom{x}dx\right ]\\&= \text{exp}\left[\int\dfrac{ \left(1 -2xy +1\right )}{x^2y -x} \phantom{x}dx\right ]\\&= \text{exp}\left[\int\dfrac{ 2\left(1 -xy\right )}{-x(1 – xy)} \phantom{x}dx\right ]\\&= \text{exp}\left(\int -\dfrac{2}{x} \phantom{x}dx \right ) \end{aligned} | \begin{aligned}\mu(y) &= \text{exp} \left[\int\dfrac{ \left(\partial Q/\partial x – \partial P/\partial y\right )}{P} \phantom{x}dy \right ]\\&= \text{exp} \left[\int\dfrac{ \left(2xy – 1 – 1\right )}{2x^2 + y} \phantom{x}dy \right ]\\&= \text{exp} \left[\int\dfrac{ 2\left(xy – 1\right )}{2x^2 + y} \phantom{x}dy \right ] \end{aligned} |

Just by inspecting the expression, we can see that the best course of action is to use $\mu(x)$ since the integrand inside the exponential function is in terms of $x$ alone. Let’s now simplify the integrating factor’s expression by evaluating $\int -\dfrac{2}{x} \phantom{x}dx$.

\begin{aligned}\mu (x)&= \text{exp}\left(\int -\dfrac{2}{x} \phantom{x}dx \right )\\&= \text{exp}\left(-2\ln x \right )\\&= e^{\displaystyle{-2 \ln x}}\\&=e^{\displaystyle{\ln x^{-2}}}\\&= x^{-2} \end{aligned}

This means that the ideal integrating factor for the differential equation, $(2x^2+ y) \phantom{x}dx + (x^2y – x)\phantom{x}dy = 0$, is equal to $\mu(x) = x^{2}$.

**How To Use Integrating Factor?**

As we have discussed earlier, we can use the integrating factor to solve non-exact differential equations by multiplying $\mu$ on both sides of the equation. Before working on the integrating factor, check the differential equation for its exactness. When the differential equation is an exact equation, you can use a simpler approach as we have discussed in this article right away.

When the equation is not exact, use the guide below to solve the differential equation with the help of the integrating factor.

- Check the expression for $\mu(x)$ by evaluating the expression, $\mu = \text{exp}\left[\int\dfrac{ \left(\partial P/\partial y -\partial Q/\partial x \right )}{Q} \phantom{x}dx\right ]$. If the expression is in terms of $x$, skip the next bullet.
- If $\mu(x)$ is not a function of $x$ alone, evaluate $\mu(y)$. Check if the resulting expression is a function of $y$ alone.
- Evaluate and simplify the integrating factor’s expression.
- Multiply both sides of the equation by $mu$ then see whether this addresses the exactness issue.
- Use the resulting exact equation and apply the techniques we’ve learned to solve exact equations.

In the previous section, we’ve shown that the equation, $(2x^2+ y) \phantom{x}dx + (x^2y – x)\phantom{x}dy = 0$, is not exact and has an integrating factor of $\mu(x) = x^{-2}$. Multiply both sides of the equation by $x^{-2}$ then confirm whether the resulting equation is now exact.

\begin{aligned}{\color{blue}x^{-2}}(2x^2+ y) \phantom{x}dx + {\color{blue}x^{-2}}(x^2y -x)\phantom{x}dy &= {\color{blue}x^{-2}}\cdot 0\\(2+ yx^{-2}) \phantom{x}dx + (y -x^{-1})\phantom{x}dy &= 0 \end{aligned}

Check the resulting equation for exactness and this time, we’ll use $P = 2+ yx^{-2}$ and $Q = y -x^{-1}$.

\begin{aligned}\boldsymbol{\dfrac{\partial P}{\partial y}}\end{aligned} | \begin{aligned}\boldsymbol{\dfrac{\partial Q}{\partial x}}\end{aligned} |

\begin{aligned}\dfrac{\partial P}{\partial y} &= \dfrac{\partial}{\partial y} (2+ yx^{-2}) \\&= x^{-2}\end{aligned} | \begin{aligned}\dfrac{\partial Q}{\partial x} &= \dfrac{\partial}{\partial x} (y -x^{-1}) \\&= x^{-2}\end{aligned} |

The partial derivatives are now the same, so we can confirm that the equation is exact. We can now solve the differential equation using our technique for solving exact equations. Let’s begin by integrating $P(x, y) = 2+ yx^{-2}$ with respect to $x$ then accounting for $g(y)$.

\begin{aligned}f(x, y) &= \int P(x, y) \phantom{x}dx + g(y) \\&= \int 2+ yx^{-2} \phantom{x} dx+ g(y)\\&= 2x – yx^{-1} + g(y)\\\\\dfrac{\partial f}{\partial y}&= -x^{-1} + g^{\prime}(y)\end{aligned}

We’ve established in the past that $\dfrac{\partial}{\partial y} = Q(x, y)$, so equate our two expressions for $\dfrac{\partial}{\partial y}$ to solve for $g(y)$.

\begin{aligned} y -x^{-1} &= -x^{-1} + g^{\prime}(y)\\g^{\prime}(y)&= y\\g(y) &= \int y \phantom{x}dy\\&=\dfrac{1}{2}y^2\end{aligned}

Write the complete expression for the implicit solution of the equation using the general form, $f(x, y) = C$, where $C$ is an arbitrary constant.

\begin{aligned} f(x, y) &= 2x – yx^{-1} + g(y)\\ &= 2x – yx^{-1} + \dfrac{1}{2}y^2\\\\\textbf{Solution}&: x – yx^{-1} + \dfrac{1}{2}y^2 = C\end{aligned}

This means that the implicit solution of the differential equation is equal to $ x – yx^{-1} + \dfrac{1}{2}y^2 = C$. Getting the hang of it, now? Don’t worry, we’ve prepared more examples for you! By working on these exercises, not only will you master this topic, you’ll also refresh your knowledge of solving exact equations!

*Example 1*

Does the differential equation, $(12x^2 + 2xy + 4y^3) \phantom{x}dx + (x^2 + y^2) \phantom{x} dy =0$, need an integrating factor? If so, find the expression for $\mu$.

__Solution__

If the equation is exact, there is no need for us to work on its integrating factor. However, when $\dfrac{\partial P}{\partial y}$ and $\dfrac{\partial Q}{\partial x}$ are not equal, then the differential equation is not exact and needs an integrating factor.

\begin{aligned}P(x, y) = 12x^2y + 2xy + 4y^3\\ Q(x, y) = x^2 + y^2\end{aligned}

After writing down the expression for $P$ and $Q$, let’s go ahead and evaluate their partial derivatives with respect to $y$ and $x$, respectively.

\begin{aligned}\boldsymbol{\dfrac{\partial P}{\partial y}}\end{aligned} | \begin{aligned}\boldsymbol{\dfrac{\partial Q}{\partial x}}\end{aligned} |

\begin{aligned}\dfrac{\partial P}{\partial y} &= \dfrac{\partial}{\partial y} (= 12x^2 y + 2xy + 4y^3) \\&=12x^2+ 2x + 12y^2\end{aligned} | \begin{aligned}\dfrac{\partial Q}{\partial x} &= \dfrac{\partial}{\partial x} (x^2 + y^2) \\&= 2x\end{aligned} |

Since the partial derivatives are not equal, the equation is not exact and **needs an integrating factor**. Observe that the difference between the two partial derivatives: the difference is a multiple of $x^2 + y^2$. This means that it is easier to find $\mu(x)$, in which we are required to divide $\dfrac{\partial P}{\partial y} – \dfrac{\partial Q}{\partial x}$ by $Q(x, y)$.

\begin{aligned}\mu(x) &= \text{exp}\left[\int\dfrac{ \left(\partial P/\partial y -\partial Q/\partial x \right )}{Q} \phantom{x}dx\right ]\\ &= \text{exp}\left[\int\dfrac{ 12x^2+ 2x + 12y^2 – 2x}{x^2 + y^2} \phantom{x}dx\right ]\\&= \text{exp}\left(\int \dfrac{12(x^2 + y^2)}{x^2 + y^2} \phantom{x}dx\right)\\&=\text{exp}\left(\int 12 \phantom{x}dx \right )\\&= e^{12x}\end{aligned}

This shows that we can use the integrating factor, $\boldsymbol{\mu(x) = e^{12x}}$, to rewrite the equation and make it exact.

*Example 2*

Solve the differential equation, $\sin y \phantom{x}dy = (x – \cos y) \phantom{x}dx$.

__Solution__

Let’s first check the exactness of the differential equation. Once we rewrite the equation, we’ll have the following expressions for $P(x, y)$ and $Q(x, y)$.

\begin{aligned}\sin y \phantom{x}dy &= (x – \cos y) \phantom{x}dx\\-(x – \cos y) \phantom{x}dx + \sin y \phantom{x}dy &= 0\\(\cos y – x) \phantom{x}dx + \sin y \phantom{x}dy &= 0\end{aligned} | \begin{aligned}P(x, y) &= \cos y – x\\Q(x, y) &= \sin y\end{aligned} |

Find the expressions for $\dfrac{\partial P}{\partial y}$ and $\dfrac{\partial Q}{\partial x}$ to determine whether the equation is exact or not.

\begin{aligned}\boldsymbol{\dfrac{\partial P}{\partial y}}\end{aligned} | \begin{aligned}\boldsymbol{\dfrac{\partial Q}{\partial x}}\end{aligned} |

\begin{aligned}\dfrac{\partial P}{\partial y} &= \dfrac{\partial}{\partial y} (\cos y – x) \\&= -\sin y\end{aligned} | \begin{aligned}\dfrac{\partial Q}{\partial x} &= \dfrac{\partial}{\partial x} (\sin y) \\&= 0\end{aligned} |

The two partial derivatives are not equal, so the differential equation is not exact. This means that we’ll need to find the integrating factor that we can multiply on both sides of the equation. To find the integrating factor, let’s take a quick look at the difference of the two partial derivatives.

\begin{aligned} \dfrac{\partial P}{\partial y} – \dfrac{\partial Q}{\partial x} &= \sin y\\\dfrac{\partial Q}{\partial x} – \dfrac{\partial P}{\partial y} &= \sin y\end{aligned}

It will be much easier to divide the difference by $Q(x, y) = \sin y$, so it’s more ideal to find the integrating factor, $\mu(x) = \text{exp}\left[\int\dfrac{ \left(\partial P/\partial y -\partial Q/\partial x \right )}{Q} \phantom{x}dx\right ]$.

\begin{aligned}\mu (x)&= \text{exp}\left[\int\dfrac{ -\sin y}{\sin y} \phantom{x}dx\right ]\\&= \text{exp}\left(\int – 1 \phantom{x}dx\right)\\&= e^{-x}\end{aligned}

Now, let’s multiply both sides of the differential equation by the integrating factor, $\mu (x) = e^{-x}$.

\begin{aligned}{\color{blue} e^{-x}}(\cos y – x) \phantom{x}dx + {\color{blue} e^{-x}}\sin y \phantom{x}dy &= {\color{blue} e^{-x}} \cdot 0\\(e^{-x}\cos y – e^{-x}x) \phantom{x}dx + e^{-x}\sin y \phantom{x}dy&=0 \end{aligned}

This equation is now an exact differential equation – their partial derivatives as shown below can confirm that as well.

\begin{aligned}\boldsymbol{\dfrac{\partial P}{\partial y}}\end{aligned} | \begin{aligned}\boldsymbol{\dfrac{\partial Q}{\partial x}}\end{aligned} |

\begin{aligned}\dfrac{\partial P}{\partial y} &= \dfrac{\partial}{\partial y} (e^{-x}\cos y – e^{-x}x) \\&= -e^{-x}\sin y\end{aligned} | \begin{aligned}\dfrac{\partial Q}{\partial x} &= \dfrac{\partial}{\partial x} (e^{-x}\sin y) \\&= -e^{-x}\sin y\end{aligned} |

It’s much easier to integrate $Q(x, y) = -e^{-x}\sin y$ with respect to $y$, so we’ll use $f(x, y) = \int Q(x, y) \phantom{x}dy + g(x)$ to guide us in finding the implicit solution.

\begin{aligned}f(x, y) &= \int Q(x, y) \phantom{x}dy + g(x) \\&= \int e^{-x}\sin y\phantom{x} dy+ g(x)\\&= -e^{-x}\cos y+ g(x)\\\\\dfrac{\partial f}{\partial x}&= e^{-x}\cos y + g^{\prime}(x)\end{aligned}

Equate the expression for $P(x, y)$ with $ e^{-x}\cos y + g^{\prime}(x)$ to find the expression for $g^{\prime}(x)$. Integrate the resulting expression with respect to $x$ to find $g(x)$ using integration by parts.

\begin{aligned}e^{-x}\cos y – e^{-x}x &= e^{-x}\cos y + g^{\prime}(x)\\g^{\prime}(x) &= -e^{-x}x\\\\g(x) &= \int -xe^{-x} \phantom{x}dx\\&= -\int xe^{-x} \phantom{x}dx\\&= -\left(-e^{-x}x- \int -e^{-x}dx \right)\\&= e^{-x}x + e^{-x}\end{aligned}

Complete the expression for $f(x, y)$ to find the implicit form of the differential equation’s solution.

\begin{aligned} f(x, y) &= e^{-x}\cos y + g(x)\\ &= e^{-x}\cos y + e^{-x}x + e^{-x}\\\\\textbf{Solution}&: e^{-x}\cos y + e^{-x}x + e^{-x} = C\end{aligned}

This means that our differential equation, $\sin y \phantom{x}dy = (x – \cos y) \phantom{x}dx$, has a general solution of $ e^{-x}\cos y + e^{-x}x + e^{-x} = C$.

### Practice Questions

1. Does the differential equation, $x \phantom{x}dy – y \phantom{x} dx =0$, need an integrating factor? If so, find the expression for $\mu$.

2. Solve the differential equation, $\dfrac{dy}{dx} = \dfrac{y^2 – 3xy}{x^2 + xy}$.

3. Solve the differential equation, $(x \sin y + x) \phantom{x}dy = (y – x\cos y) \phantom{x} dx$.

### Answer Key

1. Yes, the equation is not exact, so it needs an integrating factor. It is equal to $\mu(x) = \dfrac{1}{x^2}$.

2. $x^3y + \dfrac{1}{2}x^2y^2= C$

3. $\dfrac{1}{2} e^{2x} + \dfrac{1}{3}y^3 + x\cos xy = C$