0
$\begingroup$

In trying to compute following integral (spherical coordinates): $$\int[\rho+p_r]4\pi r^2dr$$ With:$$\rho=\frac{1}{2} f_0 \left(\frac{\sqrt{b_0 r}}{r^2 \sqrt{r \sqrt{b_0 r}}}\right){}^n$$ $$p_r=\frac{f_0 \left(\frac{\sqrt{b_0 r}}{r^2 \sqrt{r \sqrt{b_0 r}}}\right){}^n \left(-2 n \sqrt{r \sqrt{b_0 r}}+n r-r\right)}{2 \left(\sqrt{b_0 r}-r\right)}$$ Wolfram code for this variables:

\[Rho] = 1/
  2 f0 (Sqrt[r Subscript[b, 0]]/(
   r^2 Sqrt[r Sqrt[r Subscript[b, 0]]]))^n
pr = (f0 (Sqrt[r Subscript[b, 0]]/(
   r^2 Sqrt[r Sqrt[r Subscript[b, 0]]]))^
  n (-r + n r - 2 n Sqrt[r Sqrt[r Subscript[b, 0]]]))/(
 2 (-r + Sqrt[r Subscript[b, 0]]))

Where $f_0$ and $b_0$ is constants ($b_0>0$, $f_0\in{\rm I\!R}$). When I'm trying to compute the integral from first equation, I'm getting something like that: $$\Phi = -\Bigg[8 \pi \text{f0} \left(\frac{\sqrt{r \sqrt{b_0 r}}}{r^3}\right){}^n \left(\frac{b_0^3 r^3 \, _2F_1\left(1,6-\frac{9 n}{2};7-\frac{9 n}{2};\frac{r}{\sqrt{r b_0}}\right)}{3 n-4}-\frac{6 b_0^2 n r \left(r \sqrt{b_0 r}\right){}^{3/2} \, _2F_1\left(1,\frac{1}{2} (13-9 n);\frac{3}{2} (5-3 n);\frac{r}{\sqrt{r b_0}}\right)}{9 n-13}+\frac{3 (n-2) r \left(b_0 r\right){}^{5/2} \, _2F_1\left(1,7-\frac{9 n}{2};8-\frac{9 n}{2};\frac{r}{\sqrt{r b_0}}\right)}{9 n-14}\right)\bigg] \Bigg/\Bigg[3 b_0^3\Bigg]$$ Wolfram code:

Integrate[(\[Rho] + pr)*4 \[Pi]*r^2, r]


-((8 f0 \[Pi] (Sqrt[r Sqrt[r Subscript[b, 0]]]/r^3)^
  n ((r^3 Hypergeometric2F1[1, 6 - (9 n)/2, 7 - (9 n)/2, r/Sqrt[
      r Subscript[b, 0]]] 
\!\(\*SubsuperscriptBox[\(b\), \(0\), \(3\)]\))/(-4 + 3 n) + (
    3 (-2 + n) r Hypergeometric2F1[1, 7 - (9 n)/2, 8 - (9 n)/2, r/
      Sqrt[r Subscript[b, 0]]] (r Subscript[b, 0])^(5/2))/(-14 + 
     9 n) - (6 n r Hypergeometric2F1[1, 1/2 (13 - 9 n), 3/2 (5 - 3 n),
       r/Sqrt[r Subscript[b, 0]]] 
\!\(\*SubsuperscriptBox[\(b\), \(0\), \(2\)]\) (r Sqrt[
       r Subscript[b, 0]])^(3/2))/(-13 + 9 n)))/(3 
\!\(\*SubsuperscriptBox[\(b\), \(0\), \(3\)]\)))

But when I'm trying to build plot with arbitrary values of parameters $f_0$, $b_0$, $r$, output gives my ComplexInfinity. What should I do to avoid hypergeometric function, which gives me this ComplexInfinity? Any help will be appreciated. Best regards, Alex.

$\endgroup$
1
  • 1
    $\begingroup$ There is an unremovable singularity in \[Rho]+pr caused by the denominator 2 (-r + Sqrt[r Subscript[b, 0]]). $\endgroup$
    – user64494
    May 5, 2021 at 17:46

1 Answer 1

1
$\begingroup$

With a command like

N[TableForm[Table[{n, x, 
Hypergeometric2F1[1, (1/2)*(13 - 9*n), (3/2)*(5 - 3*n), x], 
Hypergeometric2F1[1, 6 - (9*n)/2, 7 - (9*n)/2, x]}, {n, 1, 
5}, {x, 0, 1.3, 0.13}]]]

you see that starting from n (integer) > 1 the Hypergeo functions show infinity the one or the other. For argument (sqrt[r/b0]) > 1 the numerical values get complex. You only can do a plot of the potential like

f0 = 1; b0 = 1; n = 1; Plot[(-(1/(3*(-4 + 3*n)*(-13 + 9*n))))*8*f0*Pi*
r^(3 - (9*n)/4)*(6*(4 - 3*n)*n*r^(1/4)*
Hypergeometric2F1[1, (1/2)*(13 - 9*n), (3/2)*(5 - 3*n), Sqrt[r]/Sqrt[b0]] + 
(-13 + 9*n)*(2 - n + (-1 + n)*
Hypergeometric2F1[1, 6 - (9*n)/2, 7 - (9*n)/2, 
Sqrt[r]/Sqrt[b0]])*b0^(1/4))*b0^(-(1/4) + n/4), {r, 0, b0}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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