if x = - k
is a root then
x + k is a factor and the problem could be:
(x + k)(x^2 + ax + b) = x^3 + (1 - k^2)x + k
multiplying the left we have:
x^3 + (a + k)x^2 + (ak + b)x + bk
thus:
a + k = 0
ak + b = 1 - k^2
bk = k
from the third equation,
b = 1
plugging this into the second equation:
ak + 1 = 1 - k^2
ak = - k^2
provided k doesnt equal 0,
a = -k
actually from the coefficient of x^2
we obtain a = - k as well.
so the problem is:
(x + k)(x^2 - kx + 1)
solve:
x^2 - kx + 1 = 0
to find the other two roots:
i will go with completing the square:
(x - k/2)^2 = - 1 + k^2/4
x = k/2 +/- (1/2)sqrt(k^2 - 4)
or
x = (1/2)*[k + sqrt(k^2 - 4)]
and
x = (1/2)*[k - sqrt(k^2 - 4)]