<s>[INST] How to factor $x^6+x^5-3\,x^4+2\,x^3+3\,x^2+x-1$ by hand? I know that 
$x^6+x^5-3\,x^4+2\,x^3+3\,x^2+x-1 = (x^4-x^3+x+1)(x^2+2x-1)$ 
but I would not know how to do that factoring without a software. 
Some idea? Thank you!
 [/INST] A possibility is to write a generic product
$x^6+x^5-3x^4+2x^3+3x^2+x-1=(x^4+a_3x^3+a_2x^2+a_1x+a_0)(x^2+b_1x+b_0)$
then expand the right-hand side and compare the two polynomials, obtaining
\begin{cases}
&a_0 b_0=-1,\\
&a_0 b_1+a_1 b_0=1,\\
&a_0+a_1 b_1+a_2 b_0=3,\\
&a_1+a_2 b_1+a_3 b_0=2,\\
&a_2+a_3 b_1+b_0=-3,\\
&a_3+b_1=1
\end{cases}
that can be solved rather easily for integer solutions.
The same could be tried for a product of two third degree polynomials, without any (integer) solutions.
</s>