polynomials - Maple Help

Polynomials

Description

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

${x}^{3}+5{x}^{2}+11x+15$

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

$a≔x{y}^{3}+Iy+\frac{y}{2}$

This is a bivariate polynomial in the variables x and y whose coefficients involve the imaginary number $\sqrt{-1}$ 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

 extract a coefficient of a polynomial return a list of coefficients from a univariate polynomial return a Vector of coefficients from a univariate polynomial construct a sequence of all the coefficients the degree of a polynomial return a univariate polynomial from a Vector of coefficients return a univariate polynomial from list of coefficients the leading coefficient the low degree of a polynomial the trailing coefficient

 • Arithmetic Operations on Polynomials

 multiplication and exponentiation addition and subtraction the content of a polynomial exact polynomial division greatest common divisor of two polynomials least common multiple of two polynomials pseudo-remainder of two polynomials the primitive part of a polynomial quotient of two polynomials remainder of two polynomials

 • Mathematical Operations on Polynomials

 differentiate a polynomial the discriminant of a polynomial integrate a polynomial (indefinite or definite integration) find an interpolating polynomial resultant of two polynomials evaluate a polynomial sum a polynomial (indefinite or definite summation) translate a polynomial

 • Polynomial Root Finding and Factorization

 polynomial factorization over an algebraic number field floating-point approximations to the real or complex roots irreducibility test over an algebraic number field compute isolating intervals for the real roots compute the roots of a polynomial over an algebraic number field complete factorization of a univariate polynomial complete factorization of a univariate polynomial

 • Operations for Regrouping Terms of Polynomials

 group coefficients of like terms together polynomial decomposition distribute products over sums factored normal form sort a polynomial (several options are available) square-free factorization

 • Miscellaneous Polynomial Operations

 the fixed divisor of a univariate polynomial over Z compute the Galois group of a univariate polynomial over Q extended Euclidean algorithm determines if polynomial is self-reciprocal norm of a polynomial computes a^n mod b where a and b are polynomials the square root of a polynomial if it exists generate a random polynomial solves n/d = a mod b for n and d where a, b, n, and d are polynomials

 • Orthogonal and other Special Polynomials

 Bernoulli polynomials Bernstein polynomials Chebyshev polynomials Cyclotomic polynomials Euler polynomials Fibonacci polynomials Hermite polynomials Jacobi polynomials Laguerre polynomials Legendre 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.

Examples

 > $a≔{x}^{3}+5{x}^{2}+11x+15:$
 > $\mathrm{degree}\left(a,x\right)$
 ${3}$ (1)
 > $\mathrm{coeff}\left(a,x,1\right)$
 ${11}$ (2)
 > $\mathrm{coeffs}\left(a,x\right)$
 ${1}{,}{5}{,}{11}{,}{15}$ (3)
 > $\mathrm{subs}\left(x=3,a\right)$
 ${120}$ (4)
 > $\mathrm{type}\left(a,\mathrm{+}\right)$
 ${\mathrm{true}}$ (5)
 > $\mathrm{nops}\left(a\right)$
 ${4}$ (6)
 > $\mathrm{op}\left(1,a\right)$
 ${{x}}^{{3}}$ (7)
 > $\mathrm{op}\left(a\right)$
 ${{x}}^{{3}}{,}{5}{}{{x}}^{{2}}{,}{11}{}{x}{,}{15}$ (8)
 > $\mathrm{factor}\left(a\right)$
 $\left({x}{+}{3}\right){}\left({{x}}^{{2}}{+}{2}{}{x}{+}{5}\right)$ (9)
 > $\mathrm{diff}\left(a,x\right)$
 ${3}{}{{x}}^{{2}}{+}{10}{}{x}{+}{11}$ (10)
 > $\mathrm{convert}\left(a,\mathrm{horner},x\right)$
 ${15}{+}\left({11}{+}\left({5}{+}{x}\right){}{x}\right){}{x}$ (11)