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})$
 A: 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).$$
A: Integrating by parts we have $$I_{n}=\int_{0}^{1}x^{n}\arctan\left(x\right)dx=\frac{\pi}{4\left(n+1\right)}-\frac{1}{\left(n+1\right)}\int_{0}^{1}\frac{x^{n+1}}{1+x^{2}}dx
 $$ $$ \stackrel{x^{2}=u}{=}\frac{\pi}{4\left(n+1\right)}-\frac{1}{2\left(n+1\right)}\int_{0}^{1}\frac{u^{n/2}}{1+u}du
 $$ and now since $$ \frac{u^{n/2}}{2}\leq\frac{u^{n/2}}{1+u}\leq\frac{u^{n/2-1}}{2}
 $$ we get $$\frac{\pi}{4\left(n+1\right)}-\frac{1}{2\left(n+1\right)n}\leq I_{n}\leq\frac{\pi}{4\left(n+1\right)}-\frac{1}{2\left(n+1\right)\left(n+2\right)}
 $$ and so $$\lim_{n\rightarrow\infty}n\left(\left(n+1\right)I_{n}-\frac{\pi}{4}\right)=\color{red}{-\frac{1}{2}}.
 $$
A: This is probably a too complex answer.
Considering $$J_n=\int x^n \tan^{-1}(x)\,dx=\frac{x^{n+1} \left((n+2) \tan ^{-1}(x)-x \,
   _2F_1\left(1,\frac{n}{2}+1;\frac{n}{2}+2;-x^2\right)\right)}{(n+1) (n+2)}$$ where appears the hypergeometric function, $$I_n=\int_0^1 x^n \tan^{-1}(x)\,dx=\frac{H_{\frac{n-2}{4}}-H_{\frac{n}{4}}+\pi }{4 (n+1)}$$ where appears the generalized harmonic numbers. So, $$A_n=n \left( (n+1)I_n-\frac{\pi }{4}\right)=\frac{1}{4} n \left(H_{\frac{n-2}{4}}-H_{\frac{n}{4}}\right)$$ Now, using the asymptotics of harmonic numbers $$A_n=-\frac{1}{2}+\frac{1}{2 n}+O\left(\frac{1}{n^3}\right)$$
A: $$
\begin{align}
I_n
&=\int_0^1x^n\arctan(x)\,\mathrm{d}x\\
&=\int_0^1\sum_{k=0}^\infty(-1)^k\frac{x^{n+2k+1}}{2k+1}\,\mathrm{d}x\\
&=\sum_{k=0}^\infty(-1)^k\frac1{(n+2k+2)(2k+1)}\\
&=\frac1{n+1}\sum_{k=0}^\infty(-1)^k\left(\frac1{2k+1}-\frac1{n+2k+2}\right)\\
&=\frac\pi{4(n+1)}-\frac1{n+1}\sum_{k=0}^\infty\frac{(-1)^k}{n+2k+2}
\end{align}
$$
Thus,
$$
\begin{align}
(n+1)I_n-\frac\pi4
&=-\sum_{k=0}^\infty\frac{(-1)^k}{n+2k+2}\\
&=\color{#00A000}{-\sum_{k=0}^\infty\left(\frac1{n+4k+2}-\frac1{n+4k+4}\right)}
\end{align}
$$
and because
$$
\color{#C00000}{-\frac2{(n+4k)(n+4k+4)}}
\le\color{#00A000}{-\frac2{(n+4k+2)(n+4k+4)}}
\le\color{#0000F0}{-\frac2{(n+4k+2)(n+4k+6)}}
$$
we get
$$
\color{#C00000}{-\frac12\underbrace{\sum_{k=0}^\infty\left(\frac1{n+4k}-\frac1{n+4k+4}\right)}_{\large\frac1n}}
\le(n+1)I_n-\frac\pi4
\le\color{#0000F0}{-\frac12\underbrace{\sum_{k=0}^\infty\left(\frac1{n+4k+2}-\frac1{n+4k+6}\right)}_{\large\frac1{n+2}}}
$$
Therefore, by the telescoping series above,
$$
-\frac{n}{2n}\le n\left((n+1)I_n-\frac\pi4\right)\le-\frac{n}{2n+4}
$$
and thus, by the Squeeze Theorem, we get
$$
\lim_{n\to\infty}n\left((n+1)I_n-\frac\pi4\right)=-\frac12
$$
