I've come across a question that asks to prove that a function is constant along solutions.
The only other bit of information is that the function is Hamiltonian.
My question is what does it mean constant along solutions?
Surely given any function f(x,y) and real values x=t, y=g, f(t,y) will always be a constant.
Any help with understanding the question would be greatly appreciated.
Let the Hamiltonian $H(q,p)$ not depend explicitly on time $t$. Hamilton's equations $$\dot{q}=\frac{\mathrm{d}q}{\mathrm{d}t}=+\frac{\partial H}{\partial p}, \qquad \dot{p}=\frac{\mathrm{d}p}{\mathrm{d}t} =-\frac{\partial H}{\partial q}$$ define the time evolution of a point $(q,p)$ in phase space.
The time evolution of a function $f(q,p)$ on phase space (which does not depend explicitly on $t$) is then given by $$\dot{f}=\frac{\mathrm{d}f}{\mathrm{d}t} = \frac{\partial f}{\partial q}\dot{q} + \frac{\partial f}{\partial p}\dot{p}=\frac{\partial f}{\partial q}\frac{\partial H}{\partial p}-\frac{\partial f}{\partial p}\frac{\partial H}{\partial q}.$$
In particular, $$\dot{H}=\frac{\mathrm{d}H}{\mathrm{d}t}=\frac{\partial H}{\partial q}\frac{\partial H}{\partial p}-\frac{\partial H}{\partial p}\frac{\partial H}{\partial q}=0,$$ so $H$ is constant along solutions of Hamilton's equations with Hamiltonian $H$.
($H$ is interpreted as the energy, and $\dot{H}=0$ is conservation of energy.)
In terms of the Poisson bracket $\{f,g\}=\frac{\partial f}{\partial q}\frac{\partial g}{\partial p}-\frac{\partial f}{\partial p}\frac{\partial g}{\partial q}$, it can be expressed as: $$\dot{q} = \{q,H\}, \quad\dot{p} = \{p,H\}\quad \text{ and }\quad \dot{H} = \{H,H\}=0.$$