# Sign of Hamiltonians

1. Mar 13, 2014

### luitzen

How do you decide on the sign of a Hamiltonian function?

For example, I have the following system of differential equations:

$x'=y$
$y'=-\dfrac{3}{2}x^{2}-2x$

With the following Hamiltonian:
$$H^{\oplus}=\dfrac{1}{2}x^{3}+x^{2}+\dfrac{1}{2}y^{2}$$

because $\dfrac{dH^{\oplus}}{dt}=0$. But if $\dfrac{dH^{\oplus}}{dt}=0$ then $\dfrac{dH^{\ominus}}{dt}=0$ is also true.

We can write $H=U\left(x\right)+T\left(v\right)$ with $v=y$. We can then use $U\left(x\right)$ to construct the phase portrait of the system of differential equations.

With the use of Matlab I created the phase portrait of the system and it is obvious that the Hamiltonian with the positive sign leads to the correct plot. My question now is how do I know which Hamiltonian I should use?

Plot of $U^{\oplus}$:

Plot of phase portrait:

Last edited: Mar 13, 2014