Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • $\begingroup$ I don't think MonteCarlo or any method that doesn't use the principal value will work, in the same way that it doesn't work for the integral of 1/x. In spherical coordinates one ends up having the integral of dq/(q^2+w/b), which is of the dx/x type (the edit was mine :P but I thought I was logged in). However, I will use your suggestion when I have some singularity whose integral doesn't diverge on each side. $\endgroup$ Commented Sep 23, 2015 at 3:11
  • $\begingroup$ I guess this is what comes of having basically written NIntegrate. Wow. $\endgroup$ Commented Sep 24, 2015 at 5:34
  • 1
    $\begingroup$ Hey, thanks for the detailed reply! I'll have to read it later. I was actually thinking about writing the solution I decided to implement in a few days when I get more time; now I should finish rounding up what I have. But what I ended up doing is evaluating the interpolating functions in the singularity surface (narrow strip), since they vary smoothly there. And I just have dq/(q^2+w/b) which I can solve analytically. So in this way I treat the hard (singularity) part analytically, and the rest I do with NIntegrate without needing to change coordinates :), using Exclusions->{0,0,0}. $\endgroup$ Commented Sep 24, 2015 at 18:23
  • $\begingroup$ Thanks for your feedback, guys! @wikiwert it seems that the solution you outlined is very similar to the one I am proposing. I am also trying to avoid the coordinate change. $\endgroup$ Commented Sep 25, 2015 at 1:21
  • $\begingroup$ Silly thing...but I couldn't even find PiecewiseNIntegrate in the documentation. I'll have to read for some time before I can understand the syntax. But mainly, I don't know how to go about using PrincipalValue for two lists. $\endgroup$ Commented Sep 28, 2015 at 7:33