ĐKXĐ: \(sin2x\ne0\Leftrightarrow x\ne\frac{k\pi}{2}\)
\(sinx+cosx=\frac{2cosx}{sinx}-\frac{2sinx}{cosx}\)
\(\Leftrightarrow sinx+cosx=\frac{2\left(cos^2x-sin^2x\right)}{sinx.cosx}\)
\(\Leftrightarrow sinx+cosx=\frac{2\left(sinx+cosx\right)\left(cosx-sinx\right)}{sinx.cosx}\)
\(\Leftrightarrow\left[{}\begin{matrix}sinx+cosx=0\Leftrightarrow sin\left(x+\frac{\pi}{4}\right)=0\Leftrightarrow...\\\frac{2\left(cosx-sinx\right)}{sinx.cosx}=1\left(1\right)\end{matrix}\right.\)
Xét (1) \(\Leftrightarrow2\left(cosx-sinx\right)=sinx.cosx\)
Đặt \(cosx-sinx=t\Rightarrow\left\{{}\begin{matrix}\left|t\right|\le\sqrt{2}\\sinx.cosx=\frac{1-t^2}{2}\end{matrix}\right.\)
\(\Rightarrow2t=\frac{1-t^2}{2}\Leftrightarrow t^2-4t-1=0\)
\(\Rightarrow\left[{}\begin{matrix}t=2+\sqrt{5}\left(l\right)\\t=2-\sqrt{5}\end{matrix}\right.\)
\(\Rightarrow cosx-sinx=2-\sqrt{5}\)
\(\Leftrightarrow sin\left(x-\frac{\pi}{4}\right)=\frac{\sqrt{5}-2}{\sqrt{2}}=sina\)
\(\Rightarrow\left[{}\begin{matrix}x-\frac{\pi}{4}=a+k2\pi\\x-\frac{\pi}{4}=\pi-a+k2\pi\end{matrix}\right.\)