2. In $\triangle A B C$, $b^{2}=a c$, then the range of $\sin B+\cos B$ is
A. $(1, \sqrt{2}]$
B. $\left[\frac{1}{2}, 1+\frac{\sqrt{3}}{2}\right]$
C. $(0, \sqrt{2}]$
D. $\left(\frac{\sqrt{2}}{2}, 1\right]$
2. $\mathrm{A}$ Hint: $\cos B=\frac{c^{2}+a^{2}-b^{2}}{2 a c}=\frac{c^{2}+a^{2}-a c}{2 a c} \geqslant \frac{2 a c-a c}{2 a c}=\frac{1}{2}$, so $0<B \leqslant \frac{\pi}{3}, \frac{\pi}{4}<B+\frac{\pi}{4} \leqslant \frac{7}{12} \pi$. Therefore, $\sin B+\cos B=\sqrt{2} \sin \left(B+\frac{\pi}{4}\right) \in(1, \sqrt{2}]$.