x3+x+2,
x+1 is a factor because x=-1 produces 0 when substituted.
-1 | 1 0 1 2
1 -1 1 | -2
1 -1 2 | 0 = x2-x+2=.
The complete (real) factorisation is (x+1)(x2-x+2).
The quadratic factorises into complex factors, found by applying the formula:
x=(1±√(1-8))/2=(1±i√7)/2, x=½+½i√7, ½-½i√7.
Complete factorisation is (x+1)(x-½-½i√7)(x-½+i√7).