12.8. Let $I_{n}=n \int_{0}^{1} \frac{\cos x}{1+e^{n x}} d x$, where $n \in \mathbb{N}^{*}$. Calculate: $\lim _{n \rightarrow \infty} I_{n}$.
## Solution:

We use the method of integration by parts and obtain

$$
\begin{gathered}
I_{n}=n \int_{0}^{1} \frac{\cos x}{1+e^{n x}} d x=n \int_{0}^{1} \cos x \frac{e^{-n x}}{1+e^{-n x}} d x=-\left.\cos x \cdot \ln \left(1+e^{-n x}\right)\right|_{0} ^{1}- \\
-\int_{0}^{1} \sin x \ln \left(1+e^{-n x}\right) d x=-\cos 1 \cdot \ln \left(1+e^{-n}\right)+\ln 2-\int_{0}^{1} \sin x \ln \left(1+e^{-n x}\right) d x
\end{gathered}
$$

Since $0<\ln \left(1+e^{-n x}\right)<e^{-n x}$, we obtain

$$
0 \leq \int_{0}^{1} \sin x \ln \left(1+e^{-n x}\right) d x \leq \int_{0}^{1} e^{-n x} \sin x d x \leq \int_{0}^{1} e^{-n x} d x=\frac{1}{n}\left(1-\frac{1}{e^{n}}\right)
$$

Passing to the limit in the last double inequality, we obtain

$$
\lim _{n \rightarrow \infty} \int_{0}^{1} \sin x \ln \left(1+e^{-n x}\right) d x=0
$$

Since $\lim _{n \rightarrow \infty} \ln \left(1+e^{-n}\right)=0$, we obtain $\lim _{n \rightarrow \infty} I_{n}=\ln 2$.