How do you factor x^3 - 2x - 1 ?
Trial and error. In this case it looks fairly straightforward.
If you're going to have a factor, there's going to be either x+1 or x-1, because x times something needs to make and you've got a at the end. So you know that the first thing you do is try and work out how to make like .
What I would do would be to try and extract and then if that doesn't work by long division.
Wikipedia has an article explaing this if you really have forgotten) you can do this by inspection since you have:
expand the product on the left and equate the coefficients on either side of corresponding powers of to solve for and