18、(本小题满分 13 分,(I)小问 7 分,(II)小问 6 分)
已知函数 $\mathrm{f}(\mathrm{x})=\frac{1}{2} \sin 2 \mathrm{x}-\sqrt{3} \cos ^{2} x$ .
(I)求 $f(x)$ 的最小周期和最小值;
(II)将函数 $f(x)$ 的图像上每一点的横坐标伸长到原来的两倍,纵坐标不变,得到函数 $g(x)$ 的图像.当 $\mathrm{x} \in\left[\frac{\pi}{2}, \pi\right]$ 时,求 $\mathrm{g}(\mathrm{x})$ 的值域.
参考答案(I)$f(x)$ 的最小正周期为 $\boldsymbol{p}$ ,最小值为 $-\frac{2+\sqrt{3}}{2}$ ;(II)$\left[\frac{1-\sqrt{3}}{2}, \frac{2-\sqrt{3}}{2}\right]$ .