Dom
::UnivariatePolynomial
Domains of univariate polynomials
MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
Dom::UnivariatePolynomial(<Var, <R, <Order>>
>)
Dom::UnivariatePolynomial(Var, R, Order)(p
)
Dom::UnivariatePolynomial(Var, R, Order)(lm
)
Dom::UnivariatePolynomial(Var, R, ..)
creates
the domain of univariate polynomials in the variable Var
over
the commutative ring R
.
Dom::UnivariatePolynomial
represents univariate
polynomials over arbitrary commutative rings.
All usual algebraic and arithmetical polynomial operations are implemented, including Gröbner basis computations.
Dom::UnivariatePolynomial(Var, R, Order)
creates
a domain of univariate polynomials in the variable Var
over
a domain of category Cat::CommutativeRing
in
sparse representation with respect to the monomial ordering Order
.
Dom::UnivariatePolynomial()
creates the univariate
polynomial domain in the variable x
over the domain Dom::ExpressionField
(normal)
with
respect to the lexicographic monomial ordering.
Dom::UnivariatePolynomial(Var)
creates the
univariate polynomial domain in the variable Var
over
the domain Dom::ExpressionField
(normal)
with
respect to the lexicographic monomial ordering.
Only commutative coefficient rings of type DOM_DOMAIN
which
inherit from Dom::BaseDomain
are
allowed. If R
is of type DOM_DOMAIN
but inherits
not from Dom::BaseDomain
,
the domain Dom::ExpressionField
(normal)
will
be used instead.
For this domain only identifiers are valid variables.
It is highly recommend to use only coefficient rings with unique zero representation. Otherwise it may happen that, e.g., a polynomial division will not terminate or a wrong degree will be returned.
Please note that for reasons of efficiency not all methods check their arguments, not even at the interactive level. In particular this is true for many access methods, converting methods and technical methods. Therefore, using these methods inappropriately may result in strange error messages.
To create the ring of univariate polynomials in x
over
the integers one may define
UP:=Dom::UnivariatePolynomial(x,Dom::Integer)
Now, let us create two univariate polynomials.
a:=UP((2*x1)^2*(3*x+1))
b:=UP(((2*x1)*(3*x+1))^2)
The usual arithmetical operations for polynomials are available:
a^2+a*b
The leading coefficient, leading term, leading monomial and
reductum of a
are
lcoeff(a),lterm(a),lmonomial(a),UP::reductum(a)
and a
is of degree
degree(a)
The method gcd
computes the greatest common
divisor of two polynomials
gcd(a,b)
and lcm
the least common multiple:
lcm(a,b)
Computing the definite and indefinite integral of a polynomial is also possible,
int(a)
which is in the case of indefinite integration simply the antiderivative of the polynomial.
D(int(a)), domtype(D(int(a)))
But, since for representing the indefinite integral of a
the
coefficient ring chosen as the integers is not appropriate, the polynomial
ring over its quotient field is used instead.
Furthermore, interpreting the polynomials as polynomial functions
is also allowed in applying coefficient ring elements, polynomials
of this domain or arbitrary expressions with option Expr
to
them:
a(5)
a(b)
a(sin(x),Expr)
To get a vector of coefficients of a polynomial, which gives
the dense representation of it, one may use the method vectorize
.
UP::vectorize(a), UP::vectorize(a,6)

An indeterminate given by an identifier; default is 

A commutative ring, i.e. a domain of category 

A monomial ordering, i.e. one of the predefined orderings 

A polynomial or a polynomial expression. 

List of monomials, which are represented as lists containing the coefficients together with the exponents or exponent vectors. 
"characteristic"  The characteristic of this domain. 
"coeffRing"  The coefficient ring of this domain as defined by the
parameter 
"key"  The name of the domain created. 
"one"  The neutral element w.r.t. 
"ordering"  The monomial order as defined by the parameter 
"variables"  The list of the variable as defined by the parameter 
"zero"  The neutral element w.r.t. 