10. (20 points) Find the maximum value of the function
$$
f(x)=\sqrt{3} \sin 2x + 2 \sin x + 4 \sqrt{3} \cos x
$$
10. Note that,
$$
\begin{array}{l}
f(x)=2 \sqrt{3} \sin x \cdot \cos x+2 \sqrt{3} \cos x+ \\
\quad 2 \sin x+2 \sqrt{3} \cos x \\
=2 \sqrt{3} \cos x(1+\sin x)+2(\sin x+\sqrt{3} \cos x) \\
\leqslant 2\left(\frac{\sqrt{3} \cos x+1+\sin x}{2}\right)^{2}+4 \sin \left(x+\frac{\pi}{3}\right) \\
=2\left[\sin \left(x+\frac{\pi}{3}\right)+\frac{1}{2}\right]^{2}+4 \sin \left(x+\frac{\pi}{3}\right) \\
\leqslant 2\left(1+\frac{1}{2}\right)^{2}+4=\frac{17}{2} .
\end{array}
$$

When $x=2 k \pi+\frac{\pi}{6}(k \in \mathbf{Z})$, the equality holds. Therefore, the maximum value of the function is $\frac{17}{2}$.