
factor, Factor - factorization of polynomials

Calling sequence:
factor(p)
Factor(p)

Parameter:

p  --   polynomial or expression

Overloading:

1

Summary:

factor calculates the factorization of a polynomial. The polynomial may be
either a multivariate polynomial over the rationals or an univariate polynomial
over a residue class ring IntMod(p) with a prime number p.

The argument of factor may be either a polynomial or an expression. An
expression is converted into a polynomial (see function poly). factor returns
FAIL if the expression cannot be converted.

factor(a) returns the list [u, f1, e1, ..., fn, en] with a = u * f1^e1
* ...* fn^en, where the fi are the irreducible factors and u is the content
of a. The fi are pairwise different and primitive.

The function Factor returns an expression instead of a list.  It is intended
for interactive use, whereas factor is more useful while programming.

>>  factor(3*x^4+5*x^3-3*x-1);

                                   2
                        [1, - x + 3 x  - 1, 1, x + 1, 2]

>>  factor(x^3+3*x^2+5*x+9);

                                      2    3
                          [1, 5 x + 3 x  + x  + 9, 1]

>>  Factor(poly(x^3+3*x^2+5*x+9, IntMod(13)));

      poly(x - 5, [x], IntMod(13)) poly(x - 3, [x], IntMod(13))

        poly(x - 2, [x], IntMod(13))

>>  Factor(4*x^3+4*x^2*y+3*x*y+3*y^2);

                                            2
                             (x + y) (3 y + 4 x )

>>  Factor(2/3*x^2+1/3*x-1/3);

                             1/3 (x + 1) (2 x - 1)

See also:  poly, ifactor , sqrfree

