WOLFRAM LANGUAGE FEATURED EXAMPLE

Collect the Terms of a Polynomial

Collect can collect together the terms of a polynomial.

    
Define a polynomial and collect the powers of :
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
You can also simplify the terms from within Collect:
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=
Use Collect with respect to two variables:
In[5]:=
Click for copyable input
Out[5]=