Horner form - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


convert/horner

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

convert(f, 'horner', x)

Parameters

f

-

polynomial or rational function in x, or set, list or relation of these; expression to be converted

x

-

(optional) name, list of names or set of names; the variable or variables with respect to which the conversion is performed

Description

• 

The convert(f, 'horner', x) command converts the input to horner form with respect to x, or the names in x if this argument is a list or set.

• 

If x is omitted, it is taken as indets(f,name).

• 

If x is given as a list or set of names, the conversion is applied recursively to the coefficients of f in the first variable given.  A list allows for control over the order of the conversions.

• 

If f is a set, list or relation, the result is map(convert, f, 'horner', x).

• 

Any subexpressions of f which are not either polynomials or rational functions in x are frozen via a call to frontend prior to conversion.

Examples

> 

convert⁡x2+3⁢x+4,horner,x

4+3+x⁢x

(1)
> 

poly≔y2⁢x2+2⁢x⁢y2+2⁢x2⁢y+x2+2⁢x

poly≔y2⁢x2+2⁢x2⁢y+2⁢x⁢y2+x2+2⁢x

(2)
> 

convert⁡poly,horner,x

2⁢y2+2+y2+2⁢y+1⁢x⁢x

(3)
> 

convert⁡poly,horner,x,y

2⁢y2+2+1+2+y⁢y⁢x⁢x

(4)
> 

convert⁡poly,horner,y,x

2+x⁢x+2⁢x2+2+x⁢x⁢y⁢y

(5)
> 

convert⁡xi2−3⁢xi+24⁢xi−2⁢xi3−2+xi2,horner

2+−3+xi⁢xi−2+4+1−2⁢xi⁢xi⁢xi

(6)
> 

convert⁡a3+3⁢a2⁢sin⁡t−a⁢cos⁡t+1+sqrt⁡a=1−a⁢tan⁡t+a2,horner,a

a+1+−cos⁡t+3⁢sin⁡t+a⁢a⁢a=1+−tan⁡t+a⁢a

(7)
> 

convert⁡3⁢b3−2⁢b2+b−1,2−b3⁢b2−5⁢b+6,horner

−1+1+−2+3⁢b⁢b⁢b,2−b6+−5+3⁢b⁢b

(8)
> 

convert⁡3⁢b3−2⁢b2+b−1,2−b3⁢b2−5⁢b+6,horner

2−b6+−5+3⁢b⁢b,−1+1+−2+3⁢b⁢b⁢b

(9)

See Also

convert

frontend