Example 6 Suppose $0<\theta<\pi$, then the maximum value of $\sin \frac{\theta}{2}(1+\cos \theta)$ is $\qquad$
(1994, National High School Mathematics Competition)
Solution: From $00$.
$$
\begin{array}{l}
\sin \frac{\theta}{2}(1+\cos \theta)=2 \sin \frac{\theta}{2} \cos ^{2} \frac{\theta}{2} \\
=\sqrt{2} \sqrt{2 \sin ^{2} \frac{\theta}{2} \cdot \cos ^{2} \frac{\theta}{2} \cdot \cos ^{2} \frac{\theta}{2}} \\
\leqslant \sqrt{2} \sqrt{\left(\frac{2 \sin ^{2} \frac{\theta}{2}+\cos ^{2} \frac{\theta}{2}+\cos ^{2} \frac{\theta}{2}}{3}\right)^{3}} \\
=\frac{4 \sqrt{3}}{9} .
\end{array}
$$

The equality holds if and only if $2 \sin ^{2} \frac{\theta}{2}=\cos ^{2} \frac{\theta}{2}$, i.e., $\theta=2 \operatorname{arccot} \sqrt{2}$. The answer should be $\frac{4 \sqrt{3}}{9}$.