Maxima Function
orbit (P, lvar)
computes the orbit of the polynomial P in the variables in the list lvar under the action of the symmetric group of the set of variables in the list lvar.
(%i1) orbit (a*x + b*y, [x, y]); (%o1) [a y + b x, b y + a x] (%i2) orbit (2*x + x^2, [x, y]); 2 2 (%o2) [y + 2 y, x + 2 x]
See also for the action of a product of symmetric groups on a polynomial.