(cosx−sinx)(2tanx+1cosx)+2=0
Let t=tanx2
=⎧⎪
⎪⎨⎪
⎪⎩1−tan2x21+tan2x2−2tanx21+tan2x2⎫⎪
⎪⎬⎪
⎪⎭{4tanx21−tan2x2+1+tan2x21−tan2x2}+2=0
(1−t21+t2−2t1−t2)(4t1−t2+1+t21−t2)+2=0
⇒1−t2−2t1+t2×4t+1+t21−t2=0
⇒1−t2−2t1+t2×4t+1+t21−t2=0
⇒−(t2+2t−1)(t2+4t+1)1−t4=0
⇒−t4+4t3+t2+2t3+8t2+2t−t2−4t−11−t4=0
⇒−t4+6t3+8t2−2t−11−t4=0
⇒t4+6t3+8t2−2t−11−t4=0
⇒t4−11−t4+2t(3t2+4t−1)1−t4=0
⇒−1+2t(3t2+4t−1)1−t4=0
⇒2t(3t2+4t−1)1−t4=1
⇒2t(3t2+4t−1)=1−t4
⇒6t3+8t2−2t−1+t4=0
⇒t4+6t3+8t2−2t−1=0
Let t=±1√3⇒(±1√3)4+6(±1√3)3+8(±1√3)2−2(±1√3)−1=0
Hence its roots are t1=1√3 and t2=−1√3
⇒x2=nπ±π6
⇒x=2nπ±π3 is required solution.