Collect the Terms of a Polynomial

Collect can collect together the terms of a polynomial.

    
Define a polynomial and collect the powers of :
In[40]:=
Click for copyable input
Out[40]=
In[41]:=
Click for copyable input
Out[41]=
You can also simplify the terms from within Collect:
In[23]:=
Click for copyable input
Out[23]=
In[24]:=
Click for copyable input
Out[24]=
Use Collect with respect to two variables:
In[36]:=
Click for copyable input
Out[36]=
New to Mathematica? Find your learning path »
Have a question? Ask support »