# 求解定积分 $\int_{-2}^{2}$ $x \ln(1+e^{x})$ $\mathrm{d} x$

## 一、题目

$$\int_{-2}^{2} x \ln(1+e^{x}) \mathrm{d} x = ?$$

## 二、解析

$$t = -x$$

$$x = -t$$

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

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

Next

$$\int_{-2}^{2} x \ln(1+e^{x}) \mathrm{d} x =$$

$$– \int_{2}^{-2} (-t) \ln(1+e^{-t}) \mathrm{d} t =$$

$$– \int_{-2}^{2} t \ln(1+e^{-t}) \mathrm{d} t.$$

Next

$$– \int_{-2}^{2} x \ln(1+e^{-x}) \mathrm{d} x =$$

$$– \int_{-2}^{2} x \ln(1+\frac{1}{e^{x}}) \mathrm{d} x =$$

$$– \int_{-2}^{2} x \ln(\frac{e^{x} + 1}{e^{x}}) \mathrm{d} x =$$

$$– \int_{-2}^{2} x \Big[ \ln(1 + e^{x}) – \ln e^{x} \Big] \mathrm{d} x =$$

$$– \int_{-2}^{2} x \ln(1 + e^{x}) \mathrm{d} x + \int_{-2}^{2} x\ln e^{x} \mathrm{d} x =$$

$$– \int_{-2}^{2} x \ln(1 + e^{x}) \mathrm{d} x + \int_{-2}^{2} x^{2} \mathrm{d} x.$$

Next

$$\int_{-2}^{2} x \ln(1+e^{x}) \mathrm{d} x = – \int_{-2}^{2} x \ln(1 + e^{x}) \mathrm{d} x + \int_{-2}^{2} x^{2} \mathrm{d} x \Rightarrow$$

$$2 \int_{-2}^{2} x \ln(1+e^{x}) \mathrm{d} x = \int_{-2}^{2} x^{2} \mathrm{d} x \Rightarrow$$

$$\int_{-2}^{2} x \ln(1+e^{x}) \mathrm{d} x = \frac{1}{2} \int_{-2}^{2} x^{2} \mathrm{d} x \Rightarrow$$

$$\int_{-2}^{2} x \ln(1+e^{x}) \mathrm{d} x = \frac{1}{2} \cdot \frac{1}{3} x^{3} \Big|_{-2}^{2} = \frac{1}{6} (8 + 8) = \frac{8}{3}.$$