When can an autonomous system be written using a Hamiltonian?

If I have an autonomous series of differential equations $$\tag{1} \frac{dx_i}{dt} ~=~ A_i(x_1,...,x_n)$$ with the condition that $$\tag{2} \sum_{i=1}^n\frac{\partial A_i}{\partial x_i}~=~0$$ in all regions of phase space, can this be written as a Hamiltonian system in terms of some generalized position and momentum coordinates?

• Comment to the question (v1): Note that while the ODE (1) is covariant under coordinate transformations, the divergence-free condition (2) is not, unless we introduce (and specify a choice of) a volume-form. – Qmechanic Apr 9 '15 at 22:44

1. Let there be given an $n$-dimensional manifold $M$ with a smooth vector field $X\in \Gamma(TM)$.

2. If $(x^1, \ldots, x^n)$ is some local coordinates on $M$, then the vector field takes the form $$\tag{A} X~=~X^i(x)\frac{\partial}{\partial x^i},$$ and one may study the autonomous first-order ODE $$\tag{B} \frac{dx^i(t)}{dt}~=~ X^i(x(t)).$$ Note that the ODE (B) transforms covariantly under change of coordinates.

3. If $X$ does not vanish in a point $p\in M$, then one may choose a local coordinate neighborhood $U\subseteq M$ of $p$, with local coordinates $(y^1, \ldots, y^n)$, so that $$\tag{C} X~=~\frac{\partial}{\partial y^1}.$$ This procedure is sometimes called stratification or straightening out of a vector field. It is a special case of Frobenius theorem.

4. The ODE (B) then becomes $$\tag{D} \frac{dy^i}{dt}~=~ \delta^i_1$$ in the local coordinate neighborhood $U\subseteq M$.

5. If one chooses the Poisson bracket in the obvious way, i.e. $$\tag{E}\{y^i,y^2\}_{PB}~=~\delta^i_1,\qquad \text{etc},$$ then one may bring the ODE (4) on Hamiltonian form $$\tag{F} \frac{dy^i}{dt}~=~ \{ y^i, y^2\}_{PB}$$ in the local coordinate neighborhood $U\subseteq M$.

6. If the dimension $n$ is even, then the Poisson bracket (E) can be chosen to be non-degenerate.

7. The question of the existence of a global Hamiltonian formulation is much more subtle, even for $n=2$. See also e.g. this and this related Phys.SE posts.

• What kind of conditions would be required for the existence of a global Hamiltonian formulation? I take it that analyticity of the A_i(x)'s would not be sufficient? – djbinder Apr 10 '15 at 2:17
• Analyticity of the vector field is not enough, cf. e.g. this counterexample. – Qmechanic Apr 10 '15 at 9:49
• Correction to the answer (v2): The word ODE (4) below eq. (E) should be ODE (D). – Qmechanic Aug 13 '15 at 10:19
• For the related question whether there exists a conserved energy function (rather than a full Hamiltonian formulation), see this Phys.SE post. – Qmechanic Aug 13 '15 at 13:27