Let $U$ be an open subset of $\Bbb{R}^n$ and take $\omega$ to be a nowherevanishing smooth $1$form on $U$. The Frobenius Theorem implies that, near each point of $U$, $\omega$ may be written as $g\,{\rm{d}}f$ for suitable locally defined smooth functions $f$ and $g$ iff $\omega\wedge{\rm{d}}\omega=0$. Here is my question(s): For such a $1$form $\omega$ on $U$ (never vanishing and $\omega\wedge{\rm{d}}\omega=0$) what is the obstruction to the existence of global smooth functions $f$ and $g$ on $U$ with $\omega=g\,{\rm{d}}f$? Can that be formulated as the vanishing of any homotopical invariant of $U$? What is a good nonexample in which such a global presentation of $\omega$ fails to exist?

$\begingroup$ For nonexamples, just take any closed but nonexact $\omega$ on $U$ that fails to be simply connected? $\endgroup$ – Willie Wong Mar 19 at 3:06

1$\begingroup$ @WillieWong Well, in that case $\omega$ is not in the form of ${\rm{d}}f$, but why not a multiple of such a thing? For instance, $\omega:=\frac{y}{x^2+y^2}{\rm{d}}x+\frac{x}{x^2+y^2}{\rm{d}}y$ is famously closed but not exact on $U:=\Bbb{R}^2\{(0,0)\}$. But it is a multiple of ${\rm{d}}\left(\frac{y^2}{x^2+y^2}\right)$. $\endgroup$ – KhashF Mar 19 at 3:22

$\begingroup$ In your "counter example", your function $g$ is not smooth. (It is singular whenever $x = 0$ or $y = 0$.) $\endgroup$ – Willie Wong Mar 20 at 18:29

$\begingroup$ (More precisely, your function $g = \frac{x^2 + y^2}{2xy}$.) $\endgroup$ – Willie Wong Mar 20 at 18:34
To expand on my comment: suppose you have $U$ not simply connected, and $\omega$ closed but not exact, and suppose there exists a closed loop $\gamma: [0,1]\to U$ such that $\omega(\dot{\gamma})$ is signed. (This is in particular the case with the "example" in your comment, where you can take $\gamma$ to be any circle centered at the origin.)
Suppose $\omega= g df$ for smooth $g$ and $f$, then you must have
$$ g \nabla_{\dot\gamma} f $$
is signed. This implies both $g$ and $\nabla_{\dot\gamma} f$ are signed along $\gamma$, but this is absurd, since integrating from $0$ to $1$ you have
$$ \int_0^1 \nabla_{\dot\gamma(s)} f(\gamma(s)) ~ds = f(\gamma(1))  f(\gamma(0)) = 0 $$
since $\gamma$ is a closed curve.
Simplyconnectedness is not enough, however, to ensure that the integrating factor can be globalized. To see this, recall that Frobenius theorem states that the nonvanishing oneform $\omega$ satisfies $\omega\wedge d\omega = 0$ IFF its kernel is the tangent bundle of a regular foliation.
If $\omega = g ~df$ for some function $f$, then necessarily $f$ will be constant on the leaves of this foliation. Hence a counterexample will be found if you have a regular foliation of a simply connected compact manifold. (As on a compact manifold the function $f$ must attain a maximum and $df = 0$ there, contradicting the assumption that $\omega$ is nonvanishing.)
One such example is given by the Reeb foliation of the 3sphere.
If we want to examine domains in Euclidean space: embed $\mathbb{S}^3 \hookrightarrow \mathbb{R}^4$ and slightly thicken it radially by $\epsilon$. Define a foliation on this 4 dimensional (simplyconnected) domain by extending the Reeb foliation trivially in the radial direction. The lifted oneform $\tilde{\omega}$ is the pullback of the Reeb $\omega$ from $\mathbb{S}^3$ by radial projection, and hence $\tilde{\omega} \wedge d \tilde{\omega} = 0$. Any $\tilde{f}$ that realizes $\tilde{\omega} = \tilde{g} d\tilde{f}$ will be constant on the foliation, and hence factors through some $f$ on $\mathbb{S}^3$, and the argument above shows that this contradicts the fact that $\omega$ is nonvanishing.

$\begingroup$ You seem to be saying that if the vector field corresponding to $\omega$ has a closed integral curve $\gamma(t)$, then $\omega$ cannot be written as $g\,{\rm{d}f}$: Since $\omega$ is nonzero everywhere, $g$ should be either always positive or always negative. Now $f$ is strictly monotonic along $\gamma(t)$ (a Lyapunov function) due to the fact that $\frac{\rm{d}}{\rm{d}t}f(\gamma(t))=g(\gamma(t))\,\big\nabla f(\gamma(t))\big^2$ does not change sign. This cannot be the case since $\gamma$ is closed. $\endgroup$ – KhashF Mar 23 at 17:58

$\begingroup$ Thanks, it works. But here we assume something extra about the $1$form $\omega$: There is a closed integral curve which of course prevents $\omega$ from being exact. I was looking for a topological property of the domain $U$. For instance, if $U$ is simply connected can we always write a nonvanishing $\omega$ with $\omega\wedge{\rm{d}}\omega=0$ as $g\,{\rm{d}}f$? $\endgroup$ – KhashF Mar 23 at 18:07

1$\begingroup$ "Closed integral curve" is not a requirement; that $\omega(\dot{\gamma})$ is signed is a weaker condition. // I don't think simply connected is enough; the Reeb foliation of $\mathbb{S}^3$ should be a counterexample. (The threesphere is compact so there cannot be global $f$ with nonvanshing $df$.) $\endgroup$ – Willie Wong Mar 24 at 4:30

1$\begingroup$ $\dot\gamma$ is a vector field along $\gamma$. You pair it against $\omega$. You get a scalar. Nothing about this requires $\omega$ having a vector field corresponding to it (not using any Riemannian structures at all). In the case where you do have a Riemannian structure, you can imagine the corresponding vector field being perturbed to be spiralling (ever so slightly) instead of having closed integral curves.The circles are no longer integral curves but $\omega(\dot{\gamma})$ can still be signed. $\endgroup$ – Willie Wong Mar 24 at 12:55

1$\begingroup$ What if you take a slightly thickened copy of $\mathbb{S}^3 \subset \mathbb{R}^4$ and extend the Reeb foliation trivially in the radial direction? If the leaves were defined as level sets of a function the function projects to a function on $\mathbb{S}^3$ and the same argument goes through, no? $\endgroup$ – Willie Wong Mar 25 at 19:35