factor
factor a multivariate polynomial
Calling Sequence
Parameters
Description
Examples
References
Compatibility
factor(a)
factor(a, K)
factor(f, method="Wang")
a
-
expression
K
field extension over which to factor
f
multivariate polynomial with rational coefficients
method
(optional) equation method="Wang"
The factor function computes the factorization of a multivariate polynomial with integer, rational, (complex) numeric, or algebraic number coefficients.
The factor function does NOT factor integers. Nor does it factor integer coefficients in a polynomial. Use the ifactor function to factor integers.
For multivariate polynomials with integer coefficients, the factor 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".
If the second argument K is not given, the polynomial is factored over the field implied by the coefficients. For example, if the coefficients are all integers then factor computes all irreducible factors with integer coefficients. Thus factor does not necessarily factor into linear factors. Note that any integer content (see first example below) is not factored.
If the input, a, is a rational expression, then it is first normalized (see normal) and the numerator and denominator of the resulting expression are then factored. This provides a fully factored form which can be used to simplify an expression in the same way the normal function is used. However, it is more expensive to compute.
If the input, a, is a list, set, equation, range, relation, or function, then factor is applied recursively to the components of a. If a is an exact series, that is, a series object with no order term, then it is first converted to a polynomial before applying factor. If a is a series but not an exact series, then factor is applied recursively to the components of a (that is, its coefficients).
If the second argument K is the keyword real or complex, a floating-point factorization is performed over the reals and complexes respectively. At present this is only implemented for univariate polynomials.
If the second argument K is a single RootOf, a list or set of RootOfs, a single radical, or a list or set of radicals, then the expression is factored over the algebraic number field defined by K.
factor⁡6⁢x2+18⁢x−24
6⁢x+4⁢x−1
factor⁡6
6
ifactor⁡6
2⁢3
factor⁡x3−y3x4−y4
x2+x⁢y+y2x+y⁢x2+y2
factor⁡1x2−1+1x2+3⁢x+2
2⁢x+1x+2⁢x+1⁢x−1
factor⁡x3+5
x3+5
factor⁡x3+5,513
523−513⁢x+x2⁢x+513
factor⁡x3+5,513,−312
−513⁢−3+513−2⁢x⁢513⁢−3+2⁢x−513⁢x+5134
factor⁡x3+5.0
x+1.709975947⁢x2−1.709975947⁢x+2.924017740
factor⁡x3+5,complex
x+1.709975947⁢x−0.8549879733+1.480882610⁢I⁢x−0.8549879733−1.480882610⁢I
factor⁡y4−2,sqrt⁡2
−y2+2⁢−y2+2
alias⁡α=RootOf⁡x2−2:
factor⁡y4−2,α
−y2+α⁢−y2+α
factor⁡x3+y3
x+y⁢x2−x⁢y+y2
factor⁡x3+y3,−312
−y⁢−3+2⁢x−y⁢y⁢−3−2⁢x+y⁢x+y4
The following is a splitting field example. The polynomial a is a polynomial over the rationals.
a≔x4−x2+1
To factor a over the rationals, use the following.
factor⁡x4−x2+1
x4−x2+1
To factor a into linear factors, you must extend the field of coefficients using algebraic extensions.
with⁡PolynomialTools:
a1≔Split⁡a,x
a1≔−RootOf⁡_Z4−_Z2+13+RootOf⁡_Z4−_Z2+1+x⁢x+RootOf⁡_Z4−_Z2+1⁢RootOf⁡_Z4−_Z2+13−RootOf⁡_Z4−_Z2+1+x⁢x−RootOf⁡_Z4−_Z2+1
Represent it using radicals.
convert⁡a1,radical
−32+I23+32+I2+x⁢x+32+I2⁢32+I23−32−I2+x⁢x−32−I2
Depending on the algebraic extension, this can factor in several different ways.
factor⁡a,sqrt⁡2−2⁢I⁢sqrt⁡3
−2⁢x+I−3⁢2⁢x+I+3⁢−2⁢x+3+I⁢2⁢x+I−316
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 factor command was updated in Maple 2019.
See Also
AFactor
collect
Factor
factors
galois
ifactor
irreduc
RootOf
roots
sqrfree
Download Help Document