Finding $k$ such that $(x^2 + kx + 1)$ is a factor of $(x^4 - 12 x^2 + 8 x + 3)$ 
$(x^2 + kx + 1)$ is a factor of $(x^4 - 12 x^2 + 8 x + 3)$ . Find $k$

....couldnt figure out how to find $k$
I tried assuming $(x^2 + kx + 1)= (x - 1)^2 $ where $k = (-2) $ comsidering that $(x-1) $ is a factor of the above polynomial.....but it didnt help either.

We factor $x^4-12x^2+8x+3$.
We see, that $x=1$ is a root of $f(x)=x^4-12x^2+8x+3$, since $f(1)=1-12+8+3=0$
After long division $(x^4-12x^2+8x+3)\div (x-1)=x^3+x^2-11x-3$
We see, that x=3 is a root of the polynomial $g(x)=x^3+x^2-11x-3$
Again after long division we achieve:
$(x^3+x^2-11x-3)\div (x-3)=x^2+4x+1$
Which gives us the solution $k=4$.
