provides many functions to group terms in a polynomial, extract and sort the monomials, display them in various ways, and even process them as arbitrary expression structures.
Group terms that match the pattern; in this case terms that have the same exponential factors are grouped:
to the coefficient of each term after collecting the terms:
There are many ways to extract terms from an expression. Here is a polynomial in
Get the same term by replacing
with zero, thus eliminating all terms that depend on
Get the list of the monomials ordered from high to low powers of
The polynomial will appear in the same order when displayed in TraditionalForm