# 分段函数求不定积分的两种常用方法：不定积分法和变上限积分法

## 二、解析

### 解法一：分段函数分段求，再利用连续性确定未知参数

\begin{aligned} f(x) \\ \\ & = \max \left\{1, x^{2}\right\} \\ \\ & = \begin{cases} x^{2}, & x<-1 \\ 1, & -1 \leq x \leq 1 \\ x^{2}, & x>1 \end{cases} \end{aligned}

\begin{aligned} F(x) \\ \\ & = \int x^{2} \mathrm{~d} x \\ \\ & = \frac{1}{3} x^{3} + C_{1} \end{aligned}

\begin{aligned} F(x) \\ \\ & = \int 1 \mathrm{~d} x \\ \\ & = x + C_{2} \end{aligned}

\begin{aligned} F(x) \\ \\ & = \int x^{2} \mathrm{~d} x \\ \\ & = \frac{1}{3} x^{3} + C_{3} \end{aligned}

$$\textcolor{orangered}{ F(x) = \begin{cases} & \frac{1}{3} x^{3}+C_{1}, & x < -1 \\ \\ & x + C_{2}, & -1 \leq x \leq 1 \\ \\ & \frac{1}{3} x^{3} + C_{3}, & x > 1 \end{cases} }$$

$$\lim \limits_{x \rightarrow-1^{-}} F(x)=F(-1)$$

$$\lim \limits_{x \rightarrow 1^{+}} F(x)=F(1)$$

$$-\frac{1}{3}+C_{1}=-1+C_{2}$$

$$1+C_{2}=\frac{1}{3}+C_{3}$$

$$C_{1}=C_{2}-\frac{2}{3}$$

$$C_{3}=C_{2}+\frac{2}{3}$$

$$\textcolor{springgreen}{ F(x) = \begin{cases} \frac{1}{3} x^{3} + C – \frac{2}{3}, & x<-1 \\\ x + C, & -1 \leq x \leq 1 \\\ \frac{1}{3} x^{3} + \frac{2}{3} + C, & x>1 \end{cases} }$$

### 解法二：利用变上限积分

$$\max \left\{1, t^{2}\right\} = \begin{cases} t^{2}, & \mathrm{~d} t<-1 \\ 1, & -1 \leq t \leq 1 \\ t^{2}, & \mathrm{~d} t>1\end{cases}$$

\begin{aligned} G(x) \\ \\ \\ & = \int_{\textcolor{red}{0}}^{x} \max \left\{1, t^{2}\right\} \mathrm{~d} t \\ \\ \\ & = \begin{cases} \int_{\textcolor{red}{0}}^{x} \max \left\{\textcolor{springgreen}{1}, \textcolor{orangered}{t^{2}} \right\} \mathrm{~d} t, & x<-1 \\ \\ \int\_{\textcolor{red}{0}}^{x} \max \left\{ \textcolor{springgreen}{1}, \textcolor{orangered}{t^{2}} \right\} \mathrm{~d} t, & -1 \leq x \leq 1 \\\ \\\ \int\_{\textcolor{red}{0}}^{x} \max \left\{ \textcolor{springgreen}{1}, \textcolor{orangered}{t^{2}} \right\} \mathrm{~d} t, & x>1 \end{cases} \\ \\ \\ \end{aligned}

\begin{aligned} G(x) \\ \\ & = \begin{cases} \int_{\textcolor{red}{0}}^{-1} \textcolor{springgreen}{1} \mathrm{~d} t + \int_{-1}^{x} \textcolor{orangered}{t^{2}} \mathrm{~d} t, & x<-1 \\\ \\\ \int\_{\textcolor{red}{0}}^{x} \textcolor{springgreen}{1} \mathrm{~d} t, & -1 \leq x \leq 1 \\\ \\\ \int\_{\textcolor{red}{0}}^{1} \textcolor{springgreen}{1} \mathrm{~d} t+\int\_{1}^{x} \textcolor{orangered}{t^{2}} \mathrm{~d} t, & x>1 \end{cases} \\ \\ \\ & = \begin{cases} \frac{x^{3}}{3}-\frac{2}{3}, & x<-1 \\\ \\\ x, & -1 \leq x \leq 1 \\\ \\\ \frac{x^{3}}{3}+\frac{2}{3}, & x>1\end{cases} \end{aligned}

\begin{aligned} \int \max \left\{1, x^{2}\right\} \mathrm{~d} x \\ \\ \\ & = \int_{0}^{x} \max \left\{1, t^{2}\right\} \mathrm{~d} t + \textcolor{yellow}{C} \\ \\ \\ & = \begin{cases} \frac{x^{3}}{3}-\frac{2}{3}+C, & \mathrm{~d} x<-1 \\ \\ x + C, & -1 \leq x \leq 1 \\ \\ \frac{x^{3}}{3}+\frac{2}{3}+C, & \mathrm{~d} x>1\end{cases} \end{aligned}