6.27.18 List of factors:
factors
The
factors
command provides the factors of a polynomial as a list.
factors
takes one argument:
P
, a polynomial or a list of polynomials.
factors(
P
)
returns a list containing the factors of
P
and their exponents, or a list of such lists.
Examples.
Input:
factors(x^2+2*x+1)
Output:
⎡
⎣
x
+1,2
⎤
⎦
Input:
factors(x^4-2*x^2+1)
Output:
⎡
⎣
x
−1,2,
x
+1,2
⎤
⎦
Input:
factors([x^3-2*x^2+1,x^2-x])
Output:
⎡
⎢
⎣
x
−1
1
x
2
−
x
−1
1
x
1
x
−1
1
⎤
⎥
⎦
Input:
factors([x^2,x^2-1])
Output:
⎡
⎣
⎡
⎣
x
,2
⎤
⎦
,
⎡
⎣
x
−1,1,
x
+1,1
⎤
⎦
⎤
⎦