已知 $f(x)=\max \left\{1, x^2\right\}$, 则 $\int f(x) d x= $
A. $\left\{\begin{array}{l}\frac{x^3}{3}-\frac{2}{3}+C, \quad x < -1 \\ x+C, \quad-1 \leq x \leq 1 \\ \frac{x^3}{3}+\frac{2}{3}+C, \quad x>1\end{array}\right.$
B. $\left\{\begin{array}{c}\frac{x^3}{3}+C, \quad x < -1 \\ x+C, \quad-1 \leq x \leq 1 \\ \frac{x^3}{3}+C, \quad x>1\end{array}\right.$
C. $\left\{\begin{array}{c}\frac{x^3}{3}+C_1, \quad x < -1 \\ x+C_2, \quad-1 \leq x \leq 1 \\ \frac{x^3}{3}+C_3, \quad x>1\end{array}\right.$
D. $\left\{\begin{array}{l}\frac{x^3}{3}-\frac{4}{3}+C, \quad x < -1 \\ x+C, \quad-1 \leq x \leq 1 \\ \frac{x^3}{3}+\frac{2}{3}+C, \quad x>1\end{array}\right.$