  The Lagrangian, the Hamiltonian and the constant of motion of the
gravitational attraction of two bodies when one of them has variable mass is
considered. The relative and center of mass coordinates are not separated, and
choosing the reference system in the body with much higher mass, it is possible
to reduce the system of equations to 1-D problem. Then, a constant of motion,
the Lagrangian, and the Hamiltonian are obtained. The trajectories found in the
space position-velocity,($x,v$), are qualitatively different from those on the
space position-momentum,($x,p$).
