设 $I_1=\int_0^\pi \mathrm{e}^{-x^2} \cos x \mathrm{~d} x, I_2=\int_{\frac{\pi}{2}}^{\frac{3 \pi}{2}} \mathrm{e}^{-x^2} \cos x \mathrm{~d} x, I_3=\int_\pi^{2 \pi} \mathrm{e}^{-x^2} \cos x \mathrm{~d} x$, 则
A. $I_1 < I_2 < I_3$.
B. $I_3 < I_2 < I_1$.
C. $I_2 < I_3 < I_1$.
D. $I_2 < I_1 < I_3$.