  The classical Pohozaev identity constrains potential solutions of certain
semilinear PDE boundary value problems. The Kazdan-Warner identity is a similar
necessary condition important for the Nirenberg problem of conformally
prescribing scalar curvature on the sphere. For dimensions $n\geq 3$ both
identities are captured and extended by a single identity, due to Schoen in
1988. In each of the three cases the identity requires and involves an
infinitesimal conformal symmetry. For structures with such a conformal vector
field, we develop a very wide, and essentially complete, extension of this
picture. Any conformally variational natural scalar invariant is shown to
satisfy a Kazdan-Warner type identity, and a similar result holds for scalars
that are the trace of a locally conserved 2-tensor. Scalars of the latter type
are also seen to satisfy a Pohozaev-Schoen type identity on manifolds with
boundary, and there are further extensions. These phenomena are explained and
unified through the study of total and conformal variational theory, and in
particular the gauge invariances of the functionals concerned. Our
generalisation of the Pohozaev-Schoen identity is shown to be a complement to a
standard conservation law from physics and general relativity.
