<s>[INST] How to solve the trigonometric equation $\sin x-\cos x-2(2)^{\frac 1 2}\sin x\cos x=0$ the question is:

Find the solutions of the equation: $\sin x-\cos x-2(2)^{\frac 1 2}\sin x\cos x=0$.

Let  $\sin x+\cos x=u \text{ and } \sin x \cos x=v \implies \sin^2x+\cos^2x+2\sin x\cos x=u^2 \implies v=\frac {u^2-1} 2$
similarly solving the above equation it comes out to be:
$$\sqrt2 u^2-u-\sqrt2=0=(u-\sqrt2)(\sqrt2u+1)=0 \implies \sin x+\cos x=\sqrt2 \quad(1)$$
and
$$\sin x+\cos x= \frac{-1} {\sqrt2}\quad (2)$$
so solving the results differently i got the answers:
$$x=2n\pi + \frac{\pi}4, 2n\pi +\frac{7\pi}{12}, 2n\pi-\frac{\pi}{12}$$
but the answers are:
$$x=2n\pi + \frac{\pi}4, 2n\pi -\frac{5\pi}{12}, 2n\pi+\frac{11\pi}{12}$$ 
I divided the eq(2) by $\sqrt2$
 [/INST] Notice, we have $$\sin x-\cos x-2\sqrt2\sin x\cos x=0$$
$$\sin x-\cos x=2\sqrt2\sin x\cos x$$
$$\sin x-\cos x=\sqrt2\sin 2x$$
$$\frac{1}{\sqrt2}\sin x-\frac{1}{\sqrt2}\cos x=\sin 2x$$
$$\sin 2x=\sin x\cos\frac{\pi}{4}-\cos x\sin\frac{\pi}{4}$$
$$\sin 2x=\sin \left(x-\frac{\pi}{4}\right)$$
Writing the general solution , we get 
$$2x=2n\pi+\left(x-\frac{\pi}{4}\right)\iff x=\frac{(8n-1)\pi}{4}$$
$$\bbox[5px, border:2px solid #C0A000]{\color{red}{x=\frac{(8n-1)\pi}{4}}}$$
or $$2x=2n\pi+\pi-\left(x-\frac{\pi}{4}\right)\iff x=\frac{(8n+5)\pi}{12}$$
$$\bbox[5px, border:2px solid #C0A000]{\color{red}{x=\frac{(8n+5)\pi}{12}}}$$
Where, $n$ is any integer.
</s>