Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

Exact Equations and Integrating Factors

  • Last Updated : 22 Mar, 2021

Differential Equations are used to describe a lot of physical phenomenons. They help us to observe something happening in real life and put it in a mathematical form. At this level, we are mostly concerned with linear and first-order differential equations. A differential equation in “y” is linear if all derivatives of y appear only to the first power. So it has the form if all derivatives of y appear only to the first power. So it has the form, 

A_{n}y^{n}+A_{n-2}y^{n-1}+...+A_{1}y'+A_{0}y = f

Attention reader! All those who say programming isn't for kids, just haven't met the right mentors yet. Join the  Demo Class for First Step to Coding Coursespecifically designed for students of class 8 to 12. 

The students will get to learn more about the world of programming in these free classes which will definitely help them in making a wise career choice in the future.

The coefficients are allowed to depend only on the independent variables. Note that the order can be arbitrarily large. We are going to look at the exact differential equations. These equations are first-order differential equations. 



Exact Differential Equations

It is a first-order differential equation that looks like, 

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

It has a special function I(x, y) whose partial derivatives can be put in place of M and N like, 

\frac{\partial{I}}{\partial{x}}dx + \frac{\partial{I}}{\partial{y}}dy = 0

Solving these equations means finding that function I(x, y) = C.

Checking if an equation is exact or not:

Let’s assume there is a solution function I(x, y). Then, 

\frac{\partial{M}}{\partial{y}} = \frac{\partial^{2}{I}}{\partial{x}\partial{y}}{}



\frac{\partial{N}}{\partial{x}} = \frac{\partial^{2}{I}}{\partial{x}\partial{y}}{}

They should end up the same. So to check if the equation is exact or not, simply calculate these partial derivatives. So, now that we have checked that the equation is exact, we will move on to finding the solution to this equation. 

Calculating the solution of Exact Differential Equations:

The general solution can be calculated in either of the following ways: 

  1. I(x,y) = \int M(x,y)dx (with x as an independent variable)
  2. I(x,y) = \int N(x,y)dy (with y as an independent variable)

So, then the general solution becomes, 

I(x, y) = C

Sample Problems

Question 1: Solve: (3x2y3 – 5x4)dx + (y + 3x3y2)dy = 0

Solution: 

Here, M(x, y) = 3x2y3 – 5x4 and N(x, y) = y + 3x3y2  

First check if this equation is exact or not, 



\frac{\partial{M}}{\partial{y}} = 6x^{2}y^{2} \\ \frac{\partial{N}}{\partial{x}} = 6x^{2}y^{2}

Since both of these are same, the equation is exact. 

Now let’s find the solution of this equation,

II(x,y) = \int M(x,y)dx \\ \hspace{1.1cm}= \int (3x^{2}y^{3} - 5x^{4})dx \\ \hspace{1.1cm}=  x^{3}y^{3} - x^{5} + f(y)

Notice that we are writing f(y) in place constant of integration “C”, because we had y as a fixed parameter while integrating it, but we know that is a variable, so we need to calculate f(y). 

We know, \frac{\partial{I}}{\partial{y}} = N(x,y)\\ 3x^{3}y^{2} +  \frac{df}{dy}  = y + 3x^{3}y^{2} \\ \frac{df}{dy} = y \\ df = ydy \\ \int df = \int ydy \\ f = \frac{y^{2}}{2} + C

Let’s plug in f(y) in the general solution, 

I(x,y) =x^{3}y^{2} - x^{5} + \frac{y^{2}}{2} + C

This is the general solution for this exact differential equation. 

Question 2: Solve the differential equation for the following:



(x2+3y2)dy + 2xydx = 0

Solution:

 M(x, y) = 2xy, N(x, y)=x2+3y2

\frac{dM}{dy}= 2x\\\frac{dN}{dx}=2x

Therefore, the equation is exact.

Solution of this equation: I(x, y)=\int M(x,y)dx= \int(2xy)dx\\=x^2y+f(y)\\ \frac{dI}{dy}=N(x,y)          

Substituting I(x, y) obtained:

\frac{d(x^2y+f(y))}{dy}=x^2+3y^2\\ x^2+ \frac{df}{dy}=x^2+3y^2\\\frac{df}{dy}=3y^2\\df=\int3y^2dy\\f=y^3+C

Put the value of f(y) in I(x, y):

I(x, y)= x2y+y3+C



This is the general solution for the exact differential equation.

Question 3: Solve eydx +(2y+xey)dy = 0

Solution:

M(x, y) = ey, N(x, y) = (2y+xey)

Solving \frac{dM}{dy},\frac{dN}{dx}

\frac{dM}{dy}=e^y,\frac{dN}{dx}=e^y

Hence, the given equation is exact equation.

Solution of the equation: I(x, y) = \int M(x,y)dx= e^ydx=xe^y+f(y)

It is known that dI/dy = N(x, y)

Substituting I(x, y):

\frac{d(xe^y+f(y))}{dy}=2y+xe^y\\xe^y+\frac{df}{dy}=2y+xe^y\\\frac{df}{dy}=2y\\f=\int2ydy\\f=y^2+c

Therefore, the solution for the exact equation obtained is,

I(x, y) = xey + y2 + C

Integrating Factor

This is also yet another method for solving linear differential equations. 

\frac{dy}{dx} + Py = Q

The above equation represents a linear first-order differential equation. P and Q are either constants or functions of x. The following steps give an outline of how to solve the first-order linear equation of this form using integrating factor. 

Step 1: Write the given differential equation in the form \frac{dy}{dx} + Py = Q, where P and Q are either constants or functions of x only.

Step 2: Find the Integrating Factor I.F = e^{\int Pdx}

Step 3: Write the solution of the differential equation as y(I.F) = Q(I.F)dx + C

Note: In case, the first-order differential equation is in the form \frac{dx}{dy} + P_{1}x = Q_{1}, where P1 and Q1 are constants or functions of y only. Then I.F = e^{\int P_{1}dx} and the solution of the differential equation is given by x.(I.F) = \int (Q_{1} \times I.F)dy + C 



Sample Problems

Question 1: Find the general solution of the following equation, 

\frac{dy}{dx} - y = cosx

Solution:

The equation matches the form given above, so here P = -1 and Q = cosx.

ThereforeI.F = e^{\int -dx} = e^{-x}

Multiplying both sides of the equation by I.F.

e^{-x}\frac{dy}{dx} - e^{-x}y = e^{-x}cosx \\ (\frac{dy}{dx})(ye^{-x}) = e^{-x}cosx \\

Integrating both sides of the equation by I.F, we get 

ye^{-x} = \int e^{-x}cosxdx + C \\ \text{Let, } \\ I = \int e^{-x}cosxdx\\ = cosx(-e^{-x}) - \int (-sinx)(e^{-x})dx \\ = -cosx(e^{-x}) - \int sinxe^{-x}dx \\   = -cosxe^{-x}  + sinxe^{-x} - \int cosxe^{-x} \\ I = -cosxe^{-x}  + sinxe^{-x} - I \\ 2I = (-cosxe^{-x}  + sinxe^{-x})\\ I = \frac{(-cosxe^{-x}  + sinxe^{-x})}{2}

Putting this value in the original equation, 



-ye^{-x} =  \frac{(-cosxe^{-x}  + sinxe^{-x})}{2}e^{-x} + C \\ y = \frac{sinx - cosx}{2}  + Ce^{x}

This is the general solution of the given differential equation. 

Question 2: Find general solution of differential equation,

\frac{dy}{dx}-\frac{3y}{x+1}=(x+1)^4

Solution:

 P= -3/(x+1), Q=(x+1)4

First, find the I.F.,

I.F.=e^{\int\frac{-3}{x+1}dx}\\e^{-3ln(x+1)}\\e^{ln(x+1)^{-3}}=\frac{1}{(x+1)^3}

Multiply by Integrating factor on both sides:

\frac{1}{(x+1)^3}\frac{dy}{dx}-\frac{3y}{(x+1)^4}=(x+1)

Integrate both sides:

\frac{y}{(x+1)^3}=0.5x^2+x+c

Hence, the general equation is:

y = (x+1)3(0.5x2+x+c)

Question 3: The general solution of the differential equation will be?

\frac{dy}{dx}+\frac{3y}{x}=\frac{e^x}{x^3}

Solution:

First, find the I.F’

P = 3/x, Q = ex/x3

I.F = e^{\int\frac{3}{x}dx}=e^{3lnx}=e^{lnx^3}=x^3



Therefore, I.F = x3

Multiply Integrating factor on both sides,

x^3\frac{dy}{dx}+3x^2y=e^x

Integrate both sides,

x^3y=e^x+c\\y=\frac{e^x+c}{x^3}

Special Integrating Factors

So far we have learned everything about Exact differential equations and how to solve them but there are times we come across certain equations which are “almost exact” but not exact differential equations since they are not Exact but are formed from exact differential equations by doing some changes in them. If we can trace back and make the equation exact again, the problem will be easily solved.

In order to trace back to the Exact integrating factor, multiply the equation with a ‘special integrating factor’ known as \mu(x)  OR  \mu(y)  (depending upon the problem statement).

Integrating factor using only x

Suppose the almost exact equation given, M(x, y) dx + N(x, y) dy =0 [Almost Exact]

Let’s multiply this with the special integrating factor \mu(x)

\mu(x) × M(x, y) dx +\mu(x) × N(x, y) dy =0

Now, in order to make the above equation exact, there has to be some value of \mu(x), the formula for Special Integrating factor,

\mu(x)=e^{\int{\frac{dM/dy-dN/dx}{N}dx}}

Question: Solve the differential equation, (1+y2)dx+ xydy = 0

Solution: 

To begin with, we first need to check the exactness of the differential equation

dM/dy = 2y, dN/dx = y

Now, as the equation is not exact, we need to find out the integration factor that is needed to be adjusted in the equation to make it exact.

(dM/dy- dN/dx) = 2y-y = y

1/N{dM/dy- dN/dx}=y/(xy)= 1\x

Here, we figured that the equation depends on x only.



Therefore, the integrating factor is \mu(x)

\frac{1}{\mu}\frac{d\mu}{dx}=\frac{1}{x}

Separate the variables and integrate both sides,

ln\mu= lnx

\mu= ^+_-x

We obtained the value of integrating factor, multiply this with our original equation

(x+xy2)dx + x2ydy=0

Checking for exactness again,

dM/dy= 2xy, dN/dx= 2xy

Integrate M and N as usual,

M(x, y)= \int(x+xy^2)dx=\frac{x^2}{2}+\frac{x^2y^2}{2}+f(y)

Substitute to determine f(y)

\frac{d(\frac{x^2}{2}+\frac{x^2y^2}{2}+f(y))}{dy}=x^2y

It follows f(y)=C where, C is a Constant.

Therefore, the general solution becomes,

\frac{x^2}{2}+\frac{x^2y^2}{2}+C=0

Integrating factor using only y

Similarly, the Exact equation can be obtained by multiplying the almost exact equation with the special integrating factor \mu(y), the formula is given as,

\mu(y)=e^{\int{\frac{dN/dx-dM/dy}{M}dy}}

Question: Solve differential equation, (2y2+2y+4x2)dx + (2xy +x) dy = 0

Solution:



To begin with, we need to check if the following equation is exact or not,

dM/dy = (4y +2), dN/dx = (2y +1)

dM/dy ≠ dN/dx {the equation is not exact}

In order to find the Integrating factor, solve the value of \frac{dM/dy-dN/dx}{N}= \frac{(4y+2)-(2y+1)}{2xy+x}

\frac{(2y+1)}{x(2y+1)}     =1/x

Since the value obtained is purely a function of x, we can conclude that the special integrating factor is \mu(x)

\mu(x)=e^{1/xdx} = elnx= x

Multiply the special integrating factor with the original equation,

 x[(2y2+2y+4x2)dx + (2xy +x) dy]=0

 (2xy2+2xy+4x3)dx + (2x2y +x2) dy=0

Finding the exactness of the differential equation obtained,

dM/dy=(4xy+2x), dN/dx=(4xy+2x)

Now we can integrate M and N as usual,

\int{M(x, y)dx}=\int{(2xy^2+2xy+4x^3)dx}=x^2y^2+x^2y+x^4+C(y)

\int{N(x, y)dy}=\int{(2x^2y+x^2)dy}= x^2y^2+x^2y+C(x)

Therefore, Solution: x2y2+x2y+x4=C




My Personal Notes arrow_drop_up
Recommended Articles
Page :