convert/horner
Calling Sequence
Parameters
Description
Examples
convert(f, 'horner', x)
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
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.
convert⁡x2+3⁢x+4,horner,x
4+3+x⁢x
poly≔y2⁢x2+2⁢x⁢y2+2⁢x2⁢y+x2+2⁢x
poly≔y2⁢x2+2⁢x2⁢y+2⁢x⁢y2+x2+2⁢x
convert⁡poly,horner,x
2⁢y2+2+y2+2⁢y+1⁢x⁢x
convert⁡poly,horner,x,y
2⁢y2+2+1+2+y⁢y⁢x⁢x
convert⁡poly,horner,y,x
2+x⁢x+2⁢x2+2+x⁢x⁢y⁢y
convert⁡xi2−3⁢xi+24⁢xi−2⁢xi3−2+xi2,horner
2+−3+xi⁢xi−2+4+1−2⁢xi⁢xi⁢xi
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
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
2−b6+−5+3⁢b⁢b,−1+1+−2+3⁢b⁢b⁢b
See Also
convert
frontend
Download Help Document