Is there some function in Maple which can compute the number of monomials in a polynomial?

124 Views Asked by At

Is there some function $f$ in Maple which can compute the number of monomials in a polynomial? For example, $f(x_{1,2})=1, f(x_{1,2}+3x_{3,2}x_{2,5})=2$. Thank you very much.

1

There are 1 best solutions below

0
On BEST ANSWER

If p is the polynomial, use nops([coeffs(p)]). In other words, counting the monomials is equivalent to counting the coefficients.