This is documentation for Mathematica 4, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
Wolfram Research, Inc.

Structural Operations on PolynomialsStructural Operations on Rational Expressions

3.3.2 Finding the Structure of a Polynomial

Finding the structure of polynomials written in expanded form.

Here is a polynomial in two variables.

In[1]:= t = (1 + x)^3 (1 - y - x)^2


This is the polynomial in expanded form.

In[2]:= Expand[t]


PolynomialQ reports that t is a polynomial in x.

In[3]:= PolynomialQ[t, x]


This expression, however, is not a polynomial in x.

In[4]:= PolynomialQ[x + Sin[x], x]


Variables gives a list of the variables in the polynomial t.

In[5]:= Variables[t]


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.

In[6]:= Exponent[t, x]


Coefficient[poly, expr] gives the total coefficient with which expr appears in poly. In this case, the result is a sum of two terms.

In[7]:= Coefficient[t, x^2]


This is equivalent to Coefficient[t, x^2].

In[8]:= Coefficient[t, x, 2]


This picks out the coefficient of in t.

In[9]:= Coefficient[t, x, 0]


CoefficientList gives a list of the coefficients of each power of , starting with .

In[10]:= CoefficientList[1 + 3x^2 + 4x^4, x]


For multivariate polynomials, CoefficientList gives an array of the coefficients for each power of each variable.

In[11]:= CoefficientList[t, {x, y}]


It is important to notice that the functions in this section will 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.

In[12]:= x^a + x^b + y^c


Exponent[expr, x] still gives the maximum exponent of x in expr, but here has to write the result in symbolic form.

In[13]:= Exponent[%, x]


Structural Operations on PolynomialsStructural Operations on Rational Expressions