there is no one method of finding int factor but there are special cases

Two things

1)If 1/M (dN/dx - dM/dy) = f(y) then int factor is e^(integralf(y))

2) If 1/N (dM/dy- dN/dx) = f(x) tehn int factor is e^(integralf(x))

In your case 1) applies and 1/y^4 is the int factor