PolynomialTools - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Algebra : Polynomials : PolynomialTools : PolynomialTools/FromCoefficientList

PolynomialTools

  

FromCoefficientVector

  

return a univariate polynomial from a Vector of coefficients

  

FromCoefficientList

  

return a univariate polynomial from list of coefficients

 

Calling Sequence

Parameters

Options

Description

Examples

Calling Sequence

FromCoefficientList(L, x, opts)

FromCoefficientVector(L, x, opts)

Parameters

L

-

list of coefficients

x

-

name for the polynomial variable

opts

-

(optional) equations of the form option=value (see below)

Options

• 

termorder = forward, reverse

  

By default, the first entry of the output will be the constant coefficient of the polynomial.  If reverse is specified, the last entry of the output will be the constant coefficient.

• 

form = monomial, horner

  

The polynomial is constructed in standard monomial form by default, but can be created in Horner form also known as nested multiplication form.

Description

• 

The FromCoefficientList(L, x) calling sequence returns a polynomial in x from a list of coefficients.  

• 

The FromCoefficientVector(L, x) calling sequence returns a polynomial in x from a vector of coefficients.  

• 

These are inverse commands to CoefficientList and CoefficientVector.

• 

FromCoefficientVector is written to handle sparse Vector inputs efficiently.

Examples

withPolynomialTools:

FromCoefficientList1,1,2,3,x

3x3+2x2x+1

(1)

FromCoefficientList1,1,2,3,x,form=horner

x1+x2+3x+1

(2)

FromCoefficientList1,0,0,2,0,x,termorder=reverse

x4+2x

(3)

FromCoefficientVectory3,y2,y2,1,x

y3y2x+y2x2+x3

(4)

FromCoefficientList,x

0

(5)

FromCoefficientVectorCoefficientVector0,x,x

0

(6)

Most vector shapes will be handled efficiently

v1Vector500000001,shape=unit[300]:

FromCoefficientVectorv1,x

x300

(7)

v2Vector200000001,shape=scalar[50000,a]:

FromCoefficientVectorv2,x

ax50000

(8)

v3Vector10,shape=constant[b21]:

FromCoefficientVectorv3,x

b21x9+x8+x7+x6+x5+x4+x3+x2+x+1

(9)

v4Vector1000000001,1=5,1000000001=1,storage=sparse:

FromCoefficientVectorv4,x

x1000000000+5

(10)

See Also

convert,horner

PolynomialTools

PolynomialTools[CoefficientVector]

Vector

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam