Skip to main content
added 1053 characters in body
Source Link
Alex Trounev
  • 52.2k
  • 4
  • 53
  • 125

Update 1. The second approach is mapping 4 coordinates onto a 4-sphere. The answer is slightly different from the 3-sphere, so we can evaluate the error of method "AdaptiveMonteCarlo":

\[Epsilon] = 10; y = r Cos[p3] Sin[p2] Sin[p1]; z = r Sin[p3] Sin[p2] Sin[p1]; \[Tau] = r Cos[p2] Sin[p1]; \[Tau]4 = r Cos[p1]; d = x^2 + y^2 + z^2; I15 = 1/((1 - x)^2 + y^2 + z^2 + \[Tau]^2) // FullSimplify; R = (1 + \[Tau]4^2) I15; S = (x^2 + y^2 + z^2 + (\[Tau] - \[Tau]4)^2) I15 // FullSimplify; a = 1/4 Sqrt[4*R*S - (1 - R - S)^2]; F = I Sqrt[-((1 - R - S - 4 I*a)/(1 - R - S + 4 I*a))]; Phi = 1/a Im[ PolyLog[2, F Sqrt[R/S]] + Log[Sqrt[R/S]]*Log[1 - F Sqrt[R/S]]]; integrand = I15^3/d^(1/2) (4 \[Tau]^2 I15 - 1) Phi; NIntegrate[ integrand r^3 Sin[p1]^2 Sin[p2], {x, -\[Infinity], 1 - \[Epsilon]/2}, {r, 0, \[Infinity]}, {p3, 0, 2 Pi}, {p2, 0, Pi}, {p1, 0, Pi}, Method -> "AdaptiveMonteCarlo"] // Timing (*Out[]= {239.531, -0.16635}*} 

Update 1. The second approach is mapping 4 coordinates onto a 4-sphere. The answer is slightly different from the 3-sphere, so we can evaluate the error of method "AdaptiveMonteCarlo":

\[Epsilon] = 10; y = r Cos[p3] Sin[p2] Sin[p1]; z = r Sin[p3] Sin[p2] Sin[p1]; \[Tau] = r Cos[p2] Sin[p1]; \[Tau]4 = r Cos[p1]; d = x^2 + y^2 + z^2; I15 = 1/((1 - x)^2 + y^2 + z^2 + \[Tau]^2) // FullSimplify; R = (1 + \[Tau]4^2) I15; S = (x^2 + y^2 + z^2 + (\[Tau] - \[Tau]4)^2) I15 // FullSimplify; a = 1/4 Sqrt[4*R*S - (1 - R - S)^2]; F = I Sqrt[-((1 - R - S - 4 I*a)/(1 - R - S + 4 I*a))]; Phi = 1/a Im[ PolyLog[2, F Sqrt[R/S]] + Log[Sqrt[R/S]]*Log[1 - F Sqrt[R/S]]]; integrand = I15^3/d^(1/2) (4 \[Tau]^2 I15 - 1) Phi; NIntegrate[ integrand r^3 Sin[p1]^2 Sin[p2], {x, -\[Infinity], 1 - \[Epsilon]/2}, {r, 0, \[Infinity]}, {p3, 0, 2 Pi}, {p2, 0, Pi}, {p1, 0, Pi}, Method -> "AdaptiveMonteCarlo"] // Timing (*Out[]= {239.531, -0.16635}*} 
Bounty Awarded with 50 reputation awarded by Pxx
Source Link
Alex Trounev
  • 52.2k
  • 4
  • 53
  • 125

We can reduce the time by 3 times using the change of variables and method "AdaptiveMonteCarlo". In this case, the integral is calculated without messages and errors, we have code

\[Epsilon] = 10; y = r Cos[p] Sin[t]; z = r Sin[p] Sin[t]; \[Tau] = r Cos[t]; d = x^2 + y^2 + z^2; I15 = 1/((1 - x)^2 + y^2 + z^2 + \[Tau]^2) // FullSimplify; R = (1 + \[Tau]4^2) I15; S = (x^2 + y^2 + z^2 + (\[Tau] - \[Tau]4)^2) I15 // FullSimplify; a = 1/4 Sqrt[4*R*S - (1 - R - S)^2]; F = I Sqrt[-((1 - R - S - 4 I*a)/(1 - R - S + 4 I*a))]; Phi = 1/a Im[ PolyLog[2, F Sqrt[R/S]] + Log[Sqrt[R/S]]*Log[1 - F Sqrt[R/S]]]; integrand = I15^3/d^(1/2) (4 \[Tau]^2 I15 - 1) Phi; In[14]:= NIntegrate[ integrand r^2 Sin[ t], {\[Tau]4, -\[Infinity], \[Infinity]}, {x, -\[Infinity], 1 - \[Epsilon]/2}, {r, 0, \[Infinity]}, {p, 0, 2 Pi}, {t, 0, Pi}, Method -> "AdaptiveMonteCarlo"] // Timing (*Out[]= {217.781, -0.164111}*)