factor takes as argument a polynomial or a list of
polynomials and optionnally an algebraic extension, e.g. sqrt(n).
factor factorize the polynomial (or the polynomials of the list) on the
field of it’s coefficients (the field is complexified in complex mode)
or on the smallest extension containing the optionnal second argument.
Unlike collect,
factor will further factorize each factor of degree 2
if Sqrt is checked in the cas configuration
(see also 2.12.9).
You can check the current configuration in the status button under
Xcas and change the configuration by hitting this status button.
Input :
^
2+2*x+1)Output :
^
2Input :
^
4-2*x^
2+1)Output :
^
2*(x+1)^
2Input :
^
3-2*x^
2+1)Output if Sqrt is not checked in the cas configuration :
^
2-x-1)Output if Sqrt is checked in the cas configuration :
Input :
^
3-2*x^
2+1,sqrt(5))Output :
Input :
^
2+1)Output in real mode :
^
2+1Output in complex mode :