# Locally Hamiltonian vector fields

Consider the following definitions (taken from [1])

Definition. Let $$E$$ be a Banach space and $$B: E \times E \to \mathbb R$$ a continuous bilinear mapping. Then $$B$$ induces a map $$B^\natural: E \to E^*, e \mapsto B^\natural (e)$$ defined by $$B^\natural(e) \cdot f = B(e,f)$$. We call $$B$$ weakly nondegenerate if $$B^\natural$$ is injective. We call $$B$$ (strongly) nondegenerate if $$B^\natural$$ is an isomorphism.

Definition. Let $$(P, \omega)$$ be a symplectic manifold. A vector field $$X: P \to TP$$ is called Hamiltonian if there is a $$C^1$$ function $$H: P \to \mathbb R$$ such that $$i_X \omega = \mbox{d} H$$. We say $$X$$ is locally Hamiltonian if $$i_X\omega$$ is closed.

As a consequence of the Open Mapping Theorem, one can note that $$B$$ is nondegenerate iff $$B$$ is weakly nondegenerate and $$B^\natural$$ is onto. Obviously, the difference between "weakly" and "strongly" vanishes in finite dimensions.

The authors of [1] then note that if $$\omega$$ is only weakly nondegenerate, then given a smooth functon $$H: P \to \mathbb R$$, $$X=X_H$$ need not exists on all of $$P$$. They give no specific examples but remark this is an essential feature in infinite dimensions, for the vector fields then correspond to partial differential equations and are only densely defined. Clearly, if $$i_X \omega$$ is closed, then it is also locally exact thanks to Poincaré Lemma. (at least, in finite dimensions)

Remark. Of course, in physics usually the paradigm is reversed: one measures the energy, induces $$H$$ and tries to construct $$X_H$$. Nevertheless, in principle one can't be sure $$H$$ is globally defined, being the passage from the energy to the Hamiltonian the weak link.

Hence my question is: are there finite-dimensional examples, possibly of some physical interest, in which $$X_H$$ is only locally defined? Does this imply, at least in some cases or as a matter of principle, bearing in mind the infinite-dimensional case too, that one has to use a collection of different Hamiltonians in order to induce the right behaviour? (i.e., to reproduce the right trajectories as integral curves of the locally Hamilontian vector fields?)

[1] Abraham, Marsden, Ratiu, Manifolds, tensor analysis and applications, chapter 9.

Counterexample. Let $\mathbb T^2$ (the 2-torus) endowed with periodic coordinates $(\theta,\phi)$ and with the symplectic form $\Omega = \mbox{d}\theta \wedge \mbox{d}\phi$. Then a costant vector field on $\mathbb T^2$ is locally Hamiltonian but not Hamiltonian (Compare [1], chapter 5). This can be important, e.g, in solid state physics.
For the second question, the answer is in the affermative. See [1] (chapters 5, 6) or [2] (chapter 10). Examples are the magnetic monopole (since $\mathbb R^3 \setminus {0}$ is simply-connected but not contractible) and the steady magnetic field in the $\mathbb R^3 \setminus\{\mbox{$z$-axis}\}$, due to a steady electric current in the $z$-axis.