A classification of variationally trivial Lagrangians on T*M which are inva
riant under the Lie algebra of infinitesimal gauge transformations of the p
rincipal bundle pi:M X U(1)-->M, is given. A characterization of Lagrangian
densities on T*M which are invariant under the Lie algebra of all infinite
simal automorphisms of M X U(1) is also obtained. (C) 1999 American Institu
te of Physics. [S0022-2488(99)02202-1].