2. Given vectors $\boldsymbol{m}=(\cos x, -\sin x), \boldsymbol{n}=(\cos x, \sin x - 2 \sqrt{3} \cos x), x \in \mathbf{R}$, then the range of $f(x)=$ $m \cdot n, x \in\left[\frac{\pi}{4}, \frac{\pi}{2}\right]$ is $\qquad$.
2. $[-1, \sqrt{3}]$ Detailed explanation: $f(x)=\boldsymbol{m} \cdot \boldsymbol{n}=\cos ^{2} x-\sin ^{2} x+\sqrt{3} \sin 2 x=\cos 2 x+\sqrt{3} \sin 2 x=$ $2 \sin \left(2 x+\frac{\pi}{6}\right)$.
And $\sin \left(2 x+\frac{\pi}{6}\right) \in\left[-\frac{1}{2}, \frac{\sqrt{3}}{2}\right]$, so $f(x) \in[-1, \sqrt{3}]$.