Minimization of non-coercive integrals by means of convex rearrangement