$\Leftrightarrow 3 cot^{2}x+3+3\frac{(sinx+cosx)}{sin^{2}x}- 4\sqrt2cos(x-\frac{\pi}{4})-4=0$$\Leftrightarrow \frac{3(1+sinx+cosx)}{sin^{2}x}-4(\sqrt{2}cos(x-\frac{\pi}{4})+1)=0$
$\Leftrightarrow 3(1+\sqrt{2}cos(x-\frac{\pi}{4}))-4sin^{2}x(\sqrt{2}cos(x-\frac{\pi}{4})+1)=0$
$\Leftrightarrow (\sqrt{2}cos(x-\pi/4)+1).(3-4sin^2x)=0$ ^^xong=))