Example 1 (2001 National High School Competition Question) Among the four functions $y=\sin |x|, y=\cos |x|, y=|\cot x|, y=\lg |\sin x|$, the one that is an even function, has a period of $\pi$, and is monotonically increasing on $\left(0, \frac{\pi}{2}\right)$ is ( ).
A. $y=\sin |x|$
B. $y=\cos |x|$
C. $y=|\cot x|$
D. $y=\lg |\sin x|$
Solution: Choose D. Reason: Since $y=\sin |x|$ is not a periodic function, $y=\cos |x|=\cos x$ has a period of $2 \pi$, and $y=|\cot x|$ is monotonically decreasing on $\left(0, \frac{\pi}{2}\right)$. Only $y=\lg |\sin x|$ satisfies all the conditions.