Documentation |
Domains of univariate polynomials
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.
Note: 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.
Note: 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*x-1)^2*(3*x+1))
b:=UP(((2*x-1)*(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)
Var |
An indeterminate given by an identifier; default is x. |
R |
A commutative ring, i.e. a domain of category Cat::CommutativeRing; default is Dom::ExpressionField(normal). |
Order |
A monomial ordering, i.e. one of the predefined orderings LexOrder, DegreeOrder or DegInvLexOrder or an element of domain Dom::MonomOrdering; default is LexOrder. |
p |
A polynomial or a polynomial expression. |
lm |
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 R. |
"key" | The name of the domain created. |
"one" | The neutral element w.r.t. "_mult". |
"ordering" | The monomial order as defined by the parameter Order. |
"variables" | The list of the variable as defined by the parameter Var. |
"zero" | The neutral element w.r.t. "_plus". |