Symmetry in variational principles and applications