<s>[INST] How to calculate the limit $\lim\limits_{n\to\infty} \int\limits_0^1 \frac{n(2nx^{n-1}-(1+x))}{2(1+x)}\,dx$? How to calculate the limit $\lim\limits_{n\to\infty}\displaystyle\int_0^1\dfrac{n(2nx^{n-1}-(1+x))}{2(1+x)} dx$?
I have to calculate the limit when solving

Find $a,b$ for $\displaystyle\int_0^1 \dfrac{x^{n-1}}{x+1} dx=\dfrac{a}{n}+\dfrac{b}{n^2}+o(\dfrac{1}{n^2}) (n\to\infty)$

First I calculated that
$\lim\limits_{n\to\infty} \displaystyle\int_0^1 \dfrac{nx^{n-1}}{x+1} dx=\dfrac{1}{2}$, thus $a=\dfrac{1}{2}$, then 
$2b=\lim\limits_{n\to\infty}\displaystyle\int_0^1\dfrac{n(2nx^{n-1}-(1+x))}{2(1+x)} dx$. 
However, I cannot find a good way to calculate it. 
 [/INST] Your evaluation of $a$ is correct. As regards $b$, note that, by integration by parts applied twice, we have that
$$\begin{align}
\int_0^1 \dfrac{x^{n-1}}{x+1} dx&=\frac{1}{2n}+\frac{1}{n}\int_0^1 \frac{x^{n}}{(x+1)^2} dx
\\
&=\frac{1}{2n}+\frac{1}{4n(n+1)}+\frac{2}{n(n+1)}\int_0^1 \frac{x^{n+1}}{(x+1)^3} dx.\end{align}$$
Morever
$$0\leq \int_0^1 \frac{x^{n+1}}{(x+1)^3} dx\leq \int_0^1 x^{n+1}dx=\frac{1}{n+2}.$$
Hence
$$\int_0^1 \dfrac{x^{n-1}}{x+1} dx=\frac{1}{2n}+\frac{1}{4n^2}+O(1/n^3)$$
and it follows that $b=1/4$ (and $a=1/2$).
</s>