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?

  • $\begingroup$ Try expanding the Hypergeometric then integrating term by term $\endgroup$ – clathratus Jan 10 '19 at 19:34
  • $\begingroup$ @Kyle thank you very much for your generous bounty! $\endgroup$ – Paul Enta Jan 22 '19 at 9:07
  • $\begingroup$ @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. $\endgroup$ – Kyle Jan 22 '19 at 9:20
  • $\begingroup$ 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! $\endgroup$ – Paul Enta Jan 22 '19 at 9:59

In the following, we assume $R>r$. \begin{equation} 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 \end{equation} changing $u=1-r^2/R^2$, we obtain \begin{equation} 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 \end{equation} where the principal determination for the square root was taken. Using the indefinite integration formula: \begin{equation} \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) \end{equation} with $a=1/2,b=-a/2,c=3/2$, we find \begin{equation} 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) \end{equation} which seems to be numerically correct.

  • $\begingroup$ Checks out, many thanks! Out of curiosity, and for future use, what led you to that integral identity for the hypergeometric function? $\endgroup$ – Kyle Jan 11 '19 at 9:29
  • 1
    $\begingroup$ There are not so many indefinite integrals for the hypergeometric functions and yours seemed to be "well conditioned". $\endgroup$ – Paul Enta Jan 11 '19 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.