Example 5 (15th "Hope Cup" Senior High School Competition Question) The smallest positive period of the function $f(x)=|\tan 2 x|$ is ( )
A. $2 \pi$
B. $\pi$
C. $\frac{\pi}{2}$
D. $\frac{\pi}{4}$
If $T$ is a period of the function $f(x)$, then for any $x$ in the domain, we have $f(x+T)=f(x)$, that is,
$$
|\tan 2(x+T)|=|\tan 2 x|
$$

Since we are looking for the smallest positive period of the function $f(x)$, and the options have limited the possible values of the smallest positive period to $2 \pi, \pi, \frac{\pi}{2}, \frac{\pi}{4}$, we can test these values in (1) in ascending order:

When $T=\frac{\pi}{4}$, equation (1) becomes $\left|\tan 2\left(x+\frac{\pi}{4}\right)\right|=|\tan 2 x|,|\cot 2 x|=|\tan 2 x|$, which does not always hold, for example, when $x=\frac{\pi}{6}$. Therefore, $\frac{\pi}{4}$ is not a period of $f(x)$.

When $T=\frac{\pi}{2}$, equation (1) becomes $\left|\tan 2\left(x+\frac{\pi}{2}\right)\right|=|\tan 2 x|,|\tan 2 x|=|\tan 2 x|$, which always holds. Therefore, $\frac{\pi}{2}$ is the smallest positive period of $f(x)$, so the answer is C.

**Analysis** The periodicity of functions is an important topic in high school mathematics, and a large number of such problems appear in college entrance exams and math competitions every year. However, finding a simple method to determine the smallest positive period based on the characteristics of a given function is a challenge.

From the conclusion of this problem, we can see that the smallest positive period of a function may remain the same after taking the absolute value. However, does the smallest positive period of all functions remain the same after taking the absolute value? Not necessarily, the results can vary widely. Here are a few categories:
(1) For the function $f(x)=|\sin x|$, its smallest positive period $\pi$ is half of the smallest positive period $2 \pi$ of the original function $g(x)=\sin x$.
(2) $f(x)=\sin |x|$ is a non-periodic function, but $|f(x)|=|\sin x|$ is a periodic function with the smallest positive period $\pi$.

Therefore, the change in the periodicity of a function after taking the absolute value should be analyzed on a case-by-case basis.
This problem can also be solved using a graphical method.
Solution: Draw a rough graph of the function, as shown in Figure 2-1-3, and it can be seen that its smallest positive period is $\frac{\pi}{2}$. Hence, the answer is C.