# Poisson brackets and Hamiltonian Invariants

Consider this Hamiltonian of two degrees of freedom, $$H=q_1p_1-q_2p_2-aq_1^2+bq_2^2 \, .$$

Define $$A\equiv\frac{p_1-aq_1}{q_2} \hspace{10mm} B\equiv q_1q_2 \, .$$

$A$, $B$, and $C$ are constants of motion (i.e $\{A,H\} =\{B,H\}=0$), but $C=\{A, B\}=-1$.

How could I find the all the other constants of motion of H (i.e all functions $f(q_1,q_2,p_1,p_2,t)$ with $\{f,H\} + \partial f / \partial t=0$), in case they exist?

There shouldn't be any more independent ones. This is a 4D system in phase space, so 3 independent phase-space surfaces (including the Hamiltonian) intersect on a line--a trajectory in phase space. Another independent constant would intersect that trajectory at a point and the system would freeze, so all PBs with the Hamiltonian would vanish. (Note $G=(p_2 - bq_2)/q_1$ is an invariant, but not independent, as $H=B(A-G)$.)
Specifically, for this particular, degenerate, system, $$\frac{df}{dt}= \{ f,H,B,A\}= \{f,H\} \{B,A\}= \{f,H\},$$ an incompressible flow where, for $z^i\equiv (q_1,p_1,q_2,p_2)$, $$\{ f,H,B,A\}\propto \epsilon^{ijkl} \partial_i f \partial_j H \partial_k B \partial_l A .$$