COLC
: factorize a symbolic fraction (returns a symbolic)
FROOTS
: input is a fraction, outputs: the list of var (stack
level 3), the list polynomial (2), and the list of root/multiplicity (1)
(each root is followed by its multiplicity). Examples:* 'X^3-6*X^2+11*X-6' -> 3: { X }, 2:'X^3-6*X^2+11*X-6' , 1: { 2 1 3 1 1 1 } * '1/X^2' -> 3: { X }, 2: '1/X^2', 1: { 0 -2 } * 'X^2-Y^2' -> 3: { X Y }, 2: 'X^2+2*X*Y+Y^2', 1: { '-Y' 2 }For a symbolic,
FROOTS
factorizes with respect to the variable contained
in VX
, or if the symbolic is independant of VX
with respect
to the first variable of LVAR
applied to the symbolic.
If stack 1 is a real integer, FROOTS
computes the roots of a
list polynomial with numeric coefficient using Bairstow method (real
coefficients) or Laguerre method (complex coefficients).
During iterations, you can modify some parameters:
E*10
: ( )
multiplies the test value by 10, use this when there are multiple roots.
E/10
: divides the test value/10, for accurate precision
(use this after you have found all multiple roots)
RAND
: reset current iteration (restart with random initial value)
STOP
abort iteration (for the next one or two roots)
{ 1 -21 183 -847 2196 -3024 1728 } 1E-4 3 FROOTS -> approximatively { 3 3 3 4 4 4 }The result is bad since 3 and 4 are multiple roots.
FACTO
: same stack as FROOT
but returns a list of
"prime" factors instead of roots. Example:* 'X^3-6*X^2+11*X-6' -> 3: { X }, 2: 'X^3-6*X^2+11*X-6', 1: { '(X-2)' 1 '(X-3)' 1 '(X-1)' 1 } * 21 -> 3: { }, 2: 21, 1: { 3 1 7 1 }
FCOEF
: input is a list of roots/multiplicity, output is a
fraction or polynomial with leading coefficient 1 having this roots
(and poles). Example:{ 1 1 2 1 3 1 } -> 'X^3-6*X^2+11*X-6'
{ A -1 2 1 } -> '(X-2)/(X-A)'