3. Among the four functions $y=\sin |x|, y=\cos |x|, y=|\cot x|, y=\lg |\sin x|$, the even function that is periodic with $\pi$ and monotonically increasing in $\left(0, \frac{\pi}{2}\right)$ is
(A) $y=\sin |x|$
(B) $y=\cos |x|$
(C) $y=|\cot x|$
(D) $y=\lg |\sin x|$
(D)
3.【Analysis and Solution】We can consider using the method of elimination. $y=\sin |x|$ is not a periodic function (this can be determined by graphing), so we eliminate $\mathrm{A}$; $y=\cos |x|$ has the smallest positive period of $2 \pi$, and it is a decreasing function in $\left(0, \frac{\pi}{2}\right)$, so we eliminate $\mathrm{B}$; $y=|\cot x|$ is a decreasing function in $\left(0,\left|\frac{\pi}{2}\right|\right)$, so we eliminate C. Therefore, the correct choice is D.