Differential equations/Integrating factors

Definition
If the expression $$M(x,y) dx + N(x,y) dy = 0$$ is not exact or homogeneous, an integrating factor $$I(x)$$ can be found so that the equation: $$I(x)M(x,y) dx + I(x)N(x,y) dy = 0$$ is exact.

Solution
There are 2 approaches to a solution.
 * 1) If the function is of the form $$\frac {dy}{dx}+p(x)y=r(x)$$, then the integrating factor is $$I(x)=e^{\int p(x) dx}$$. OR  If the function is of the standard form $$M(x,y)dx+N(x,y)dy=0$$ , then the integrating factor is $$I(x)=e^{\int \frac {M_y-N_x}{N} dx}$$ or $$I(x)=e^{\int \frac {N_x-M_y}{M} dy}$$.
 * 2) Substitute the integration factor into the equation $$I(x)M(x,y)dx+I(x)N(x,y)dy=0$$ and solve.