Variational Method in the Theory of Compressible Fluid