On the integrability of the differential systems in dimension two and of the polynomial differential systems in arbitrary dimension