The classical theorem of Weitzenboeck states that the algebra of invariants
of a single unipotent transformation g in GLm(K) acting on the polynomial
algebra K[x1,...,xm] over a field K of characteristic 0 is finitely
generated. Recently the author and C.K. Gupta have started the study of the
algebra of g-invariants of relatively free algebras of rank m in varieties
of associative algebras. They have shown that the algebra of invariants is not
finitely generated if the variety contains the algebra UT2(K) of 2×2
upper triangular matrices. The main result of the present paper is that the
algebra of invariants is finitely generated if and only if the variety does not
contain the algebra UT2(K). As a by-product of the proof we have established
also the finite generation of the algebra of g-invariants of the mixed trace
algebra generated by m generic n×n matrices and the traces of their
products.Comment: 8 page