I will describe a method which allows to compare solutions of different elliptic and parabolic equations in different domains. As a by-product, it is possible to define a new type of rearrangement which applies to equations not necessarily in divergence form, leading to Talenti type results. In the case of variational problems, the method applies to prove Brunn-Minkowski type inequalities for the involved functionals.