# Finding an integrating factor of an ordinary differential equation

Problem:
Solve the following differential equations first finding an integrating factor. $$( 5xy + 4y^2 + 1 ) \, dx + ( x^2 + 2xy ) \, dy = 0$$ Answer:
I have no idea how to find an integrating factor. However, the text book from where this problem is found has the following theorem in it.
Theorem:
Consider the differential equation $$M(x,y)dx + N(x,y)dy = 0 \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, \text{(2.42)}$$ if $$\frac{1}{N(x,y)} \left[ \frac{\partial M(x,y)}{\partial y} - \frac{\partial N(x,y)}{ \partial x} \right]$$ depends upon $$x$$ only, then $$e ^ { \int \frac{1}{N(x,y)} \left[ \frac{\partial M(x,y)}{\partial y} - \frac{\partial N(x,y)}{\partial x} \right] \, dx }$$ is an integrating factor of Equation (2.42) If $$\frac{1}{M(x,y)} \left[ \frac{\partial N(x,y)}{\partial x} - \frac{\partial M(x,y)}{\partial y} \right]$$ depends upon $$y$$ only, then $$e ^ { \int \frac{1}{M(x,y)} \left[ \frac{\partial N(x,y)}{\partial x} - \frac{ \partial M(x,y)}{\partial y} \right] \, dy }$$ is an integrating factor of Equation (2.42). \newline So, I am going to apply the above theorem. \newline \begin{align*} M(x,y) &= 5xy + 4y^2 + 1 \\ N(x,y) &= x^2 + 2xy \\ M_x &= 5y \\ M_y &= 5x + 8y \\ N_x &= 2x + 2 \\ N_y &= 2y \\ \frac{1}{N(x,y)} \left[ \frac{\partial M(x,y)}{\partial y} - \frac{\partial N(x,y)}{ \partial x} \right] &= \frac{1}{ x^2 + 2xy } \left[ 5x + 8y - (2x + 2) \right] \\ \frac{1}{N(x,y)} \left[ \frac{\partial M(x,y)}{\partial y} - \frac{\partial N(x,y)}{ \partial x} \right] &= \frac{ 3x + 8y - 2}{ 5x + 8y - 2x + 2 } \end{align*} The above expression depends on both $$x$$ and $$y$$. Therefore the first part of the theorem does not apply. Now, we try the second part. \begin{align*} \frac{1}{M(x,y)} \left[ \frac{\partial N(x,y)}{\partial x} - \frac{\partial M(x,y)}{\partial y} \right] &= \frac{1}{5xy + 4y^2 + 1 } \left[ 2x + 2 - (5x + 8y) \right] \\ \frac{1}{M(x,y)} \left[ \frac{\partial N(x,y)}{\partial x} - \frac{\partial M(x,y)}{\partial y} \right] &= \frac{ -3x - 8y + 2}{ 5xy + 4y^2 + 1 } \end{align*} Hence the second part of the theorem does not apply. I am not sure what to do.

$$( 5xy + 4y^2 + 1 ) \, dx + ( x^2 + 2xy ) \, dy = 0$$ Try $$\mu (x)=x^3$$ : $$( 5x^4y + 4x^3y^2 + x^3 ) \, dx + ( x^5 + 2x^4y ) \, dy = 0$$ Regroup some terms: $$( 5x^4ydx+x^5dy) + (4x^3y^2dx+ 2x^4ydy) + ( x^3dx) = 0$$ $$( ydx^5+x^5dy) + (y^2dx^4+ x^4dy^2) + ( x^3dx) = 0$$ $$d(x^5y) + d(y^2x^4) + ( x^3dx) = 0$$ Integrate: $$x^5y + x^4y^2 + \dfrac {x^4}4 = C$$
You may ask why I choose $$x^3$$ as an integrating factor. Start with an integrating factor that only depends on $$x$$. And we need a power of $$x$$. So we try $$\mu(x)=x^{a}$$. We want to make our differential equation exact so: $$( 5xy + 4y^2 + 1 ) \, dx + ( x^2 + 2xy ) \, dy = 0$$ $$( 5x^{a+1}y + 4y^2x^a + x^a) \, dx + ( x^{a+2} + 2x^{a+1}y ) \, dy = 0$$ Our condition for exactness is: $$\partial_y(5x^{a+1}y + 4y^2x^a+x^a)=\partial_x (x^{a+2} + 2x^{a+1}y )$$ $$5x^{a+1} + 8yx^a=(a+2)x^{a+1} + 2(a+1)x^{a}y$$ We find that $$a=3 \implies \mu (x)=x^3$$
• Great one! But how did you know that the integrating factor should be a power of $x$? Is that because that's the simplest nontrivial family of functions of $x$? Apr 25 '20 at 23:02
• You only have power of x and y in the differential equation so ,normaly our integrating factor should be $\mu= x^ay^b$ I tried simplicity. With an integrating factor that only depends on $x$ and see if I can work it @Allawonder Apr 25 '20 at 23:03