### 11.1.19 Square-free factorization

The sqrfree command provides squarefree factorizations of polynomials; that is, it factors a polynomial as a product of powers of coprime factors, where each factor has roots of multiplicity 1 (in other words, a factor and its derivative are coprime).

- sqrfree takes P, a polynomial.
- sqrfree(P) returns the squarefree factorization of P.

#### Examples

sqrfree((x^2-1)*(x-1)*(x+2))

| ⎛ ⎝ | x2+3 x+2 | ⎞ ⎠ | ⎛ ⎝ | x−1 | ⎞ ⎠ | 2

sqrfree((x^2-1)^2*(x-1)*(x+2)^2)

| ⎛ ⎝ | x2+3 x+2 | ⎞ ⎠ | 2 | ⎛ ⎝ | x−1 | ⎞ ⎠ | 3