Integrating Factor
Find the solution
Example 1
Example 2
$$(3x^2 + y)dx + (x^2y - x)dy = 0$$
We immediately calculate $M_y$ and $N_x$.
$$M_y = 1, N_x = 2xy - 1$$
Something useful is to just subtract one from the other. It doesn't matter whether it's $M_y - N_x$ or vice-versa, because you can just negate if you see that you need to divide by M.
$$M_y - N_x = 2 - 2xy$$ We can look at both equations to see if this is a multiple of either M or N. We see that N equals (-x/2) * the expression above. $$\dfrac{2 - 2xy}{x^2y - x} = \dfrac{-2(xy - 1)}{x(xy - 1)} = \dfrac{-2}{x}$$ This is written only in terms of x, so we can write $$\rho = e^{\int \frac{-2}{x}\, \mathrm{d}x} =\dfrac{1}{x^2}$$ $$\rho Mdx + \rho Ndy = 0$$ $$(3 + \dfrac{y}{x^2})dx + (y - \frac{1}{x})dy = 0$$ We know $M_y$ = $N_x$ now, so we can say $$F_x = 3 + \dfrac{y}{x^2} \to F = 3x - \frac{y}{x} + G(y)$$ $$F_y = y - \dfrac{1}{x} \to F = \dfrac{y^2}{2} - \frac{y}{x} + H(x)$$ $$F = 3x - \dfrac{y}{x} + \dfrac{y^2}{2}$$ $$\boxed{3x - \dfrac{y}{x} + \dfrac{y^2}{2} = C}$$
$$M_y - N_x = 2 - 2xy$$ We can look at both equations to see if this is a multiple of either M or N. We see that N equals (-x/2) * the expression above. $$\dfrac{2 - 2xy}{x^2y - x} = \dfrac{-2(xy - 1)}{x(xy - 1)} = \dfrac{-2}{x}$$ This is written only in terms of x, so we can write $$\rho = e^{\int \frac{-2}{x}\, \mathrm{d}x} =\dfrac{1}{x^2}$$ $$\rho Mdx + \rho Ndy = 0$$ $$(3 + \dfrac{y}{x^2})dx + (y - \frac{1}{x})dy = 0$$ We know $M_y$ = $N_x$ now, so we can say $$F_x = 3 + \dfrac{y}{x^2} \to F = 3x - \frac{y}{x} + G(y)$$ $$F_y = y - \dfrac{1}{x} \to F = \dfrac{y^2}{2} - \frac{y}{x} + H(x)$$ $$F = 3x - \dfrac{y}{x} + \dfrac{y^2}{2}$$ $$\boxed{3x - \dfrac{y}{x} + \dfrac{y^2}{2} = C}$$
David Witten