<s>[INST] Definite integral and limit $\lim_{n \rightarrow \infty} (n((n+1)I_{n}-\frac{\pi}{4})$ Given $I_{n} = \int_{0}^{1} x^{n} \arctan(x)dx $
Calculate:
$\lim_{n \rightarrow \infty} (n((n+1)I_{n}-\frac{\pi}{4})$
 [/INST] By integration by parts you have that
$$I_{n} = \int_{0}^{1} x^{n} \arctan(x)dx=\frac{1}{n+1}\left[x^{n+1}\arctan(x)\right]_0^1-\frac{1}{n+1}\int_{0}^{1} \frac{x^{n+1}}{1+x^2} dx\\=\frac{1}{n+1}\left(\frac{\pi}{4}-\int_{0}^{1} \frac{x^{n+1}}{1+x^2} dx\right)$$
Hence
$$(n+1)I_{n}-\frac{\pi}{4}=-\int_{0}^{1} \frac{x^{n+1}}{1+x^2} dx.$$
Now by using the same trick, you find that
$$\int_{0}^{1} \frac{x^{n+1}}{1+x^2} dx =\frac{1}{2(n+2)}+\frac{2}{n+2}\int_{0}^{1} \frac{x^{n+3}}{(1+x^2)^2}dx.$$
Finally
$$\lim_{n\rightarrow\infty} n\left(\left(n+1\right)I_{n}-\frac{\pi}{4}\right)=-\frac{1}{2}+\lim_{n\rightarrow\infty}\int_0^1 x^nf(x)dx=-\frac{1}{2}$$
where $f$ is a continuous function and 
$$\left|\int_0^1 x^nf(x)dx\right|\leq \max_{[0,1]}|f(x)|\int_0^1 x^ndx\leq \frac{\max_{x\in [0,1]}|f(x)|}{n+1}\to0.$$
P.S. By this procedure you can find more terms in the expansion of the infinitesimal sequence $I-n$. So far we have that
$$I_n=\frac{\pi}{4(n+1)}-\frac{1}{2n(n+1)}+o(1/n^2).$$
</s>