How to calculate $ \int_0^1 \frac{(1+x)^{2r-1}}{1+x^2}dx $? Is there a way to express
$$
\int_{0}^{1}{\left(\, 1 + x\,\right)^{2r\ -\ 1} \over \!\!\!\!\!\!\! 1 + x^{2}}
\,{\rm d}x
$$
in a closed form with $r\in\mathbb{N}$?
 A: Using the binomial theorem, $$I=\sum_{k=0}^{2r-1}{2r-1\choose k}\int_0^1 \frac{x^k}{1+x^2}dx\equiv \sum_{k=0}^{2r-1}{2r-1\choose k}c_k.$$
When $k\geq 0$ is even (using A007509), $$c_k=\frac{\pi}{4} (-1)^{k/2}-(-1)^{k/2} \sum _{\ell=0}^{\frac{k}{2}-1} \frac{(-1)^\ell}{2 \ell+1},$$ and when $k$ is odd (taking an educated guess from the previous sequence), $$c_k=\frac{1}{2} (-1)^{\frac{k-1}{2}} \log (2)+(-1)^{\frac{k-1}{2}} \sum _{\ell=1}^{\frac{k}{2}} \frac{(-1)^\ell}{2 \ell}.$$
Substituting we obtain
$$I = \frac{\pi}{4}\sum_{k=0}^r(-1)^k{2r-1\choose 2k} - \sum_{k=1}^r(-1)^k{2r-1\choose 2k}\sum _{\ell=0}^{k-1} \frac{(-1)^\ell}{2 \ell+1} - \frac{\log 2}{2}\sum_{k=1}^r(-1)^k {2r-1\choose 2k-1} - \sum_{k=1}^r(-1)^k {2r-1\choose 2k-1}\sum _{\ell=1}^{k-1} \frac{(-1)^\ell}{2 \ell}.$$
The first and third summations, combined with the $\ell=0$ summation, have closed form, giving
$$I=\frac{1}{8} \left(2^r (\pi -4+\log (4)) \sin \left(\frac{\pi  r}{2}\right)+2^r (\pi -4-\log (4)) \cos \left(\frac{\pi  r}{2}\right)+8\right)\\
 - \sum_{k=1}^r(-1)^k{2r-1\choose 2k}\sum _{\ell=1}^{k-1} \frac{(-1)^\ell}{2 \ell+1} - \sum_{k=1}^r(-1)^k {2r-1\choose 2k-1}\sum _{\ell=1}^{k-1} \frac{(-1)^\ell}{2 \ell}.$$
Combining the last two terms gives
$$I=2^{r-3} (\pi -4+\log (4)) \sin \left(\frac{\pi  r}{2}\right)+2^{r-3} (\pi -4-\log (4)) \cos \left(\frac{\pi  r}{2}\right)+1\\
-\sum_{k=1}^{r}(-1)^k\left({2r-1\choose 2k}\sum_{\ell=1}^{k-1}\frac{(-1)^\ell}{2\ell+1}+{2r-1\choose 2k-1}\sum_{\ell=1}^{k-1}\frac{(-1)^\ell}{2\ell}\right),$$ where the last term is clearly a rational number.
I don't have time right now to see if this last sum has closed form. This answer is not a rigorous proof, but the formula seems to be correct. Maybe you could develop a rigorous proof starting from these insights.
