Square-free polynomial explained
In mathematics, a square-free polynomial is a univariate polynomial (over a field or an integral domain) that has no multiple root in an algebraically closed field containing its coefficients. In characteristic 0, or over a finite field, a univariate polynomial is square free if and only if does not have as a divisor any square of a non-constant polynomial.[1] In applications in physics and engineering, a square-free polynomial is commonly called a polynomial with no repeated roots.
The product rule implies that, if divides, then divides the formal derivative of . The converse is also true and hence,
is square-free if and only if
is a
greatest common divisor of the polynomial and its derivative.
[2] A square-free decomposition or square-free factorization of a polynomial is a factorization into powers of square-free polynomials
where those of the 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
by its greatest common divisor (GCD) with its derivative is the product of the
in the above square-free decomposition. Over a
perfect field of non-zero characteristic, this quotient is the product of the
such that is not a multiple of . 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
is the time needed to compute the GCD of two polynomials of degree
and the quotient of these polynomials by the GCD, then
is an upper bound for the time needed to compute the complete square free decomposition.
There are also known algorithms for 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.[3]
Yun's algorithm
This section describes Yun's algorithm for the square-free decomposition of univariate polynomials over a field of characteristic 0.[1] It proceeds by a succession of GCD computations and exact divisions.
The input is thus a non-zero polynomial f, and the first step of the algorithm consists of computing the GCD a0 of f and its formal derivative f.
If
is the desired factorization, we have thus
and
f'/a0=
iai'a1 … ai-1ai+1 … ak.
If we set
,
and
, we get that
and
c2=d1/a1=
(i-1)ai'a2 … ai-1ai+1 … ak.
Iterating this process until
we find all the
This is formalized into an algorithm as follows:
The degree of
and
is one less than the degree of
As
is the product of the
the sum of the degrees of the
is the degree of
As the complexity of GCD computations and divisions increase more than linearly with the degree, it follows that the total running time of the "repeat" loop is less than the running time of the first line of the algorithm, and that the total running time of Yun's algorithm is upper bounded by twice the time needed to compute the GCD of
and
and the quotient of
and
by their GCD.
Square root
In general, a polynomial has no square root. More precisely, most polynomials cannot be written as the square of another polynomial.
A polynomial has a square root if and only if all exponents of the square-free decomposition are even. In this case, a square root is obtained by dividing these exponents by 2.
Thus the problem of deciding if a polynomial has a square root, and of computing it if it exists, is a special case of square-free factorization.
Notes and References
- Book: Yun, David Y.Y. . On square-free decomposition algorithms . 10.1145/800205.806320 . https://dl.acm.org/doi/10.1145/800205.806320 . SYMSAC '76 Proceedings of the third ACM Symposium on Symbolic and Algebraic Computation . Association for Computing Machinery . 1976 . 978-1-4503-7790-4 . 26–35 . 12861227 .
- Book: Dummit . David S. . Foote . Richard M. . Abstract Algebra . 2004 . 978-81-265-3228-5 . 547.
- Gianni . P.. Patrizia Gianni . Trager . B. . Square-Free Algorithms in Positive Characteristic . Applicable Algebra in Engineering, Communication and Computing . 7 . 1 . 1–14 . 1996 . 10.1007/BF01613611 . 36886948 .