# Trouble evaluating this definite integral, either directly or with indefinite + limits

I have the function

$$\Sigma(x) = \frac{\sqrt{R^2-x^2}(\left| R\right| -1)}{\left(R^2-1\right) \left(x^2-1\right)}+\frac{\tan ^{-1}\left(\frac{\sqrt{R^2-x^2}}{\sqrt{R^2 \left(1-x^2\right)}}\right)-\tan ^{-1}\left(\frac{\sqrt{R^2-x^2}}{\sqrt{1-x^2}}\right)}{\left(1-x^2\right)^{3/2}}$$

and need to compute the integral

$$\overline{\Sigma}(x) =\frac{2}{x^2}\int_0^xx\Sigma(x')dx'$$

for $$0. My Mathematica (12.0) seems to hang without end on trying to do the definite integral:

sigx = (-ArcTan[Sqrt[R^2 - x^2]/Sqrt[1 - x^2]] + ArcTan[Sqrt[R^2 - x^2]/Sqrt[R^2 (1 - x^2)]])/(1 - x^2)^(3/2) + Sqrt[R^2 - x^2][-1 + Sqrt[R^2]]/((-1 + R^2) (-1 + x^2))
int = Integrate[x*sigx, {x, 0, X}, Assumptions->{x<1 && x<= R && x>0}]


And also on trying to take the limit on the indefinite result:

intIndef = Integrate[x*sigx, x, Assumptions->{x<1 && x<= R}]
Limit[intIndef, x->0, Assumptions->{R > 0, R \[Element] Reals}]


Note that I'm using what I think are important assumptions that should help things along. Is this integrand truly just nasty, or am I missing a possible technique?

• For the definite case I think the right assumption would be 0<X<1 (note capital x). That said, it still might hang. Oct 17, 2020 at 20:01

Answer revised for Abs[R] > 1

The code for sigx in the question contains a typo, [-1 + Sqrt[R^2]] instead of (-1 + Sqrt[R^2]). With it fixed and R > 1 chosen, consistent with the code in the question, the following returns an answer in just a few minutes for Version 12.1.1

Integrate[x*sigx, x, Assumptions -> 0 < x < 1 && R > 1];
int = Collect[Simplify[%, 0 < x < 1 && R > 1], ArcTanh[_], Simplify]
int0 = Simplify[int /. x -> 0, R > 1]

(* Sqrt[R^2 - x^2]/(1 + R) -
ArcTan[Sqrt[(-R^2 + x^2)/(-1 + x^2)]]/Sqrt[1 - x^2] +
ArcTan[Sqrt[(-R^2 + x^2)/(-1 + x^2)]/R]/Sqrt[1 - x^2] -
(2 (-1 + R) ArcTanh[Sqrt[(R^2 - x^2)/(-1 + R^2)]])/Sqrt[-1 + R^2] -
(Sqrt ArcTanh[Sqrt Sqrt[(R^2 - x^2)/(-1 + R^2)]])/Sqrt[-1 + R^2] +
((1 + R^2) ArcTanh[Sqrt[((1 + R^2) (1 - x^2/R^2))/(-1 + R^2)]])/Sqrt[-1 + R^4] *)
(* Pi/4 + R/(1 + R) - ArcTan[R] -
(2 (-1 + R) ArcTanh[R/Sqrt[-1 + R^2]])/Sqrt[-1 + R^2] -
(Sqrt ArcTanh[(Sqrt R)/Sqrt[-1 + R^2]])/Sqrt[-1 + R^2] +
((1 + R^2) ArcTanh[Sqrt[(1 + R^2)/(-1 + R^2)]])/Sqrt[-1 + R^4] *)


A sample plot, for R = 2, is

Plot[Chop[(int - int0) /. R -> 2], {x, 0, 1}, ImageSize -> Large,
LabelStyle -> {15, Bold, Black}] As verification, numerical integration yields the same curve.

NDSolveValue[{s'[x] == x*sigx /. R -> 2, s == 0}, s[x], {x, 0, 1}];


Incidentally, the corresponding definite integral,

Integrate[x*sigx, {x, 0, y}, Assumptions -> 0 < y < 1 && R > 1]


returns unevaluated after several minutes.

For large negative R, the corresponding code yields expressions too long to be reproduced here, but sample plots are identical to those for corresponding positive R, as are the numerical results. (That the numerical results are the same is to be expected, because R appears only as R^2 in sigx.)

• To @bbgodfrey You have taken over a typo from Anonymous in sigx  . Nearly at the end, he used square brackets instead of parentheses in [-1 + Sqrt[R^2]]  . So sigx und consequently your int  , where this appears nearly at the end of it, make no sense. Oct 18, 2020 at 12:42
• @Akku14 Yes, I saw that about 30 minutes ago and am about to fix it. Thanks. Oct 18, 2020 at 12:44