Homogenization of a polynomial