Integral involving hypergeometric function

I've worked out the projection of a spherically symmetric power law volume density profile $$\rho(r)=br^a$$, i.e. its surface density $$\sigma(R)$$, and am now trying to integrate this in a series of annular bins to get the total mass in each, i.e. $$\int_A^B\sigma(R)R\,{\rm d}R$$. (Actually the profile is a continuous series of power laws, but that's more of a footnote.)

I've worked just about everything out, but am stuck on an integral of the form:

$$I(r,R,a)=\int\left(\left(\frac{r}{R}\right)^2-1\right)^{\frac{1}{2}}R^{a+2} {}_2{\rm F}_1\left(\frac{1}{2},-\frac{a}{2};\frac{3}{2};-\left(\left(\frac{r}{R}\right)^2-1\right)\right){\rm d}R$$

$${}_2{\rm F}_1$$ is the hypergeometric function, as defined here. $$a$$ and $$r$$ are constants, in this context.

Given that the solution of this integral will be used to calculate the elements of a big-ish matrix and I have some iteration in mind, integrating numerically is... inconvenient, but I'm stumped on finding an analytic solution. Is there any hope here, or should I start thinking about efficient numerical solutions?

• Try expanding the Hypergeometric then integrating term by term – clathratus Jan 10 '19 at 19:34
• @Kyle thank you very much for your generous bounty! – Paul Enta Jan 22 '19 at 9:07
• @PaulEnta thanks for the answer! The solution of the integral goes into a computation for a measurement in astrophysics/cosmology I'm collaborating on at the moment, which we should start writing up for a journal soon. If you would like, I'd be happy to add an acknowledgement of your contribution along the lines of "The authors thank the math.stackexchange.com user Paul Enta for providing an analytic expression for eq X", or similar. There is usually a short section with such notes anyway. You may reach me by email at either of the addresses listed here. – Kyle Jan 22 '19 at 9:20
• I am happy to see that this answer can be useful to you. Thank you for proposing to acknowledge this contribution in your future paper. I think that it can be a good advertisment for MSE in your community. I wish you the best for this article and for the next ones! – Paul Enta Jan 22 '19 at 9:59

In the following, we assume $$R>r$$. $$$$I(r,R,a)=\int\left(\frac{r^2}{R^2}-1\right)^{\frac{1}{2}}R^{a+2} {}_2{\rm F}_1\left(\frac{1}{2},-\frac{a}{2};\frac{3}{2};1-\frac{r^2}{R^2}\right){\rm d}R$$$$ changing $$u=1-r^2/R^2$$, we obtain $$$$I(r,R,a)=i\frac{r^{a+3}}{2}\int u^{\frac12}\left( 1-u \right)^{-\frac{a}{2}-\frac{5}{2}}{}_2{\rm F}_1\left(\frac{1}{2},-\frac{a}{2};\frac{3}{2};u\right){\rm d}u$$$$ where the principal determination for the square root was taken. Using the indefinite integration formula: $$$$\int z^{c-1 }(1 - z)^{b - c-1}{}_2{\rm F}_1\left( a,b;c;z \right)= z^c(1 - z)^{b - c} \frac{\Gamma(c)}{\Gamma(c+1)} {}_2{\rm F}_1\left( 1+a,b;1+c;z \right)$$$$ with $$a=1/2,b=-a/2,c=3/2$$, we find $$$$I(r,R,a)=-\frac{1}{3}R^{a+3}\left( \frac{r^2}{R^2}-1 \right)^{3/2} {}_2{\rm F}_1\left(\frac{3}{2},-\frac{a}{2};\frac{5}{2};1-\frac{r^2}{R^2}\right)$$$$ which seems to be numerically correct.