If $ \cos x = |\sin x| $ then the general solution is
$x = n\pi \pm \frac{\pi}{4},\ n \in \mathbb{Z}$
$x = 2n\pi \pm \frac{\pi}{4},\ n \in \mathbb{Z}$
$x = n\pi + (-1)^n \frac{\pi}{4},\ n \in \mathbb{Z}$
$x = (2n + 1)\pi \pm \frac{\pi}{4},\ n \in \mathbb{Z}$