-
-
Notifications
You must be signed in to change notification settings - Fork 39
Cauchy principal value integrals #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'm not sure this is desirable. This package is purely written in Julia and has minimal dependencies -- only one non-stdlib package so far. |
I have now removed the need for FastTransforms of the Cauchy integrator. The code seems to be significantly slower (~50%) since the Chebyshev coefficients are calculated with a O(N^2) formula instead of the O(N log N) discrete cosine transform algorithm used by FastTransforms (calling FFTW) |
|
That is an excellent transformation which I unfortunately did not know about. I still had the hope that the modified Clenshaw-Curtis quadrature method could outperform quadgk for nastier single-poled integrals (such that the work wouldn't go to waste) but quadgk is rightfully resilient and fast. May I suggest adding the transformation to the documentation, possibly with a snippet such as |

Here's an implementation that can evaluate Cauchy principal value integrals using the method presented here. It does not support infinite boundaries due to this already known problem.
I tried to stick to / reuse most of the base code of
do_quadgkbut some fundamental changes were needed to account for the evaluation of a function with multiple simple poles.One could argue that that is a bit redundant, since the user could just split the the integral into several 1-simple-poled functions, but I decided to keep it anyway.
I am sure certain things could be polished and a downside is that uses the FastTransforms library for this computation.
Some parts could still be polished (such as supporting functions beyond C -> C) but I think I should hear your feedback regarding bigger changes one should worry about first