# How do you factor g(x)=x^3-x^2-x+1?

You can collect $x$ from the first and third term and $- 1$ from the second and fourth:
g(x)=x(x^2-1)-1((x^2-1) collect $\left({x}^{2} - 1\right)$:
$g \left(x\right) = \left({x}^{2} - 1\right) \left(x - 1\right) = \left(x + 1\right) \left(x - 1\right) \left(x - 1\right)$