# Square-free polynomial

In mathematics, a square-free polynomial is a polynomial defined over a field (or more generally, an integral domain) that does not have as a divisor any square of a non-constant polynomial.[1] A univariate polynomial is square free if and only if it has no multiple root in an algebraically closed field containing its coefficients. This motivates that, in applications in physics and engineering, a square-free polynomial is commonly called a polynomial with no repeated roots.

In the case of univariate polynomials, the product rule implies that, if p2 divides f, then p divides the formal derivative f' of f. The converse is also true in characteristic zero, and for polynomials over a finite field (or, more generally, over a perfect field). That is, in these cases, a polynomial is square free if and only if 1 is a greatest common divisor of the polynomial and its derivative.

A square-free decomposition or square-free factorization of a polynomial is a factorization into powers of square-free polynomials

${\displaystyle f=a_{1}a_{2}^{2}a_{3}^{3}\cdots a_{n}^{n}=\prod _{k=1}^{n}a_{k}^{k}\,}$

where those of the ak that are non-constant are pairwise coprime square-free polynomials (here, two polynomials are said coprime is their greatest common divisor is a constant; in other words that is the coprimality over the field of fractions of the coefficients that is considered).[1] Every non-zero polynomial admits a square-free factorization, which is unique up to the multiplication and division of the factors by non-zero constants. The square-free factorization is much easier to compute than the complete factorization into irreducible factors, and is thus often preferred when the complete factorization is not really needed, as for the partial fraction decomposition and the symbolic integration of rational fractions. Square-free factorization is the first step of the polynomial factorization algorithms that are implemented in computer algebra systems. Therefore, the algorithm of square-free factorization is basic in computer algebra.

Over a field of characteristic 0, the quotient of ${\displaystyle f}$ by its GCD with its derivative is the product of the ${\displaystyle a_{i}}$ in the above square-free decomposition. Over a perfect field of non-zero characteristic p, this quotient is the product of the ${\displaystyle a_{i}}$ such that i is not a multiple of p. Further GCD computations and exact divisions allow computing the square-free factorization (see square-free factorization over a finite field). In characteristic zero, a better algorithm is known, Yun's algorithm, which is described below.[1] Its computational complexity is, at most, twice that of the GCD computation of the input polynomial and its derivative. More precisely, if ${\displaystyle T_{n}}$ is the time needed to compute the GCD of two polynomials of degree ${\displaystyle n}$ and the quotient of these polynomial by the GCD, then ${\displaystyle 2T_{n}}$ is an upper bound for the time needed to compute the square free decomposition.

There are also known algorithms for the computation of the square-free decomposition of multivariate polynomials, that proceed generally by considering a multivariate polynomial as a univariate polynomial with polynomial coefficients, and applying recursively a univariate algorithm.[2]