Is every vector field a gradient vector field with respect to a pseudo metric?

Edit: According to the comment of Prof. Bryant we revise the question as follows:

Assume that $X$ is a smooth vector field on an open manifold $M$, for exmple $\mathbb{R}^2$. Is there a non degenerate pseudo Riemannian metric on $M$ such that $X$ is a gradient vector field? If not what type of obstructions would appear?

• No. Let $X$ be a vector field on the $2$-sphere that has a closed orbit. It cannot be the gradient vector field of any non-degenerate metric on the $2$-sphere. Closed integral curves are clearly an obstruction, and there are many such kinds of of obstructions of a dynamial nature, probably too many to classify. – Robert Bryant Jun 18 '17 at 21:06
• @RobertBryant Is not possible that $\nabla f. \nabla f=0$ along closed orbit? – Ali Taghavi Jun 18 '17 at 21:14
• No. Any non-degenerate pseudo-Riemannian metric on $S^2$ has to be either positive or negative definite because the tangent bundle of $S^2$ cannot be split into the sum of two line bundles. The same argument applies to any surface with nonzero Euler characteristic and a vector field with a closed orbit. – Robert Bryant Jun 18 '17 at 21:27
• @RobertBryant for example $\nabla xy= y\partial _x -x\partial_y$ with $dx^2- dy^2$. – Ali Taghavi Jun 18 '17 at 21:27
• @RobertBryant Yes thank you very much. So I revise the question for an open manifold for example for the plane. – Ali Taghavi Jun 18 '17 at 21:32