Polynomial (SymPy, WMA)
PolynomialQ[expr]
PolynomialQ[expr, var]
PolynomialQ[expr, {var1, ...}]
PolynomialQ
with no explicit variable mentioned:
PolynomialQ[x^2]
A number is a degenerate kind of polynomial:
PolynomialQ[2]
The following is not a polynomial because y is raised to the power -1:
PolynomialQ[x^2 + x/y]
PolynomialQ
using an expression and a single variable:
PolynomialQ[x^3 - 2 x/y + 3xz, x]
In the above, there were no negative powers for x. In the below when we check with respect to y, we do find y is raised to a negative power:
PolynomialQ[x^3 - 2 x/y^2 + 3xz, y]
PolynomialQ[f[a] + f[a]^2, f[a]]
PolynomialQ
using an expression and a list of variables:
PolynomialQ[x^2 + axy^2 - bSin[c], {x, y}]
PolynomialQ[x^2 + axy^2 - bSin[c], {a, b, c}]