<s>[INST] Help understanding how to factor completely $x^3-x^2-x+1$ I need someone to help explain the steps to completely factor the problem $x^3-x^2-x+1$.
Here is what I have done so far:

$x^3-x^2-x+1$ 
to 
$x^3-x^2+-1(x+1)$
Since there is a negative I changed $-x+1$ to $-1(x+1)$ 
to 
$x^2(x-1)+-1(x+1)$ 
to
$(x^2-1)(x-1)(x+1)$.

Is this correct? If not please explain what I did wrong and what I should do. If it is then thank you for saying so, if not, thank you for helping me to understand.
 [/INST] $$x^3 - x^2 - x + 1 \to x^2(x - 1) + (-1)(x-1)$$
$$\to (x-1)(x^2 - 1) \to (x-1)^2(x+1)$$
</s>