⇒cosx−cos2x=sin2x−sinx
Using cosC−cosD=−2sin(C+D2)sin(C−D2)
And
sinC−sinD=2cos(C+D2)sin(C−D2)
⇒−2sin(x+2x2)sin(x−2x2)=2cos(x+2x2)sin(2x−x2)
⇒−sin(3x2)sin(−x2)=cos(3x2)sin(x2)
⇒sin(3x2)sin(x2)−cos(3x2)sin(x2)=0
⇒sin(x2)[sin(3x2)−cos(3x2)]=0
⇒sin(x2)=0 or [sin(3x2)−cos(3x2)]=0
⇒x2=nπ,n∈Z or sin(3x2)=cos(3x2)
⇒x=2nπ,n∈Z or tan(3x2)=1
⇒x=2nπ,n∈Z or tan(3x2)=tanπ4
We know the general solution of tanx=tanα is x=mπ+α,m∈Z
So, the general solution of tan(3x2)=tanπ4 is 3x2=mπ+π4,m∈Z
⇒x=2mπ3+π6,m∈Z
Hence, the general solution is
x=2nπ and x=2mπ3+π6,n,m∈Z