The correct option is B 4π
Given equation is
sin2x−12(sinx−cosx)+12=0
⇒sin2x−12(sinx−cosx)+13=1
⇒−12(sinx−cosx)+13=1−sin2x
⇒−12(sinx−cosx)+13=(sinx−cosx)2
Let t=sinx−cosx
Then, t2+12t−13=0
⇒(t−1)(t+13)=0
⇒ Either t=1 or t=−13 (Rejected)
When t=1, we have
sinx−cosx=1
or, 1√2sinx−1√2cosx=1√2×1
or, sin(x−π4)=sinπ4
⇒x−π4=nπ+(−1)nπ4
⇒x=nπ+(−1)nπ4+π4,n∈Z
As x∈(0,3π), x=π2,π,5π2