ĐKXĐ: \(cosx\ne-1\Rightarrow x\ne\pi+k2\pi\)
\(tan\frac{x}{2}=\frac{sin\frac{x}{2}}{cos\frac{x}{2}}=\frac{2sin\frac{x}{2}.cos\frac{x}{2}}{2cos^2\frac{x}{2}}=\frac{sinx}{1+cosx}\)
\(\frac{sin^2x-2}{1-cos^2x-2\left(cosx+1\right)}=\frac{sin^2x}{\left(1+cosx\right)^2}\)
\(\Leftrightarrow\frac{sin^2x-2}{-\left(cosx+1\right)^2}=\frac{sin^2x}{\left(1+cosx\right)^2}\)
\(\Leftrightarrow sin^2x-2=-sin^2x\)
\(\Leftrightarrow sin^2x=1\Rightarrow cosx=0\)
\(\Rightarrow x=\frac{\pi}{2}+k\pi\)