The correct option is D (0,π]
(cosp−1)x2+(cosp)x+sinp=0
Given equation has real roots if D≥0
⇒cos2p−4(cosp−1)sinp≥0
⇒cos2p−4cospsinp+4sinp≥0
⇒(cosp−2sinp)2−4sin2p+4sinp≥0
⇒(cosp−2sinp)2+4sinp(1−sinp)≥0
For the above inequality to be true sinp≥0
∵(cosp−2sinp)2≥0, 1−sinp≥0 for all values of p
∴p∈(0,π] (∵cosp≠1)