$\frac{tanx}{1-tan^2x}-2\sqrt2sinxsin(\frac{5\pi}{2}+x)=\frac{1}{2}$$\Leftrightarrow \frac{\frac{sinx}{cosx}}{1-\frac{sin^2x}{cos^2x}}-2\sqrt2.sinx.cosx=\frac{1}{2}$
$\Leftrightarrow \frac{sinxcosx}{cos^2x-sin^2x}-\sqrt2.sin2x=\frac{1}{2}$
$\Leftrightarrow \frac{1}{2}.\frac{sin2x}{cos2x}-\sqrt2.sin2x=\frac{1}{2}$
$\Leftrightarrow sin2x-2\sqrt2sin2x.cos2x=cos2x$
$\Leftrightarrow sin2x-cos2x=\sqrt2sin4x (1)$
$\Rightarrow (sin2x-cos2x)^2=2sin^24x$
$\Rightarrow 1-sin4x=2sin^24x$
$\Rightarrow 2sin^24x+sin4x-1=0$
$\Rightarrow (sin4x+1)(2sin4x-1)=0$
$\Rightarrow sin4x=-1 , \frac{1}{2}$
$\Rightarrow x=\frac{3\pi}{8}+\frac{k\pi}{2}, \frac{\pi}{24}+\frac{k\pi}{2} , \frac{5\pi}{24}+\frac{k\pi}{2}$
Ta đã bình phương $(1)$ nên có những nghiệm không thỏa mãn
Thay vào $(1)$ ta có
$x=\frac{3\pi}{8}+\frac{k\pi}{2}$ với $k$ lẻ
$x=\frac{\pi}{24}+\frac{k\pi}{2}$ với $k$ lẻ
$x=\frac{5\pi}{24}+\frac{k\pi}{2}$ với $k$ chẵn