This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Programming / Tests  /
PolynomialQ

  • PolynomialQ[ expr , var ] yields True if expr is a polynomial in var, and yields False otherwise.
  • PolynomialQ[ expr , , ... ] tests whether expr is a polynomial in the .
  • The need not be symbols; PolynomialQ[f[a] + f[a]^2, f[a]].
  • See the Mathematica book: Section 2.3.5Section 3.3.2.
  • See also: Collect, Series.

    Further Examples

    Is the expression a polynomial?

    In[1]:=

    Out[1]=

    In[2]:=

    Out[2]=

    Is the expression a polynomial in the variable that is in the second argument?

    In[3]:=

    Out[3]=

    In[4]:=

    Out[4]=

    This expression is not a polynomial over the integers, but it is over the integers modulo .

    In[5]:=

    Out[5]=

    In[6]:=

    Out[6]=