An integral formulation of hydrodynamics