(b)
Given, $\left| \sin x \right| = \cos x$
$\therefore\ \ \ \sin^{2}{x = \cos^{2}x}$
$\Rightarrow \ \ 2\cos^{2}{x = 1}$
$\Rightarrow \ \ \cos{x = + \frac{1}{\sqrt{2}}}\ \ \ \ \ \ \lbrack\because\cos xcannot\ be\ negative\rbrack$
$\Rightarrow \ \ \ x = 2n\pi \pm \frac{\pi}{4}$