Ordering output in a polynomial

*To*: mathgroup at smc.vnet.net*Subject*: [mg20075] Ordering output in a polynomial*From*: George Szpiro <george at netvision.net.il>*Date*: Wed, 29 Sep 1999 03:33:30 -0400*Organization*: NetVision Israel*Sender*: owner-wri-mathgroup at wolfram.com

Hello: Thanks to all the people who answered my question about multiple integrals. The answer was Integrate[1, {x[1], 0, 1}, Sequence @@ Table[{x[n], k[n - 1], x[n - 1]}, {n, 2, 4}]] I would now like to order the output in a special way, i.e., the terms of a polynomial should be in a form, such that the expressions with only one term are first, then the expressions with two terms, etc. How do I do that? eg: I would like to get (a + b)^2 = a^2 + b^2 + 2ab instead of a^2 + 2ab + b^2 Thank you very much in advance for help to my e-mail george at netvision.net.il. George Szpiro