# 分段求解一重定积分：涉及三角函数和凑微分的一道例题

## 一、题目

$$f(x)=\left\{\begin{array}{cc}x \mathrm{e}^{-x^{2}}, & x \geqslant 0, \\ \frac{1}{1+\cos x}, & -1<x<0,\end{array}\right.$$

$$I = \int_{1}^{4} f(x-2) \mathrm{d} x = ?$$

## 二、解析

$$t=x-2$$

$$x = t + 2$$

$$\mathrm{d} x = \mathrm{d} t$$

$$x \in(1,4) \Rightarrow t \in(-1,2) \Rightarrow$$

$$t \in(-1,0) \cup(0,2)$$

$$\int_{1}^{4} f(x-2) \mathrm{d} x=\int_{-1}^{2} f(t) \mathrm{d} t \Rightarrow$$

$$\int_{-1}^{0} \frac{1}{1+\cos t} \mathrm{d} t+\int_{0}^{2} t e^{-t^{2}} \mathrm{d} t.$$

[1]. 《常用的三角函数求导公式汇总

$$\cos 2 \alpha=2 \cos ^{2} \alpha-1 \Rightarrow$$

$$1+\cos 2 \alpha=2 \cos ^{2} 2 \Rightarrow$$

$$1+\cos ^{2} t=2 \cos ^{2} \frac{t}{2} \Rightarrow$$

$$\frac{1}{1+\cos t}=\frac{1}{2} \frac{1}{\cos ^{2} \frac{t}{2}} \Rightarrow$$

$$\frac{1}{2} \sec \frac{t}{2}=\frac{1}{2}\left(\tan \frac{t}{2}\right)_{t}^{\prime} \Rightarrow$$

$$\int_{-1}^{0} \frac{1}{1+\cos ^{2} t} \mathrm{d} t=\left.\frac{1}{2} \tan \frac{t}{2}\right|_{-1} ^{0}=\frac{1}{2}\left(0+\tan {\frac{1}{2}}\right)$$

$$\int_{0}^{2} t e^{-t^{2}} \mathrm{d} t = \frac{-1}{2} \int_{0}^{2} e^{-t^{2}} \mathrm{d} \left(-t^{2}\right) \Rightarrow$$

$$\left.\frac{-1}{2} e^{-t^{2}}\right|_{0} ^{2}=\frac{-1}{2}\left(e^{-4}-1\right)$$

$$I = \frac{1}{2} \tan \frac{1}{2}+\frac{1}{2}-\frac{1}{2} e^{-4}$$