9. The smallest positive period of the function $f(x)=\frac{\cot x+\cos x}{1+\sin x}$ is
9. $2 \pi$. Simplifying, we get $f(x)=\frac{\cot x(1+\sin x)}{1+\sin x}=\cot x$. Therefore, the smallest positive period of $f(x)$ is $\pi$. However, this solution is actually incorrect. The reason for the error lies in ignoring the domain of the function. In fact, for $\cot x$ to be meaningful, we know that $x \neq k \pi, k \in \mathbf{Z}$, and for $1+\sin x \neq 0$, we know that $x \neq 2 k \pi+\frac{3 \pi}{2}, k \in \mathbf{Z}$. When $x=2 k \pi+\frac{\pi}{2}, k \in \mathbf{Z}$, we have $x+\pi=2 k \pi+\frac{3 \pi}{2}, k \in \mathbf{Z}$. Therefore, $f(x+\pi)$ is undefined, so the smallest positive period of $f(x)$ is not $\pi$, but $2 \pi$.