Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Factor Calculator

Factor

Function: factor (<expr>)

define( f(x), x^3-20*x^2+5*x-20 );
define( fp(x),diff(f(x),x) );
define( fpp(x),diff(fp(x),x) );
factor( fpp(x) );
plot2d( f(x), [x,-4,3] );
c : float(realroots( fp(x)=0 ));
f(c);
integrate(f(x),x,-2,2);
define( F(x),C+integrate(f(x),x) );
realroots( F(0)=4 );

Function: factor (<expr>, <p>) Factors the expression <expr>, containing any number of variables or functions, into factors irreducible over the integers. factor (<expr>, <p>) factors <expr> over the field of rationals with an element adjoined whose minimum polynomial is <p>.

factor uses ifactors function for factoring integers.

factorflag if false suppresses the factoring of integer factors of rational expressions.

dontfactor may be set to a list of variables with respect to which factoring is not to occur. (It is initially empty). Factoring also will not take place with respect to any variables which are less important (using the variable ordering assumed for CRE form) than those on the dontfactor list.

savefactors if true causes the factors of an expression which is a product of factors to be saved by certain functions in order to speed up later factorizations of expressions containing some of the same factors.

berlefact if false then the Kronecker factoring algorithm will be used otherwise the Berlekamp algorithm, which is the default, will be used.

intfaclim if true maxima will give up factorization of integers if no factor is found after trial divisions and Pollards rho method. If set to false (this is the case when the user calls factor explicitly), complete factorization of the integer will be attempted. The users setting of intfaclim is used for internal calls to factor. Thus, intfaclim may be reset to prevent Maxima from taking an inordinately long time factoring large integers.

Examples:

          (%i1) factor (2^63 - 1);
                              2
          (%o1)              7  73 127 337 92737 649657
          (%i2) factor (-8*y - 4*x + z^2*(2*y + x));
          (%o2)               (2 y + x) (z - 2) (z + 2)
          (%i3) -1 - 2*x - x^2 + y^2 + 2*x*y^2 + x^2*y^2;
                          2  2        2    2    2
          (%o3)          x  y  + 2 x y  + y  - x  - 2 x - 1
          (%i4) block ([dontfactor: [x]], factor (%/36/(1 + 2*y + y^2)));
                                 2
                               (x  + 2 x + 1) (y - 1)
          (%o4)                ----------------------
                                     36 (y + 1)
          (%i5) factor (1 + %e^(3*x));
                                x         2 x     x
          (%o5)              (%e  + 1) (%e    - %e  + 1)
          (%i6) factor (1 + x^4, a^2 - 2);
                              2              2
          (%o6)             (x  - a x + 1) (x  + a x + 1)
          (%i7) factor (-y^2*z^2 - x*z^2 + x^2*y^2 + x^3);
                                 2
          (%o7)              - (y  + x) (z - x) (z + x)
          (%i8) (2 + x)/(3 + x)/(b + x)/(c + x)^2;
                                       x + 2
          (%o8)               ------------------------
                                                     2
                              (x + 3) (x + b) (x + c)
          (%i9) ratsimp (%);
                          4                  3
          (%o9) (x + 2)/(x  + (2 c + b + 3) x

2 2 2 2 + (c + (2 b + 6) c + 3 b) x + ((b + 3) c + 6 b c) x + 3 b c )

          (%i10) partfrac (%, x);
                     2                   4                3
          (%o10) - (c  - 4 c - b + 6)/((c  + (- 2 b - 6) c

2 2 2 2 + (b + 12 b + 9) c + (- 6 b - 18 b) c + 9 b ) (x + c))

c - 2 - --------------------------------- 2 2 (c + (- b - 3) c + 3 b) (x + c)

b - 2 + ------------------------------------------------- 2 2 3 2 ((b - 3) c + (6 b - 2 b ) c + b - 3 b ) (x + b)

1 - ---------------------------------------------- 2 ((b - 3) c + (18 - 6 b) c + 9 b - 27) (x + 3)

          (%i11) map (factor, %);
                        2
                       c  - 4 c - b + 6                 c - 2
          (%o11) - ------------------------- - ------------------------
                          2        2                                  2
                   (c - 3)  (c - b)  (x + c)   (c - 3) (c - b) (x + c)

b - 2 1 + ------------------------ - ------------------------ 2 2 (b - 3) (c - b) (x + b) (b - 3) (c - 3) (x + 3)

          (%i12) ratsimp ((x^5 - 1)/(x - 1));
                                 4    3    2
          (%o12)                x  + x  + x  + x + 1
          (%i13) subst (a, x, %);
                                 4    3    2
          (%o13)                a  + a  + a  + a + 1
          (%i14) factor (%th(2), %);
                                 2        3        3    2
          (%o14)   (x - a) (x - a ) (x - a ) (x + a  + a  + a + 1)
          (%i15) factor (1 + x^12);
                                 4        8    4
          (%o15)               (x  + 1) (x  - x  + 1)
          (%i16) factor (1 + x^99);
                           2            6    3
          (%o16) (x + 1) (x  - x + 1) (x  - x  + 1)

10 9 8 7 6 5 4 3 2 (x - x + x - x + x - x + x - x + x - x + 1)

20 19 17 16 14 13 11 10 9 7 6 (x + x - x - x + x + x - x - x - x + x + x

4 3 60 57 51 48 42 39 33 - x - x + x + 1) (x + x - x - x + x + x - x

30 27 21 18 12 9 3 - x - x + x + x - x - x + x + 1)

There are also some inexact matches for factor. Try ?? factor to see them.

(%o1)                                true
(%i2) 

Factor Example

Related Examples

factor

factor(x**2-5*x+6);

Calculate

factor

factor(4*a^2-9*b^2);

Calculate

factor

a:x^8 + x^6 + x^4 + x...

factor(a);

Calculate

factor

factor(x**2 + 7*x +10);

Calculate

factor

factor(r^4*x + 2*d^2*...

Calculate

factor

t:37;

k:6*t;

p:4*k+1;

Calculate

factor

factor(397);

Calculate

factor

factor(1000001);

factor(10000001);

factor(100000001);

Calculate

factor-integrate-sqrt

factor(integrate(2*sq...

Calculate

factor

factor(10*x^4- 31*x^3...

Calculate