Example 1
(1) Find the maximum value of the function $f(\theta)=\cos \frac{\theta}{2} \sin \theta, \theta \in\left(0, \frac{\pi}{2}\right)$;
(2) Find the maximum value of the function $g(\theta)=\sin \frac{\theta}{2} \cos \theta, \theta \in\left(0, \frac{\pi}{2}\right)$.
(1) $f(\theta)=2 \sin \frac{\theta}{2} \cdot \cos ^{2} \frac{\theta}{2}=2 \sqrt{\sin ^{2} \frac{\theta}{2} \cdot \cos ^{4} \frac{\theta}{2}}$
$$
\begin{array}{l}
=\sqrt{2} \cdot \sqrt{2 \sin ^{2} \frac{\theta}{2} \cdot \cos ^{2} \frac{\theta}{2} \cdot \cos ^{2} \frac{\theta}{2}} \\
\leqslant \sqrt{2} \cdot \sqrt{\left(\frac{2 \sin ^{2} \frac{\theta}{2}+\cos ^{2} \frac{\theta}{2}+\cos ^{2} \frac{\theta}{2}}{3}\right)^{3}}
\end{array}
$$
$=\sqrt{2} \cdot\left(\frac{2}{3}\right)^{\frac{3}{2}}=\frac{4 \sqrt{3}}{9}$, when and only when $\theta=2 \arctan \frac{\sqrt{2}}{2}$. Therefore, the maximum value of $f(\theta)$ is $\frac{4 \sqrt{3}}{9}$.
(2) Since $\theta \in\left(0, \frac{\pi}{2}\right)$, hence $g(\theta)>0, g^{2}(\theta)=\sin ^{2} \frac{\theta}{2} \cdot \cos ^{2} \theta=\frac{1-\cos \theta}{2} \cdot \cos ^{2} \theta=$ $\frac{2(1-\cos \theta) \cdot \cos \theta \cdot \cos \theta}{4} \leqslant \frac{1}{4} \cdot\left[\frac{2(1-\cos \theta)+\cos \theta+\cos \theta}{3}\right]^{3}=\frac{2}{27}$, when and only when $\theta=\arccos \frac{2}{3}$.
Therefore, the maximum value of $g(\theta)$ is $\frac{\sqrt{6}}{9}$.
Of course, it can also be done as follows,
$$
\begin{aligned}
g(\theta) & =\sin \frac{\theta}{2} \cdot\left(1-2 \sin ^{2} \frac{\theta}{2}\right)=\frac{1}{2} \sqrt{4 \sin ^{2} \frac{\theta}{2} \cdot\left(1-2 \sin ^{2} \frac{\theta}{2}\right) \cdot\left(1-2 \sin ^{2} \frac{\theta}{2}\right)} \\
& \leqslant \frac{1}{2} \cdot \sqrt{\left[\frac{4 \sin ^{2} \frac{\theta}{2}+\left(1-2 \sin ^{2} \frac{\theta}{2}\right)+\left(1-2 \sin ^{2} \frac{\theta}{2}\right)}{3}\right]^{3}}=\frac{\sqrt{6}}{9} .
\end{aligned}
$$

When and only when $\theta=2 \arcsin \frac{\sqrt{6}}{6}$, the equality holds.
Therefore, the maximum value of $g(\theta)$ is $\frac{\sqrt{6}}{9}$.