### 11.1.20 List of factors

The factors command provides the factors of a polynomial as a list.

- factors takes 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

factors(x^2+2*x+1)

| ⎡ ⎣ | x+1,2 | ⎤ ⎦

factors(x^4-2*x^2+1)

| ⎡ ⎣ | x−1,2,x+1,2 | ⎤ ⎦

factors([x^3-2*x^2+1,x^2-x])

⎡
⎢
⎣

x−1 | 1 | x2−x−1 | 1
x | 1 | x−1 | 1

⎤
⎥
⎦

factors([x^2,x^2-1])

| ⎡ ⎣ | ⎡ ⎣ | x,2 | ⎤ ⎦ | , | ⎡ ⎣ | x−1,1,x+1,1 | ⎤ ⎦ | ⎤ ⎦