∣∣∣x2+kx+1x2+x+1∣∣∣<2
⇒−2<x2+kx+1x2+x+1<2
For x2+x+1,
D=1−4=−3<0
So, this expression is always positive.
Hence, by multiplying (x2+x+1) on both the sides of inequality,
−2(x2+x+1)<x2+kx+1<2(x2+x+1)
This gives us two inequalities
3x2+(2+k)x+3>0 and x2+(2−k)x+1>0
For both these inequations to be positive for all real x, discriminant must be negative.
(2+k)2−36<0, (2−k)2−4<0
⇒(k+8)(k−4)<0, k(k−4)<0
⇒−8<k<4, 0<k<4
⇒0<k<4
Possible integral values of k are 1,2,3