TITLE: How does an integrating factor geometrically "uncurl" a vector field?
QUESTION [5 upvotes]: We know that certain 1-D forms $m(x,y,z)\,dx + n(x,y,z)\,dy + p(x,y,z)\,dz$ admit integrating factors as we teach in basic differential equations. How does the integrating factor geometrically turn this "unlayered" situation into the "layered situation" of level surfaces with the new vector field being the gradient field of of a suitably differentiable function $f(x,y,z)$ of $3$ variables.  I know that the general question of integrability is very complicated. Just a good intuitive example would suffice.
I know how an integrating factor which is essentially a continuous "reweighting" of the vector field can make the required the field "exact" algebraically. What I want to get a feel for is "What is happening geometrically?". How is a vector field which is wandering around and many times trying to form closed loops and does not "layer" transformed geometrically into a vector field which is inwardly or outwardly directed by the "layered" set of level surfaces when before there were no natural surfaces to assign to the vector field?

REPLY [2 votes]: As pointed out by Willie Wong, the one-form $\,\omega\,$ has an integrating factor iff it satisfies Frobenius integrability condition $\,\omega \wedge d\omega = 0$.
If we identify a one-form $\,\alpha = A\,dx + B\,dy + C\,dz\,$ with the vector field $\,X_\alpha = (A,B,C)$ and a two-form $\,\beta = E\,dy\wedge dz+ F\,dz \wedge dx + G\,dx\wedge dy$ with the vector field $X_\beta = (E,F,G)$, the condition $\,\omega \wedge d\omega = 0\,$ could be given a geometric meaning in the following sense.
In the corrispondences $\,\alpha \leftrightarrow X_\alpha$ and $\,\beta \leftrightarrow X_\beta$

differentiating $\,\alpha\,$ corrisponds to take the curl of $\,X_\alpha$, i.e. $\,X_{d\alpha} = \nabla \times X_\alpha$;
the wedge product between one-forms and two-form is the dot product, i.e. $\alpha \wedge \beta = (X_\alpha \cdot X_\beta)\,dx\wedge dy\wedge dz$

So, a one-form $\,\omega\,$ admits an integrating factor iff $\,(\nabla \times X_\omega) \cdot X_\omega  = 0\,$ (the curl of $X_\omega$ is orthogonal to $X_\omega$ itself).