2. The range of the function $y=\sqrt{3 x+6}+\sqrt{8-x}$ is $\qquad$
By the Cauchy inequality, we have $(\sqrt{3} \cdot \sqrt{x+2}+\sqrt{8-x})^{2} \leqslant(3+1)(x+2+8-x)=40 \Rightarrow y \leqslant 2 \sqrt{10}$, equality holds when $\frac{x+2}{3}=8-x \Rightarrow x=\frac{11}{2}$; Since $-2 \leqslant x \leqslant 8, y^{2}=2 x+14+2 \sqrt{(3 x+6)(8-x)} \geqslant 10 \Rightarrow y \geqslant \sqrt{10}$, equality holds when $x=-2$. Therefore, the range of the function is $[\sqrt{10}, 2 \sqrt{10}]$.