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
Now, let us create two univariate polynomials.
The usual arithmetical operations for polynomials are available:
The leading coefficient, leading term, leading monomial and reductum of a are
and a is of degree
The method gcd computes the greatest common divisor of two polynomials
and lcm the least common multiple:
Computing the definite and indefinite integral of a polynomial is also possible,
which is in the case of indefinite integration simply the antiderivative of the polynomial.
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:
To get a vector of coefficients of a polynomial, which gives the dense representation of it, one may use the method vectorize.
An indeterminate given by an identifier; default is x.
A commutative ring, i.e. a domain of category Cat::CommutativeRing; default is Dom::ExpressionField(normal).
A monomial ordering, i.e. one of the predefined orderings LexOrder, DegreeOrder or DegInvLexOrder or an element of domain Dom::MonomOrdering; default is LexOrder.
A polynomial or a polynomial expression.
List of monomials, which are represented as lists containing the coefficients together with the exponents or exponent vectors.
The characteristic of this domain.
The coefficient ring of this domain as defined by the parameter R.
The name of the domain created.
The neutral element w.r.t. "_mult".
The monomial order as defined by the parameter Order.
The list of the variable as defined by the parameter Var.
The neutral element w.r.t. "_plus".
coeff(a, Var, n)
coeff(a, Var, n) returns the coefficient of the term Var^n as an element of R.
coeff(a, n) returns the coefficient of the term Var^n as an element of R.
This method overloads the function coeff for polynomials.