## Exact equation

Prove that if the equation M(x,y)dx +N(x,y)dy = 0 (*) has a solution then it has an integrating factor.
My solution
If (*) is exact then easily, it has a solution, and the factor is 1.
If (*) is not exact suppose it does not have the factor. Then the solution has the form g(x,y)=C = Mdx + Ndy => it is exact (contradict).
Is that right?