# Square-free factorization: sqrfree

### 5.27.17 Square-free factorization: sqrfree

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 one argument:
  P, a polynomial.
- sqrfree(P) returns the squarefree factorization of P.

#### Examples.

- Input:
  sqrfree((x^2-1)*(x-1)*(x+2))
  Output:

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

- Input:
  sqrfree((x^2-1)^2*(x-1)*(x+2)^2)
  Output:

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