collect takes as argument a polynomial or a list of
polynomials and optionnaly an algebraic extension like sqrt(n)
(for √n).
collect factorizes the polynomial (or the polynomials of the
list) on the field of it’s coefficient (for example ℚ)
or on the smallest extension containing the optional second argument (e.g.
ℚ[√n]). In complex mode, the field is complexified.
Examples :
^2-4)^2+4)^2+4^2-2)^2-2^2-2))| x3−2x2+1 and x2−x |
^3-2*x^2+1,x^2-x])^2-x-1),x*(x-1)]^3-2*x^2+1)*sqrt(5))^3-2*x^2+1,sqrt(5))