3. If $y=\sqrt{3} \sin \frac{x}{4} \cdot\left(1+\cos \frac{x}{2}\right)(0 \leqslant x \leqslant 2 \pi)$, then the maximum value of $y$ is ( ).
(A) $2 \sqrt{3}$
(B) $\frac{4}{3}$
(C) $\frac{4 \sqrt{3}}{9}$
(D) $\frac{\sqrt{3}}{2}$
3. B.

Since $0 \leqslant x \leqslant 2 \pi$, i.e., $0 \leqslant \frac{x}{4} \leqslant \frac{\pi}{2}$, hence

Given $1-\cos ^{2} \frac{x}{4}=\frac{1}{2} \cos ^{2} \frac{x}{4}$, i.e., $3 \cos ^{2} \frac{x}{4}=2$, and $\frac{x}{4} \in\left[0, \frac{\pi}{2}\right]$, then $\cos \frac{x}{4}=\frac{\sqrt{6}}{3}$.
Thus, $\frac{x}{4}=\arccos \frac{\sqrt{6}}{3}$, i.e., $x=4 \arccos \frac{\sqrt{6}}{3}$, when $y_{\text {max }}=\frac{4}{3}$.