 type/ratpoly - Maple Programming Help

Home : Support : Online Help : Programming : Data Types : Type Checking : Types : type/ratpoly

type/ratpoly

check for a rational polynomial

 Calling Sequence type(expr, ratpoly) type(expr, ratpoly(K)) type(expr, ratpoly(K, v))

Parameters

 expr - any expression K - type name for the coefficient domain v - variable(s)

Description

 • The call type(expr, ratpoly(K, v)) checks to see if expr is a rational function in the variables v with coefficients in the domain K.
 • A typical calling sequence would be type(a, ratpoly(integer, x)) which tests to see if a is a rational polynomial in x over the integers.
 • The variable(s) v can be a single indeterminate or a list or set of indeterminates.  If v is omitted, then it defaults to a list of all indeterminates of type name in expr.
 • The domain specification K is a type name such as integer or algnum (algebraic number). If the domain specification is omitted, then it defaults to type constant.

Examples

 > $\mathrm{type}\left(\frac{1+x}{1-y},\mathrm{ratpoly}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{type}\left(\frac{1+\mathrm{sin}\left(x\right)}{y},\mathrm{ratpoly}\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{type}\left(\frac{1+\mathrm{sin}\left(x\right)}{y},\mathrm{ratpoly}\left(\mathrm{anything},y\right)\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{type}\left(\frac{1}{f\left(1\right)}+\frac{1}{x},\mathrm{ratpoly}\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{type}\left(\mathrm{sin}\left(z\right)-\frac{\mathrm{cos}\left(z\right)}{x},\mathrm{ratpoly}\left(\mathrm{anything},x\right)\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{type}\left(x+\mathrm{sqrt}\left(2\right){x}^{2},\mathrm{ratpoly}\left(\mathrm{radnum}\right)\right)$
 ${\mathrm{true}}$ (6)