Given equation is
sin2x+(cosx−1)sinx−cosx−ksinx+k=0⇒sin2x+sinx⋅cosx−ksinx−sinx−cosx+k=0⇒sinx(sinx+cosx−k)−1(sinx+cosx−k)=0⇒(sinx−1)(sinx+cosx−k)=0⇒sinx=1 or sinx+cosx=k
As x∈(0,2π), then sinx=1 has one real root.
sinx+cosx=k⇒sin(x+π4)=k√2
This equation should have two real root, so
k∈(−√2,√2)
Therefore, the integral value of k are −1,0,1
When k=1
x=π2, (∵x∈(0,2π))
Therefore, k=−1,0
Hence, there are two possible integral values of k.