<s>[INST] Solve $\int_0^1\frac{x(x+1)^b}{\alpha-x}dx$ using hypergeometric functions How can we solve this integral?
$$\int_0^1\frac{x(x+1)^b}{\alpha-x}dx$$
I used geometric series
$$=\int_0^1(x+1)^b\sum_{n=0}^\infty\left(\frac{x}{\alpha}\right)^{n+1}dx=\sum_{n=0}^\infty\int_0^1\left(\frac{x}{\alpha}\right)^{n+1}(x+1)^bdx$$
Using
$$\int_0^1t^b(1-t)^c(1-zt)^adt=\Gamma(b+1)\Gamma(c+1){_2}F_1(-a,b+1;c+b+2;z)$$
I got $$\sum_{n=0}^\infty a^{-n-1}\Gamma(n+2){_2}F_1(-b,n+2;n+3;-1)$$
The problem is I don't know how to simplify this any further. How can ${_2}F_1(-b,n+2;n+3;-1)$ be simplified?
 [/INST] $$\frac{x(x+1)^b}{\alpha-x}=\frac{(x-\alpha)(x+1)^b+\alpha(x+1)^b}{\alpha-x}=-(x+1)^b+\frac{\alpha(x+1)^b}{(\alpha+1)-(x+1)}$$
$$I=\int \frac{x(x+1)^b}{\alpha-x} \,dx=-\frac {(x+1)^{b+1}}{b+1}+\alpha J$$
$$J=\int \frac{(x+1)^b}{(\alpha+1)-(x+1)}\,dx$$
Let $$(x+1)=(\alpha+1) t\quad \implies \quad J=(1+\alpha)^b \int\frac {t^b}{1-t}\,dt $$
$$\int\frac {t^b}{1-t}\,dt=\frac{t^{b+1} }{b+1} \, \, \, _2F_1(1,b+1;b+2;t)=B_t(b+1,0)$$
Assuming $\alpha >1$, back to $x$
$$\color{red}{K=\int_0^1 \frac{x(x+1)^b}{\alpha-x} \,dx=\frac{1-2^{b+1}}{b+1}+}$$
$$\color{red}{\frac{\alpha }{(\alpha +1) (b+1)} \left(2^{b+1} \, _2F_1\left(1,b+1;b+2;\frac{2}{\alpha
   +1}\right)-\, _2F_1\left(1,b+1;b+2;\frac{1}{\alpha
   +1}\right)\right)}$$ or, simpler,
$$\color{blue}{K=\int_0^1 \frac{x(x+1)^b}{\alpha-x} \,dx=\frac{1-2^{b+1}}{b+1}+
\alpha  (\alpha +1)^b \left(B_{\frac{2}{\alpha
   +1}}(b+1,0)-B_{\frac{1}{\alpha +1}}(b+1,0)\right)}$$
</s>