  What happens when one of the parameters governing the dynamics of a
long-range interacting system of particles in thermal equilibrium is abruptly
changed (quenched) to a different value? While a short-range system, under the
same conditions, will relax in time to a new thermal equilibrium with a uniform
temperature across the system, a long-range system shows a fast relaxation to a
nonequilibrium {\em quasistationary state} (QSS). The lifetime of such an
off-equilibrium state diverges with the system size, and the temperature is
non-uniform across the system. Quite surprisingly, the density profile in the
QSS obtained after the quench is anticorrelated with the temperature profile in
space, thus exhibiting the phenomenon of {\em temperature inversion}: denser
regions are colder than sparser ones. We illustrate with extensive molecular
dynamics simulations the ubiquity of this scenario in a prototypical long-range
interacting system subject to a variety of quenching protocols, and in a model
that mimics an experimental setup of atoms interacting with light in an optical
cavity. We further demonstrate how a procedure of iterative quenching combined
with filtering out the high-energy particles in the system may be employed to
cool the system. Temperature inversion is observed in nature in some
astrophysical settings; our results imply that such a phenomenon should be
observable, and could even be exploitable to advantage, also in controlled
laboratory experiments.
