Type::RatExpr
-- type for
testing rational expressionsWith Type::RatExpr
, rational expressions can be
identified.
testtype(obj,
Type::RatExpr(indet <,
coeff_type>)
)
obj |
- | any MuPAD object |
indet |
- | an indeterminante |
coeff_type |
- | a type for the coefficientes; a type can be an object
of the library Type or
one of the possible return values of domtype and type |
see testtype
testtype(obj,
Type::RatExpr(indet)
) checks, whether obj
is
a rational expression in the indeterminante indet
, i.e.,
the quotient of two polynomial expressions in indet
. If it
is, the result is TRUE
,
otherwise FALSE
.indet
is a MuPAD expression, and indet
occurs only as operand of _plus
or _mult
expressions and in _power
with an integer
exponent.Type::RatExpr(
indet <,
coeff_type>)
.indet
must be an identifier, and coeff_type
a type for
the coefficients of the rational expression.A polynomial expression in x
is also a
rational expression in x
:
>> testtype(-x^2 - x + 3, Type::RatExpr(x))
TRUE
testtype
is used to select all rational operands in
x
with positive integer coefficients:
>> EX := sin(x) + x^2 - 3*x + 2 + 3/x: select(EX, testtype, Type::RatExpr(x, Type::PosInt))
3 2 - + x + 2 x
>> delete EX: