<s>[INST] Methods for efficiently factoring the cubic polynomial $x^3 + 1$ $$x^3 + 1$$
factors as 
$$(x^2 - x + 1)(x + 1) .$$
It would have taken me a few minutes to identify this. What are the various approaches to determining rapidly that it is factorable, and factoring it?
 [/INST] Here is one approach. 
Note that $$x^3+1=x^3+3x^2+3x+1 -3x^2-3x=(x+1)^3-3x(x+1)=(x+1)((x+1)^2-3x)=(x+1)(x^2-x+1)$$
Another approach would be noticing that $x=-1$ is a solution to $x^3+1=0$. Then you can divide $x^3+1$ by $x+1$ with polynomial long division. 
The third approach would be to set $x^3+1=(x+a)(x^2+bx+c)$ and solving the system of equations. 
A fourth approach would be using the formula for geometric series. 
The sum of the geometric series $1$, $-x$, $x^2$ is $\frac{1-(-x)^3}{1-(-x)}=\frac{x^3+1}{x+1}$. 
Multiplying $x+1$ on each side gives us that $(1-x+x^2)(1+x)=1+x^3$. 
</s>