1
|
7589 Views
|
5 Replies
|
3 Total Likes
View groups...
Share
GROUPS:

# Integral gives different answers on different versions of Mathematica

Posted 6 years ago
 In both Mathematica 10.4.1.0 and 11.1.0.0 Integrate[r^2 Sin[r^-3], {r, 0, \[Infinity]}]  gives Integrate::idiv: Integral of r^2 Sin[1/r^3] does not converge on {0,\[Infinity]}.  Now, using Integrate[r^2 Sin[r^-3 c], {r, 0, \[Infinity]}, Assumptions -> {c \[Element] Reals}]  still gives Integrate::idiv: Integral of r^2 Sin[c/r^3] does not converge on {0,\[Infinity]}.  in 11.1.0.0, but surprisingly gives -(1/6) c (-2 + 2 EulerGamma + Log[c^2])  in 10.4.1.0. Which result is correct?
5 Replies
Sort By:
Posted 6 years ago
 Thanks! Yes, the r integral diverges, but the 1-3z^2 term seems to rescue convergence in the 2D integral. This term alternates signs twice between z = -1 and +1, so it's plausible that this is possible.This is a funny situation to be in: to know the answer (helped by that faulty answer from Mathematica 10.4), but to have no clue how to get there, and no tool that might show the way.
Posted 6 years ago
 The math is pretty clear. It diverges due to 1/r asymptotoc behavior at infinity. One can see this using Series for example. Series[r^2*Sin[r^-3], {r, Infinity, 2}] (* Out[2]= SeriesData[r, DirectedInfinity[1], {1}, 1, 3, 1] *) 
Posted 6 years ago
 Nope, at least right now, I wouldn't know how to do this. The term (1 - 3 z^2) is a dealbreaker. If you use a*z^3 instead, an analytic solution is possible, but with your original expression, there are two terms including FresnelC that neither Rubi nor Mathematica is able to integrate.
Posted 6 years ago
 Thank you! Plotting the integrand also suggests a function that increases monotonically as r goes to infinity.This brings me to my original problem, a 2D integral of the form Integrate[ r^2 Sin[a r^-3 (1 - 3 z^2)], {r, 0, \[Infinity]}, {z, -1, 1}, Assumptions -> {a \[Element] Reals}] Mathematica fails to find an answer. But numerically, it appears that this double integral converges nicely In[56]:= R = 100; NIntegrate[ r^2 Sin[(1 - 3 z^2) r^-3], {r, 0, R}, {z, -1, 1}] Out[56]= 0.106513 with a value In[59]:= 4/27 (3 - Sqrt[12] ArcCoth[Sqrt[3]]) // N Out[59]= 0.106513 Is there a way to convince Mathematica to solve the 2D integral? I suppose the integral over z needs to be done first, since the r integral (for any z except [PlusMinus]1/Sqrt[3]) diverges.
Posted 6 years ago
 Using Rubi, you can investigate a bit further, what steps are required to find an antiderivative << Rubi int = Steps[Int[r^2 Sin[r^-3 * c], r]] First, you can show that the solution is indeed one valid antiderivative of your expression: In[31]:= D[int, r] Out[31]= r^2 Sin[c/r^3] Now, you can look at the limits of your integration bounds In[32]:= Limit[int, r -> 0, Direction -> "FromAbove"] Out[32]= ConditionalExpression[-(1/6) c (2 Log[c] - Log[c^2]), c \[Element] Reals] This looks good, but this here not In[33]:= Limit[int, r -> Infinity] Out[33]= c \[Infinity] `Therefore, I suspect your version 10.4 result is not correct and the integral does not converge.