(9 Given the function $f(x)=\cos ^{2} \theta x+\cos \theta x \sin \theta x$ has the smallest positive period of $\frac{\pi}{2}$, then the maximum value of $\theta f(x)$ is $\qquad$ .
9 .
$$
\begin{aligned}
f(x) & =\frac{1}{2}(1+\cos 2 \theta x)+\frac{1}{2} \sin 2 \theta x \\
& =\frac{1}{2}+\frac{1}{2}(\cos 2 \theta x+\sin 2 \theta x) \\
& =\frac{1}{2}+\frac{\sqrt{2}}{2} \sin \left(2 \theta x+\frac{\pi}{4}\right),
\end{aligned}
$$

Since the smallest positive period of $f(x)$ is $\frac{\pi}{2}$, we have $\frac{2 \pi}{2 \theta}=\frac{\pi}{2}$, which means $\theta=2$. Therefore, the maximum value of $\theta f(x)$ is $1+\sqrt{2}$.