I am stuck on a proof. I need to show that if a Hamiltonian only depends on q1 and p1 though a function [itex]f(q_1,p_1)[/itex], that is; [tex]H(f(q_1, p_1), q_2, p_2, q_3, p_3, ... q_n, p_n)[/tex] then [tex]f(q_1, p_1)[/tex] is an integral of motion. My attempt at a solution is as rather simplistic but I'm stuck making the final jump. Since the Hamiltonian is not directly a function of q1 and p1 it must commute; [tex][q_1, H] = [p_1, H] = 0[/tex] so q1 and p1 are integrals of motion. How do i then say that a function of those two variables is also an integral of motion, it feels intuitive but I cannot figure out how to write it down.