You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following integral should evaluate to 1 (for beta > 0). The function is a probability density function (PDF) of the angular elevation of points distributed on a unit sphere. If beta = 1, the points are uniformly distributed on the sphere. In the general case, Python 3.6.3 does not produce an answer in a reasonable amount of time (< 30 min):
The following integral should evaluate to 1 (for beta > 0). The function is a probability density function (PDF) of the angular elevation of points distributed on a unit sphere. If beta = 1, the points are uniformly distributed on the sphere. In the general case, Python 3.6.3 does not produce an answer in a reasonable amount of time (< 30 min):
(I am not sure why line breaks are not formatted correctly in the Preview.)
It works for beta = 1 (which greatly simplifies the expression) but again fails for beta = 2.
For comparison, Mathematica 11.2 produces the expected result (1) in less than 0.3 s on the same system:
Assuming[beta > 0, Integrate[beta*Sin[theta]/(2*(1 + (beta^2 - 1)*Cos[theta]^2)^(3/2)), {theta, 0, Pi}]] // Timing
In all other respects, Python did as well as Mathematica.
Thank you.
The text was updated successfully, but these errors were encountered: