Given a non-exact differential equation, $$M(x,y) dx + N(x,y)dy = 0,$$ an integrating factor is a function $\mu(x,y) \ne 0$ such that the equation
$$\mu Mdx + \mu N dy = 0$$ is exact.
I understand how to find integrating factors, but my only confusion is, why do they work? How do we know that the resulting function will have the same solution set as the original differential equation?
I understand that multiplying a function by another function can drastically change the behavior. So for this procedure, how do we know that solving the new differential equation will lead to potential solutions to the original one?