polynomials - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Polynomials

 

Description

Examples

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

x3+5x2+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

axy3+Iy+y2

This is a bivariate polynomial in the variables x and y whose coefficients involve the imaginary number −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

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

bernoulli

Bernoulli polynomials

bernstein

Bernstein polynomials

chebyshev

Chebyshev polynomials

CyclotomicPolynomial

Cyclotomic polynomials

euler

Euler polynomials

fibonacci

Fibonacci polynomials

hermite

Hermite polynomials

jacobi

Jacobi polynomials

laguerre

Laguerre polynomials

legendre

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

ax3+5x2+11x+15:

degreea,x

3

(1)

coeffa,x,1

11

(2)

coeffsa,x

1,5,11,15

(3)

subsx=3,a

120

(4)

typea,`+`

true

(5)

nopsa

4

(6)

op1,a

x3

(7)

opa

x3,5x2,11x,15

(8)

factora

x+3x2+2x+5

(9)

diffa,x

3x2+10x+11

(10)

converta,horner,x

15+11+5+xxx

(11)

See Also

convert

CurveFitting[PolynomialInterpolation]

indets

PolynomialTools

ratpoly

RootOf

series

sort

type