A derivation of the hydrodynamic equations from the equations of motion of collective coordinates