<s>[INST] How to factor the polynomial $x^4-x^2-2x-1$? By taking advantage of a computer algebra system, I found out that
$$x^4 - x^2 - 2x - 1 = (x^2 + x + 1)(x^2 - x - 1)$$
However, I don't know a straightforward way to solve this by hand. This was in a high-schooler's homework set, so I am assuming it can be solved using elementary methods.
 [/INST] Upon looking at this expression I immediately noticed that the $-x^2-2x-1$ could be simplified to $-(x+1)^2$. That is how you should be later on. For example, when you see $4x^2-4x+1$, you should right away notice that it equals $(2x-1)^2$
$$x^4-x^2-2x-1=x^4-(x+1)^2$$
$$=\left(x^2\right)^2-(x+1)^2$$
$$=(x^2+x+1)(x^2-(x+1)$$
$$=(x^2+x+1)(x^2-x-1)$$
$$\displaystyle \color{green}{\boxed{\therefore x^4-x^2-2x-1=(x^2+x+1)(x^2-x-1)}}$$
</s>