Here is one way to prove it.
We need to find a factor so that make the ODE become exact.
So μ(x, y)M(x, y) + μ(x, y)N(x, y)y = 0, if the equation is exact, then (μM)y = (μN)x.
Further more, Mμy − Nμx + (My − Nx)μ = 0. You are asking about integrating factor only depends on x, so it is safe to assume that μy = 0(taking derivative with respect to y). then we find that dμ/dx= μ(My − Nx)/N. If (My − Nx)/N is a function of x only, then there is an integrating factor μ that also depends only on x.
I hope this brief explanation helps.
