Let $V$ be a vector field on a smooth manifold $M$. Are there nice conditions under which there exists a (Riemannian) metric on $M$ such that $V$ is the gradient of some smooth function on $M$? One obstruction is that gradient vector fields have no closed integral curves (since a function is increasing on integral curves of its gradient).
If $V$ never vanishes, then the level sets of the corresponding function will produce a transverse foliation of $M$ of codimension 1. There is considerable literature on the existence of transverse foliations for vector fields... On the other hand, if $V$ has an isolated zero, there may be a local obstruction there. For example, in 2d the index of a gradient field at an isolated zero is at most 1. Although this ought to be long known, the best reference I have is Lemma 3.1 in archive.numdam.org/ARCHIVE/ASNSP/ASNSP_1992_4_19_4/… – user31373 May 19 '12 at 2:19
To make sense of whether or not $V$ is the gradient of a specific smooth function, one needs an isomorphism between the tangent bundle and the cotangent bundle. $\:$ Does a metric necessarily give a canonical $\hspace{.4 in}$ such isomorphism? $\:$ (I know that a Riemannian metric does.) $\;\;$ – Ricky Demer May 19 '12 at 3:12
Just a comment about the local version of the question for non-vanishing vector fields. About any point where your vector field does not vanish, there is an open neighborhood with coordinates that straighten out the integral curves, i.e. $X=\partial_z$ with $z$ one of the coordinates. $\partial_z=\nabla z$ if we take the gradient w.r.t. the pullback of the standard Euclidean metric tensor along the coordinate chart. Thus, locally around non-singular points there is always such a metric. – Josh Burby May 13 '15 at 5:16