Integral $\int\limits^{\infty}_0\frac{\tan^{-1}t }{(1+t)^{n+1}} dt$ I'm having a good amount of trouble evaluating this: $$\int\limits^{\infty}_0\frac{\tan^{-1}(t)dt}{(1+t)^{n+1}},\ n>0$$
Here are some methods I've tried:
$$\int\limits^{\infty}_0\frac{\tan^{-1}(t)dt}{(1+t)^{n+1}}=\frac1n\int\limits^{\infty}_0\frac{dt}{(1+t^2)(1+t)^{n}}$$
using integration by parts. I then tried more integration by parts, residue theorem, and expanding into a power series but failed. I did however use partial fractions for $n=2$ to get $1/4$.
$$\int\limits^{\infty}_0\frac{\tan^{-1}(t)dt}{(1+t)^{n+1}}=\frac{\pi}{2n}-\int\limits^{\infty}_0\frac1{(1+t)^{n+1}}\int\limits^{\infty}_0\frac{\sin(x)}xe^{-xt}dxdt=\frac{\pi}{2n}-\int\limits^{\infty}_0\frac{\sin(x)}xE_{n+1}(x)e^{-x}dx$$
using the Laplace Transform of $\text{sinc}(x)$ and the $E_n$-function.
$$\int\limits^{\infty}_0\frac{\tan^{-1}(t)dt}{(1+t)^{n+1}}=\int\limits^1_0\frac{\tan^{-1}(t)dt}{(1+t)^{n+1}}+\int\limits^1_0\frac{\cot^{-1}(t)t^{n-1}dt}{(1+t)^{n+1}}=\int\limits^1_0\frac{\tan^{-1}(t)\left(1-t^{n-1}\right)dt}{(1+t)^{n+1}}+\frac{\pi}{2^{n+1}n}$$
This one I felt the best about and its also where I got that at $n=1$ the integral is $\pi/4$, but I was unable to go further.
Update: I had a couple more attempts, one of which I posted as an answer, after Claude Leibovici's idea reminded me you can do partial fractions on $\frac1{(1+x^2)(1+x)^n}$.
Notice that if we write
$$\frac1{(1+x^2)(1+x)^n}=\frac{1+x}{1+x^2}-\frac{a_0+a_1x+\dots+a_{m-1}x^{m-1}}{(1+x)^n}$$
then the coefficients $a_k$ follow the pattern
$$a_0=0,\ a_1=C_1^{n+1},\ a_2=C_2^{n+1}-a_0,\ a_3=C_3^{n+1}-a_1,\ a_4=C_4^{n+1}-a_2\dots$$
The only problem is that this sequence is always infinite and the power series does not converge on all of $[0,\infty)$, so I believe the coefficients of $1$ and $x$ in the numerator of $\frac{1+x}{1+x^2}$ could be changed to avoid this.
 A: This is not an answer but it is too long for comments.
For the computation of
$$I_n=\int\limits^{\infty}_0\frac{dt}{(1+t^2)(1+t)^{n+1}}$$ it is amazing that a CAS gives a solution in terms of a generalized hypergeometric function which works very fine ... except when $n$ is an integer !
What I think is that writing
$$(1+t^2)(1+t)^{n+1}=(t+i)(t-i)(1+t)^{n+1}$$ and using partial fraction could be a solution. For example, for $n=3$, the integrand is
$$-\frac{1+i}{8(t+i)}-\frac{1-i}{8(t-i)}+\frac{1}{4 (t+1)}+\frac{1}{2
   (t+1)^2}+\frac{1}{2 (t+1)^3}$$ and
$$\int \Big[\frac{1+i}{8(t+i)}+\frac{1-i}{8(t-i)}\Big]\,dt=\frac{1}{8} \log \left(t^2+1\right)+\frac{1}{4} \tan ^{-1}(t)$$ For $n=4$ , the integrand is
$$\frac{i}{8 (t-i)}-\frac{i}{8 (t+i)}+\frac{1}{4 (t+1)^2}+\frac{1}{2 (t+1)^3}+\frac{1}{2   (t+1)^4}$$
$$\int \Big[\frac{i}{8 (t-i)}-\frac{i}{8 (t+i)}\Big]\,dt=-\frac{1}{4} \tan ^{-1}(t)$$ and, obviously,  the coefficients of the terms $\frac{1}{ t\pm i}$ are complex numbers if $n$ is odd and pure imaginary numbers if $n$ is even.
Probably, the two cases could be separatly studied.
All these integrals are in the form $I_n=a_n+b_n\pi$ but the $b_n$'s are all zero for $n=4k+2$
A: Note that $\int\limits^{\infty}_0\frac{\tan^{-1}t}{(1+t)^{n+1}}=\frac1nI_n$, where
$$I_n=\int\limits^{\infty}_0\frac{dt}{(1+t^2)(1+t)^{n}}$$
The integrand can be decomposed iteratively as
$$A_n(t)= \frac{A_{n-1}}{1+t}=\frac{1}{(1+t^2)(1+t)^{n}}
=\frac{a_n-b_n t}{1+t^2}+ \sum_{k=1}^{n}\frac{b_{n-k+1}}{(1+t)^k}\tag1
$$
where the coefficients satisfy the iterative relationships
$$a_n=\frac{a_{n-1}-b_{n-1}}2,\>\>\>\>\> b_n=\frac{a_{n-1}+b_{n-1}}2\tag2$$
Recognize $a_0=1$,  $b_0=0$
and compare
$$\cos \frac{n\pi}4= \frac1{2^{\frac12}}\left(\cos \frac{(n-1)\pi}4-\sin\frac{(n-1)\pi}4\right)
$$
$$\sin \frac{n\pi}4= \frac1{2^{\frac12}}\left(\cos \frac{(n-1)\pi}4+\sin\frac{(n-1)\pi}4\right)
$$
with (2) to get
$$a_n=\frac1{2^{\frac n2} }\cos\frac{n\pi}4,\>\>\>\>\>
 b_n=\frac1{2^{\frac n2} }\sin\frac{n\pi}4\tag3
$$
Then, integrate $A_n(t)$ in (1) to obtain
$$I_n= \int_0^\infty A_n(t)dt =\frac{\pi a_n}2+\sum_{j=1}^{n-1}\frac{b_{j}}{n-j}
$$
Substitute the coefficients (3) to arrive at the result
$$I_n = \frac\pi{2^{\frac{n+1}2}}\cos\frac{n\pi}4
+ \sum_{j=1}^{n-1}\frac{1}{(n-j) 2^{\frac j2}}\sin\frac{j\pi}4
$$
Listed below are the first few integral values
\begin{align}
& I_1 =\frac\pi4 \\ & I_2 =\frac12\\
 & I_3 =\frac34-\frac\pi8\\
 & I_4 =\frac23-\frac\pi8\\
 & I_5 =\frac{5}{12}-\frac\pi{16}\\
\end{align}
A: I was able to get some kind of recurrence relation for
$$I_n=\int\limits_0^{\infty}\frac{dt}{(1+t^2)(1+t)^n},$$
but I am not satisfied with it since you can't really do anything with it. It's still kind of an answer but I'll accept a better one.
First substitute $t\mapsto\frac1t$ so that
$$I_n=\int\limits_0^{\infty}\frac{t^ndt}{(1+t^2)(1+t)^n}.$$
Notice that you can modify the binomal expansion so it is similar to partial fractions:
$$\begin{align*}
(1+t)^n&=\sum_{k=0}^n\left(\begin{matrix}n\\k\end{matrix}\right)t^k\\
\left(1+\frac{-1}t\right)^n&=\sum_{k=0}^n\left(\begin{matrix}n\\k\end{matrix}\right)\left(\frac{-1}t\right)^k\\
\frac{t^n}{(1+t)^n}&=\sum_{k=0}^n\left(\begin{matrix}n\\k\end{matrix}\right)\left(\frac{-1}{1+t}\right)^k.\\
\end{align*}$$
It then follows that
$$I_n=\int\limits_0^{\infty}\frac1{(1+t^2)}\sum_{k=0}^n\left(\begin{matrix}n\\k\end{matrix}\right)\left(\frac{-1}{1+t}\right)^kdt
=\sum_{k=0}^n\left(\begin{matrix}n\\k\end{matrix}\right)(-1)^kI_k.$$
$$\implies\boxed{(1-(-1)^n)I_n=\sum_{k=0}^{n-1}\left(\begin{matrix}n\\k\end{matrix}\right)(-1)^kI_k}$$
Unfortunately it sucks and the most I was able to do with it was find $I_3=3/4-\pi/8$ from already knowing $I_0=\pi/2,$ $I_1=\pi/4,$ and $I_2=1/2$.
There may be some merit in the study of
$$I_n=\frac12\int\limits_0^{\infty}\frac{(1+t^n)dt}{(1+t^2)(1+t)^n}$$
or maybe splitting the interval into $[0,1]$ and $[1,\infty)$.
