Factorize over the integers :
x3 - 2x2 + 1 and x2 - x
Input :
collect([x^
3-2*x^
2+1,x^
2-x])
Output :
[(x-1)*(x^
2-x-1),x*(x-1)]
But, input :
collect((x^
3-2*x^
2+1)*sqrt(5))
Output :
((19*sqrt(5)-10)*((sqrt(5)+15)*x+7*sqrt(5)-5)* ((sqrt(5)+25)*x-13*sqrt(5)-15)*(x-1))/6820
Or, input :
collect(x^
3-2*x^
2+1,sqrt(5))
Output :
((2*sqrt(5)-19)*((sqrt(5)+25)*x-13*sqrt(5)-15)*(-x+1)*((sqrt(5)+15)*x+7*sqrt(5)-5))/6820