Why is PolynomialQ[y^2,x] True? The documentation says PolynomialQ[] returns True only if the first argument is a polynomial in the variable(s) specified in the second argument. There must be a nuance I don't get.

  • 4
    $\begingroup$ y^2 is a constant polynomial considered as a polynomial with respect to x, e.g. it is written usually as $a_0$. When you write PolynomialQ[y[x]^2, x] you'll get false. $\endgroup$
    – Artes
    Commented Oct 24, 2021 at 23:01
  • $\begingroup$ Thanks, Artes. That makes sense. Is there a way to identify polynomials using specific independent variables? Say I have a list of polynomials, all of which use some combination of, say, three variables x, y and z. The only way I know to eliminate the ones with, say, x, is not very elegant. Is there an easy way to delete the polynomials I don't want based on which variables they use? It's for an algebraic geometry course in which we're using polynomial partial ideals. $\endgroup$
    – crabtree
    Commented Oct 25, 2021 at 1:04
  • $\begingroup$ I guess you should ask another question. To adress problems unambiguously you have to demonstrate a piece of code that could be improved. $\endgroup$
    – Artes
    Commented Oct 25, 2021 at 9:25
  • $\begingroup$ Thanks again, Artes. $\endgroup$
    – crabtree
    Commented Oct 25, 2021 at 16:22


Browse other questions tagged or ask your own question.