Rearrangement of functions and reverse Jensen inequalities