 polynom - Maple Help

# Online Help

###### All Products    Maple    MapleSim

type/polynom

check for a polynomial Calling Sequence type(a, polynom) type(a, polynom(d)) type(a, polynom(d, v)) Parameters

 a - any expression d - (optional) type name for the coefficient domain v - (optional) variable(s) Description

 • The call type(a, polynom(d, v)) checks to see if a is a polynomial in the variables v with coefficients in the domain d. A typical calling sequence is

$\mathrm{type}\left(a,\mathrm{polynom}\left(\mathrm{integer},x\right)\right)$

 which tests to see if a is a polynomial in x over the integers.
 • The parameter v can be a single indeterminate, or can be a list or set of indeterminates. The latter case tests for a multivariate polynomial.
 • If v is omitted, then it is taken to be a set of all the indeterminates of type name appearing in a.  Thus the function will check that a is a polynomial in all of its variables.
 • The domain specification d should be a type name, such as rational or algnum (algebraic number).  If the domain specification is given as anything then no restriction is placed on the coefficients.  If d is omitted, then it defaults to type constant. Examples

 > $\mathrm{type}\left({x}^{2}+y-z,\mathrm{polynom}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\mathrm{sin}\left(x\right)+y,\mathrm{polynom}\left(\mathrm{anything},x\right)\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{type}\left(\mathrm{sin}\left(x\right)+y,\mathrm{polynom}\left(\mathrm{anything},y\right)\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(f\left(1\right)x+{2}^{\frac{1}{2}},\mathrm{polynom}\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{type}\left({x}^{2}+\frac{{y}^{3}}{3},\mathrm{polynom}\left(\mathrm{anything},\left[x,y\right]\right)\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{type}\left(x+\frac{1}{2},\mathrm{polynom}\left(\mathrm{integer}\right)\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{type}\left(x+\frac{1}{2},\mathrm{polynom}\left(\mathrm{rational}\right)\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{type}\left({\mathrm{sin}\left(x\right)}^{2}+\frac{1}{2}\mathrm{sin}\left(x\right),\mathrm{polynom}\left(\mathrm{rational}\right)\right)$
 ${\mathrm{false}}$ (8)
 > $\mathrm{type}\left({\mathrm{sin}\left(x\right)}^{2}+\frac{1}{2}\mathrm{sin}\left(x\right),\mathrm{polynom}\left(\mathrm{rational},\mathrm{sin}\left(x\right)\right)\right)$
 ${\mathrm{true}}$ (9)

 See Also