This is an article that I've been studing for a while. I came across this integral equation:
$$\mathrm dm=\frac{\mathrm dr}{{r}^{z+1}\left[1-{\left(\dfrac{r_h}{r}\right)}^{n+z-1}\right]}$$
in which $n$, $z$ and $r_h$ are parameters and $r$ and $m$ are my variables. The general solution for $n + z > 1$ is:
$\qquad m=\frac{-{r}^{-z}}{z} _2F_1\big[1,\frac{z}{n+z-1};1+\frac{z}{n+z-1};{(\frac{r_h}{r})}^{n+z-1}\big]$
I want to know how that integral leads to a hypergeometric function of the second kind.
Making $a=r_h$, you want to compute $$I=\int r^{-z-1} \left(1-\frac{a}{r}\right)^{-n-z+1}\,dr$$ Make $\frac{a}{r}=t$ $$I=-a^{-z}\int t^{z-1} (1-t)^{-n-z+1}\,dt=-a^{-z}\int \frac{t^{z-1} } {(1-t)^{n+z-1} }\,dt$$ which would give $$I=-a^{-z} t^z \left(\frac{\, _2F_1(z,n+z;z+1;t)}{z}-\frac{t \, _2F_1(z+1,n+z;z+2;t)}{z+1}\right)$$ which is probably more pleasant that the one in your post.