4. 2. 11 * Find the maximum value of $\sin \frac{\theta}{2}(1+\cos \theta)$.


$$
\text{Analyze } \begin{array}{l}
\left|\sin \frac{\theta}{2}(1+\cos \theta)\right|-\left|\sin \frac{\theta}{2}\right| \cdot 2 \cos ^{2} \frac{\theta}{2} \\
=\sqrt{2 \cdot 2 \sin ^{2} \frac{\theta}{2} \cdot \cos ^{2} \frac{\theta}{2} \cdot \cos ^{2} \frac{\theta}{2}} \\
\leqslant \sqrt{2 \cdot\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}
$$

When $\tan \theta=\frac{\sqrt{2}}{2}$, the equality in the inequality holds. Therefore, the desired maximum value is $\frac{4 \sqrt{3}}{9}$.