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

Online Help

All Products    Maple    MapleSim


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

Compatibility

Calling Sequence

FromCoefficientList(L, vars, opts)

FromCoefficientVector(L, vars, opts)

Parameters

L

-

list of coefficients

var

-

name,list for the polynomial variable(s)

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, vars) calling sequence returns a polynomial in vars from a list of coefficients.

• 

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

• 

These are inverse commands to CoefficientList and CoefficientVector.

• 

FromCoefficientVector is written to handle sparse Vector inputs efficiently.

• 

These commands now support polynomials in many variables.

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)

FromCoefficientList7,22,55,94,87,56,x,y

94x2+87xy56y2+22x55y7

(4)

FromCoefficientVectory3,y2,y2,1,x

y3y2x+y2x2+x3

(5)

FromCoefficientList,x

0

(6)

FromCoefficientVectorCoefficientVector0,x,x

0

(7)

Most vector shapes will be handled efficiently

v1Vector500000001,shape=unit300:

FromCoefficientVectorv1,x

x299

(8)

v2Vector200000001,shape=scalar50000,a:

FromCoefficientVectorv2,x

ax49999

(9)

v3Vector10,shape=constantb21:

FromCoefficientVectorv3,x

b21+b21x+b21x2+b21x3+b21x4+b21x5+b21x6+b21x7+b21x8+b21x9

(10)

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

FromCoefficientVectorv4,x

x1000000000+5

(11)

Compatibility

• 

The  option was updated in Maple 2021.

See Also

convert,horner

PolynomialTools

PolynomialTools[CoefficientVector]

Vector