In Maple, polynomials are created from names, integers, and other Maple values using the arithmetic operators +, -, *, and ^. For example, the command a := x^3+5*x^2+11*x+15; creates the polynomial
This is a univariate polynomial in the variable x with integer coefficients. Multivariate polynomials, and polynomials over other number rings and fields are constructed similarly. For example, entering a := x*y^3+sqrt(-1)*y+y/2; creates
This is a bivariate polynomial in the variables x and y whose coefficients involve the imaginary number which is denoted by capital I in Maple.
•
|
The type function can be used to test for polynomials. For example, the type(a, polynom(integer, x)) calling sequence tests whether the expression a is a polynomial in the variable x with integer coefficients. For more information, see type/polynom.
|
•
|
Polynomials in Maple are not automatically stored or printed in sorted order. To sort a polynomial, use the sort command.
|
•
|
The remainder of this file contains a list of operations which are available for polynomials and also a list of special polynomials that Maple accepts.
|
•
|
Utility Functions for Manipulating Polynomials
|
coeff
|
extract a coefficient of a polynomial
|
CoefficientList
|
return a list of coefficients from a univariate polynomial
|
CoefficientVector
|
return a Vector of coefficients from a univariate polynomial
|
coeffs
|
construct a sequence of all the coefficients
|
degree
|
the degree of a polynomial
|
FromCoefficientList
|
return a univariate polynomial from a Vector of coefficients
|
FromCoefficientVector
|
return a univariate polynomial from list of coefficients
|
lcoeff
|
the leading coefficient
|
ldegree
|
the low degree of a polynomial
|
tcoeff
|
the trailing coefficient
|
|
|
•
|
Arithmetic Operations on Polynomials
|
* ^
|
multiplication and exponentiation
|
+ -
|
addition and subtraction
|
content
|
the content of a polynomial
|
divide
|
exact polynomial division
|
gcd
|
greatest common divisor of two polynomials
|
lcm
|
least common multiple of two polynomials
|
prem
|
pseudo-remainder of two polynomials
|
primpart
|
the primitive part of a polynomial
|
quo
|
quotient of two polynomials
|
rem
|
remainder of two polynomials
|
|
|
•
|
Mathematical Operations on Polynomials
|
diff
|
differentiate a polynomial
|
discrim
|
the discriminant of a polynomial
|
int
|
integrate a polynomial (indefinite or definite integration)
|
interp
|
find an interpolating polynomial
|
resultant
|
resultant of two polynomials
|
subs
|
evaluate a polynomial
|
sum
|
sum a polynomial (indefinite or definite summation)
|
Translate
|
translate a polynomial
|
|
|
•
|
Polynomial Root Finding and Factorization
|
factor
|
polynomial factorization over an algebraic number field
|
fsolve
|
floating-point approximations to the real or complex roots
|
irreduc
|
irreducibility test over an algebraic number field
|
realroot
|
compute isolating intervals for the real roots
|
roots
|
compute the roots of a polynomial over an algebraic number field
|
Split
|
complete factorization of a univariate polynomial
|
Splits
|
complete factorization of a univariate polynomial
|
|
|
•
|
Operations for Regrouping Terms of Polynomials
|
collect
|
group coefficients of like terms together
|
compoly
|
polynomial decomposition
|
expand
|
distribute products over sums
|
normal
|
factored normal form
|
sort
|
sort a polynomial (several options are available)
|
sqrfree
|
square-free factorization
|
|
|
•
|
Miscellaneous Polynomial Operations
|
fixdiv
|
the fixed divisor of a univariate polynomial over Z
|
galois
|
compute the Galois group of a univariate polynomial over Q
|
gcdex
|
extended Euclidean algorithm
|
IsSelfReciprocal
|
determines if polynomial is self-reciprocal
|
norm
|
norm of a polynomial
|
powmod
|
computes a^n mod b where a and b are polynomials
|
psqrt
|
the square root of a polynomial if it exists
|
randpoly
|
generate a random polynomial
|
ratrecon
|
solves n/d = a mod b for n and d where a, b, n, and d are polynomials
|
|
|
•
|
Orthogonal and other Special Polynomials
|
•
|
Manipulating Polynomials as Sums of Products of Factors
|
|
Polynomials in Maple are represented as "expression trees" referred to as the "sum of products" representation. In this representation, the type, nops, op, and convert functions can be used to examine, extract, and construct new polynomials. In particular the tests type(a,`+`) and type(a,`*`) test whether the polynomial a is a sum of terms or a product of factors respectively. The nops function gives the number of terms of a sum (factors of a product) and the op function is used to extract the ith term of a sum (factor of a product) respectively. The operation convert(t,`+`) converts the list of terms t to a sum and convert(f,`*`) converts the list of factors f to a product.
|