Compute $\lim_{n \to \infty}n\int_{0}^{1}\frac{\cos x}{1+e^{nx}},\ n\in\mathbb{N}$ Let 
$$
I_n = n\int_{0}^{1}\frac{\cos x}{1+e^{nx}}\,dx\,,\quad n\epsilon \mathbb N^*.
$$ Calculate $\lim_{n \to \infty}I_n$

Integrating by parts,
$$
I_n=n\int_0^1\frac{\cos x}{1+e^{nx}}\,dx=-\int_0^1 \cos x\,\frac{d}{dx}\log(1+e^{-nx})\,dx
\\=\log2-\cos(1)\log(1+e^{-n})-\int_0^1\sin x\,\log(1+e^{-nx})\,dx\,.
$$
Now, 
$
\cos(1)\log(1+e^{-n})
$
tends to zero as $n\to\infty$ by continuity, while 
$$
\int_0^1\left|\sin x\,\log(1+e^{-nx})\right|dx\le\log2\int_0^1 |\sin x |\,dx=\log2[1-\cos(1)]\,,
$$
so the integral 
$$
\int_0^1 \sin x\,\log(1+e^{-nx})\,dx
$$ also tends to zero as $n\to\infty$ by the dominated convergence theorem and by continuity. Thus, 
$$
\lim_{n\to\infty}I_n=\log2\,.
$$
