Message Boards Message Boards

0
|
472 Views
|
4 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Integral plotting error: integral and error estimates are 0 on all integration subregions

Posted 1 month ago

Hi, I hope you are all doing well. I would like to plot the results of this integral as a function of "A". However, when "A" reaches a certain value, the integral starts to diverge, resulting in a drop in the graph. If anyone has any ideas on how to solve this problem, I would greatly appreciate it. Thank you all in advance.

POSTED BY: Leo Murphy
4 Replies
Posted 1 month ago

Thank you all. If I change the ABS to ArcSin, I'm not sure if this will still work, though

POSTED BY: Leo Murphy

With rescaling works fine:

Regards M.I

POSTED BY: Mariusz Iwaniuk

Nice, as usual. From my view, it's the FullSimplify that makes the problem feasible. One can integrate to "infinity" by just going out to 0.001. NIntegrate does not sample very high in this case. If you want to break your approach :) try this:

NIntegrate[newfunc /. A -> 1000, {t, 0, 10000, Infinity}]

With arbitrary precision, one can avoid problems with high values of A and extend the plot to A = 10^10 (using your simplified func).

LogLogPlot[
 Abs[NIntegrate[func, {r, 0, 1*^-3}, PrecisionGoal -> 6, 
   WorkingPrecision -> 32]], {A, 10^-10, 10^10}, PlotRange -> All, 
 WorkingPrecision -> 32]

enter image description here

POSTED BY: Michael Rogers

Just above r == 1000, the integrand underflows, even with arbitrary precision.

Table[func, {r, {1.`16*^3}}, {A, 10^Range[-4, 7]}] (* really small numbers *)
Table[func, {r, {2.`16*^3}}, {A, 10^Range[-4, 7]}] (* Underflow[] *)

For just above r == 0.0008, it underflows at machine precision. Perhaps you can truncate the integration interval to {r, 0, 0.001}. For large values of A, it takes forever, though.

Perhaps the problem can be rescaled to better fit with floating-point numbers, but I have doubts it will be much more effective.

POSTED BY: Michael Rogers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract