2. (10th "Hope Cup" Invitational Training Question) The smallest positive period of the function $y=\sin x\left(1+\tan x \cdot \tan \frac{x}{2}\right)$ is ( ).
A. $2 \pi$
B. $\pi$
C. $\frac{3}{2} \pi$
D. $\frac{\pi}{2}$
2. A. Reason: Since $y=\sin x \cdot\left(1+\tan x \cdot \tan \frac{x}{2}\right)=\sin x \cdot \frac{\cos x \cdot \cos \frac{x}{2}+\sin x \cdot \sin \frac{x}{2}}{\cos x \cdot \cos \frac{x}{2}}=\sin x \cdot$
$$
\frac{\cos \left(x-\frac{\pi}{2}\right)}{\cos x \cdot \cos \frac{x}{2}}=\tan x
$$

The domain of the original function is $x \in \mathbf{R}$ and $x \neq k \pi+\frac{\pi}{2}, \frac{x}{2} \neq k \pi+\frac{\pi}{2}$, i.e., $x \in \mathbf{R}$ and $x \neq k \pi+\frac{\pi}{2}, x \neq 2 k \pi+\pi$ $(k \in \mathbf{Z})$.
Therefore, the smallest positive period of the function $y$ is $2 \pi$.