When is a Divergence-Free Vector Field on the Tangent Bundle of a Riemannian Manifold Hamiltonian?

(Reposted from https://math.stackexchange.com/questions/2589600/when-is-a-divergence-free-vector-field-on-the-tangent-bundle-of-a-riemannian-man) Starting with a closed, connected Riemannian manifold $(M^n, g)$, using the "product Euclidean metric" to form an associated Riemannian metric $\tilde{g}(p,v)((v_1,w_1),(v_2,w_2))) =$ $g(p)(v_1,v_2) + \langle w_1|w_2\rangle$ on $TM$ (which is naturally a symplectic manifold with natural symplectic form $\omega$), and using the definition of the divergence of a vector field on $TM$ from https://math.stackexchange.com/questions/137573/divergence-of-a-vector-field-on-a-manifold, when is a divergence-free vector field on $TM$ Hamiltonian? That is, when is it the case that a divergence-free vector field $X$ on $TM$ admits a smooth function $H: TM \to \mathbb{R}$ with $dH(Y) = \omega(X,Y)$ for all smooth vector fields $Y$ on $TM$?

Is this only true when $TM$ with the associated product Euclidean metric is Kähler? (Note this post Kähler structure on cotangent bundle?.)

Also, is the converse true: with the same setup, if $X$ is Hamiltonian, is it divergence-free?

Any assistance you can provide is appreciated.

See Section 2.5 of Ref. 1 (citation given below) entitled When are equations Hamiltonian? The main statement for nonlinear differential equations on symplectic vector spaces is the following

Let $X: Z \to Z$ be a smooth vector field on a symplectic vector space $(Z, \Omega)$. Then $X = X_H$ for some Hamiltonian function $H: Z \to \mathbb{R}$ if and only if $D X(z)$ is $\Omega$-skew for all $z$.

An analogous (local) statement on manifolds can be found in Section 5.4 of 1.

Reference

Marsden, J. E. and Ratiu, T. S. Introduction to Mechanics and Symmetry. Texts in Applied Mathematics vol. 17, Springer-Verlag, 1994 Second Edition, 1999.

• Thanks! I'll have to look at the book (I'm not sure what $DX$ [induced map on double-tangent bundle?] and $\Omega$-skew mean in this context), but I think that's for what I'm looking. (I love Marsden as an author.) – Jeffrey Rolland Jan 4 '18 at 16:29
• To be sure, the additional structure of a Riemannian metric is not necessary to determine whether a given vector field is Hamiltonian or not. – Nawaf Bou-Rabee Jan 4 '18 at 16:33
• Nawaf Bou-Rabee: Wonderful addition! That's very helpful. – Jeffrey Rolland Jan 4 '18 at 17:05
• One trip to the library later: $DX$ is the Jacobian matrix and the matrix A is $\Omega$-skew iff $\Omega(Au,v) = -\Omega(u,Av)$ for all $u,v \in Z$; thanks so much for all your help. – Jeffrey Rolland Jan 5 '18 at 4:13