This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
 Mathematica Tutorial Functions »|Tutorials »

# Finding the Structure of a Polynomial

 PolynomialQ[expr,x] test whether expr is a polynomial in x PolynomialQ[expr,{x1,x2,...}] test whether expr is a polynomial in the xi Variables[poly] a list of the variables in poly Exponent[poly,x] the maximum exponent with which x appears in poly Coefficient[poly,expr] the coefficient of expr in poly Coefficient[poly,expr,n] the coefficient of expr^n in poly Coefficient[poly,expr,0] the term in poly independent of expr CoefficientList[poly,{x1,x2,...}] generate an array of the coefficients of the xi in poly

Finding the structure of polynomials written in expanded form.

Here is a polynomial in two variables.
 Out[1]=
This is the polynomial in expanded form.
 Out[2]=
PolynomialQ reports that t is a polynomial in x.
 Out[3]=
This expression, however, is not a polynomial in x.
 Out[4]=
Variables gives a list of the variables in the polynomial t.
 Out[5]=
This gives the maximum exponent with which x appears in the polynomial t. For a polynomial in one variable, Exponent gives the degree of the polynomial.
 Out[6]=
Coefficient[poly, expr] gives the total coefficient with which expr appears in poly. In this case, the result is a sum of two terms.
 Out[7]=
This is equivalent to Coefficient[t, x^2].
 Out[8]=
This picks out the coefficient of x0 in t.
 Out[9]=
CoefficientList gives a list of the coefficients of each power of x, starting with x0.
 Out[10]=
For multivariate polynomials, CoefficientList gives an array of the coefficients for each power of each variable.
 Out[11]=
It is important to notice that the functions in this section will often work even on polynomials that are not explicitly given in expanded form.
Many of the functions also work on expressions that are not strictly polynomials.
Without giving specific integer values to a, b and c, this expression cannot strictly be considered a polynomial.
 Out[12]=
Exponent[expr, x] still gives the maximum exponent of x in expr, but here has to write the result in symbolic form.
 Out[13]=