# Integrals involving powers and beta (or hypergeometric) function

I have the three following integrals, very similar the one to the others, $$I_1^{(p)}(N)\equiv\frac{1}{2^{N+p}}\int_0^1(1+t)^{N-1}(1-t)^pB\left(\frac{1}{t+1};N+p+1,N\right)\text{d}t$$ $$I_2^{(p)}(N)\equiv 2^{2N-1}\int_0^1 t^{N-1}(1-t)^p\left(1-\frac{N+p+1}{N-1}t\right)B\left(\frac{1}{t+1};N+p+1,N\right)\text{d}t$$ $$I_3^{(p)}(N)\equiv\frac{2^{2N-1}}{N-1}\int_0^1 t^{N-1}(1-t)^pB\left(\frac{1}{t+1};N+p+1,N\right)\text{d}t$$ where $$N\in\mathbb{N}$$, $$p>0$$ and $$B(x;a,b)$$ is the incomplete beta function $$B(x;a,b)=\int_0^x u^{a-1}(1-u)^{b-1}\text{d}u.$$ What I am trying to find is a closed form for the quantity $$I^{(p)}(N)\equiv I_1^{(p)}(N)-I_2^{(p)}(N)+I_3^{(p)}(N).$$

I obtained the above expressions by starting from double integrals of the form given here and proceeding in the way described in the answer. Once I arrived to these single integrals, I was not able to proceed any further, nor to do relevant simplifications by putting all together in $$I^{(p)}(N)$$, which results in $$$$\begin{split} I^{(p)}(N)&=\int_0^1t^{N-1}(1-t)^pB\left(\frac{1}{t+1};N+p+1,N\right)\\[8pt] &\quad\cdot\left\{\frac{1}{2^{N+p}}\left(1+\frac{1}{t}\right)^{N-1}+\frac{2^{2N-1}}{N-1}\left[(N+p+1)t-(N-2)\right]\right\}\text{d}t. \end{split}$$$$

I cannot think of a proper useful substitution, and I obtained nothing by trying some, e.g. to transform the first argument of the beta function as $$1/(t+1)\to t$$.

Edit1: I managed to reduce the starting expression to $$$$\begin{split} &I^{(p)}(N)\equiv R(N,p)+J(N,p)\\[7pt] &=R(N,p)+\int_{\frac{1}{2}}^1t^{N+p}(1-t)^{N-1}\left[B\left(\frac{1}{2t};N,p+1\right)+\frac{2^{2N}}{N-1}B\left(\frac{1-t}{t};N,p+1\right)\right]\text{d}t \end{split}$$$$ where $$R(N,p)$$ is given by (I will provide the steps as soon as I can) $$$$\begin{split} R(N,p)&=B\left(\frac{1}{2};N+p+1,N\right)\left\{\frac{1}{2^{N+p}(p+1)}{}_2F_1(1,1-N;p+2;-1)+\right.\\[7pt] &\left.\quad+\frac{2^{2N-1}}{N-1}\left[(N+p+1)B(N+1,p+1)-(N-2)B(N,p+1)\right]\right.\\[7pt] &\left.\quad+B\left(\frac{1}{2};N,p+1\right)\right\}-B\left(\frac{1}{2};N,p+1\right)B(N,N+p+1)\\[7pt] &\quad-\frac{1}{N-1}B(p+2,2N){}_2F_1(1,p+2;2N+p+2;-1).\end{split}$$$$ Now the remaining integral appears to me simpler than the starting one, and I noted that by using the relation $$$$\tag{1}\label{eq1} B(z;a,b)=B(a,b)-B(1-z;b,a),$$$$ in the square brakets one obtains something of the form $$B\left(\frac{u}{2};p+1,N\right)+\frac{2^{2N}}{N-1}B\left(u;p+1,N\right),$$ i.e. the two beta functions differ only by a factor $$2$$ in their first argument.

Integrating by parts the integral in $$J(N,p)$$ I get $$$$\begin{split} J(N,p)&=B\left(\frac{1}{2};N,p+1\right)B(N,N+p+1)\\[7pt] &\quad-\frac{2^{2N}+N-1}{N-1}B\left(\frac{1}{2};N+p+1,N\right)B(N,p+1)\\[7pt] &\quad+\int_{\frac{1}{2}}^1\frac{(2t-1)^p}{t^{N+p+1}}\left[\frac{1}{2^{N+p}}+\frac{2^{2N}}{N-1}(1-t)^{N-1}\right]B(t;N+p+1,N)\,\text{d}t. \end{split}$$$$ with the final integral containing a single beta function, with a simple first argument.

Edit2: I found something that could be useful here, and the formula cited there here. By first using Eq. (\ref{eq1}) in $$I^{(p)}(N)$$ and then the relation $$B(z;a,b)=\frac{z^a(1-z)^{b-1}}{a}{}_2F_1\left(1,1-b;a+1;\frac{z}{z-1}\right),$$ the starting integral can be rewritten with the hypergeometric function $${}_2F_1$$ in the following form (here I neglect the terms that can be easily integrated) $$$$\begin{split} I^{(p)}(N)&=\, ...\,-\frac{1}{N}\int_0^1\frac{t^{2N-1}(1-t)^p}{(1+t)^{2N+p}}\left\{\frac{1}{2^{N+p}}\left(\frac{1+t}{t}\right)^{N-1}\right.\\[7pt] &\left.\quad+\frac{2^{2N-1}}{N-1}\left[(N+p+1)t-(N-2)\right]\right\}{}_2F_1(1,-N-p;N+1;-t)\,\text{d}t. \end{split}$$$$ Now it is easy to see that the three terms are all of the form given in the link above. In particular, the first one can be expressed with the Appell series $$F_3$$ according to the cited reference (I checked this result numerically with Mathematica) $$$$\begin{split} &\int_0^1\frac{t^N(1-t)^p}{(1+t)^{N+p+1}}{}_2F_1(1,-N-p;N+1;-t)\,\text{d}t\\[7pt] &\quad=\frac{B(N+1,p+1)}{2^{N+p+1}}F_3\left(N+p+1,1,p+1,-N-p,N+p+2;\frac{1}{2};-1\right). \end{split}$$$$ The problem is that this result does not hold for the second and third terms, due to the fact that the third argument of $${}_2F_1$$ (i.e. $$N+1$$) differs from the exponent of $$t$$ plus one ($$2N+1$$ and $$2N$$ respectively). Furthermore, I am not sure if further simplifications are possible.