(2) Let $f(x)=\frac{1}{2} \cos ^{2} x+\frac{\sqrt{3}}{2} \sin x \cos x+2, x \in\left[-\frac{\pi}{6}, \frac{\pi}{4}\right]$, then the range of $f(x)$ is $\qquad$ .
(2) $\left[2,2 \frac{3}{4}\right]$ Hint:
$$
\begin{aligned}
f(x)= & \frac{1}{2} \cos ^{2} x+\frac{\sqrt{3}}{2} \sin x \cos x+2 \\
& =\frac{1}{4}(1+\cos 2 x)+\frac{\sqrt{3}}{4} \sin 2 x+2 \\
& =\frac{1}{2} \sin \left(2 x+\frac{\pi}{6}\right)+\frac{9}{4}
\end{aligned}
$$

Since $x \in\left[-\frac{\pi}{6}, \frac{\pi}{4}\right]$, we have $2 x+\frac{\pi}{6} \in\left[-\frac{\pi}{6}, \frac{2 \pi}{3}\right]$. Therefore, $\sin \left(2 x+\frac{\pi}{6}\right) \in\left[-\frac{1}{2}, 1\right]$, so the range of $f(x)$ is $\left[2,2 \frac{3}{4}\right]$.