4. Given $x \in\left(0, \frac{\pi}{2}\right)$, then the integer part of the number $M=3^{\cos ^{2} x}+3^{\sin ^{3} x}$ is
A. 2
B. 3
C. 4
D. Cannot be determined
4. B Let $t=\sin ^{2} x$, then $t \in(0,1), m=3^{t}+3^{1-t}=3^{t}+\frac{3}{3^{t}} \cdot 3^{t} \in(1,3), 2 \sqrt{3} \leqslant M<4$. Therefore, $[M]=3$.