Optimization of numerical evaluation of Cauchy principal value

17 Views Asked by At

I need an efficient way to evaluate the Cauchy principal value of a function so that I can do it thousands of times in a timely manner. It boils down to this:

$g(t,x,y)=P\int_0^\infty \frac{f(u,x,y)}{u-t}du$

To do so, I have resorted to the following paper (link), and they basically say the following:

$P\int_a^b \frac{f(u)}{u-t}du=\int_a^{t-\Delta} \frac{f(u)}{u-t}du + P\int_{t-\Delta}^{t+\Delta} \frac{f(u)}{u-t}du+\int_{t+\Delta}^{b} \frac{f(u)}{u-t}du$

The first and last integrals are evaluated via a simple gaussian quadrature, and the principal value around the discontinuity is evaluated also through a gaussian quadrature but with a different rule:

$P\int_{t-\Delta}^{t+\Delta}=\sum_{i=1}^{2M}\frac{w_i}{x_i}f(\Delta x_i + t)$

This is actually capable of giving nice results, given a suitable $\Delta$ value. My question now is: What are the rules for the choice of $\Delta$?