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 $\displaystyle x^3$ and you've got a $\displaystyle -1$ at the end. So you know that the first thing you do is try and work out how to make $\displaystyle x^3 - 2x -1$ like $\displaystyle (x \pm 1) (x^2 +ax \pm 1)$.
What I would do would be to try and extract $\displaystyle x+1$ and then if that doesn't work $\displaystyle x-1$ by long division.
HI
List down the factors of the constant term of this equation and test whether they are the zeros of the cubic expression .
ie 1 , -1
$\displaystyle f(1)=1^3-2(1)-1=-2$ so $\displaystyle (x-1)$ is not a factor .
$\displaystyle f(-1)=(-1)^3-2(-1)-1=0$ so $\displaystyle (x+1)$ is a factor .
And as suggested by Mr F , do the long division to find the quadratic factor which is complex .
If you do not know how to do synthetic division or polynomial long division (and Wikipedia has an article explaing this if you really have forgotten) you can do this by inspection since you have:
$\displaystyle (x+1)(x^2+bx+c)=x^3-2x-1$
expand the product on the left and equate the coefficients on either side of corresponding powers of $\displaystyle x$ to solve for $\displaystyle b$ and $\displaystyle c$
CB
To re-learn the steps for factoring polynomials, try here. Make sure to review the Rational Roots Test and synthetic division, if necessary.