factors
factor a multivariate polynomial
Calling Sequence
Parameters
Description
Examples
References
Compatibility
factors(a)
factors(a, K)
factors(f, method="Wang")
a
-
multivariate polynomial
K
field extension over which to factor
f
multivariate polynomial with rational coefficients
method
(optional) equation method="Wang"
The factors command computes the factorization of a multivariate polynomial over the rationals, an algebraic number field, and with real or complex numeric coefficients.
Unlike the factor function where the input is any expression and the output is a product of sums in the general case, the input to the factors function must be a polynomial or a rational function, and the output is a data structure more suitable for programming purposes.
The factorization is returned in the form u,f1,m1,...,fn,mn where a=u⁢f1m1...fnmn where each fk (the factor) is a unit normal irreducible polynomial and each mk (its multiplicity) is a positive integer.
For multivariate polynomials with integer coefficients, the factors command offers two algorithms: Wang's algorithm (see [Wang78]) and the algorithm by Monagan and Tuncer ([MT16], [MT18]). The default is the latter, since it is faster on most examples. To explicitly request Wang's algorithm, which was the default in Maple 2018 and earlier versions, use the option method="Wang".
The call factors(a) factors over the field implied by the coefficients present: thus, if all the coefficients are rational, then the polynomial is factored over the rationals.
If the second argument K is the keyword real or complex, a floating-point factorization is performed over R and C respectively. Note, at present this is only implemented for univariate polynomials.
The call factors(a, K) factors the polynomial a over the algebraic number field defined by K. K must be a single RootOf, a list or set of RootOfs, a single radical, or a list or set of radicals.
factors⁡3⁢x2+6⁢x+3
3,x+1,2
factors⁡x4−4
1,x2+2,1,x2−2,1
factors⁡x4−4.0
1,x−1.414213562,1,x+1.414213562,1,x2+1.999999999,1
factors⁡x4−4,sqrt⁡2
1,x+2,1,x2+2,1,x−2,1
factors⁡x4−4,I,sqrt⁡2
1,x+I⁢2,1,−I⁢2+x,1,x+2,1,x−2,1
alias⁡α=RootOf⁡x2−2:
alias⁡β=RootOf⁡x2+2:
factors⁡x4−4,α
1,x+α,1,x−α,1,x2+2,1
factors⁡x4−4,β
1,x+β,1,x2−2,1,x−β,1
factors⁡x4−4,α,β
1,x+β,1,x+α,1,x−α,1,x−β,1
factors⁡x4−4,real
factors⁡x4−4,complex
1,x+1.414213562⁢I,1,x−1.414213562,1,x−1.414213562⁢I,1,x+1.414213562,1
The following is an example that has a rational function as input.
q≔expand⁡z−1⁢z−3expand⁡z−2⁢z−4
q≔z2−4⁢z+3z2−6⁢z+8
factors⁡q
1,z−4,−1,z−1,1,z−2,−1,z−3,1
Mark van Hoeij, Factoring polynomials and the knapsack problem. Journal of Number Theory, 95, 167-189, (2002).
[MT16] Michael Monagan and Baris Tuncer. Using Sparse Interpolation in Hensel Lifting. Proceedings of CASC 2016, Springer-Verlag LNCS 9890, 381-400 (2016).
[MT18] Michael Monagan and Baris Tuncer. Factoring multivariate polynomials with many factors and huge coefficients. Proceedings of CASC 2018, Springer-Verlag LNCS 11077, 319-334 (2018).
[Wang78] Wang, P.S. An improved Multivariate Polynomial Factoring Algorithm, Mathematics of Computation 32, (1978).
The factors command was updated in Maple 2019.
See Also
AFactors
factor
Factors
ifactors
PolynomialTools[Split]
roots
sqrfree
Download Help Document