[Math] Numerical integration of function with singularities

contour-integrationnumerical methods

I am currently trying to solve a semi-infinite integral containing a set of singularities lying on the real axis numerically.

The process I am using is breaking the integral into small steps $\Delta x$ and performing Gaussian quadrature to evaluate each step. My current understanding of dealing with numerical integration of integrals containing singularities is that:

  • If the singularity is removable (i.e. the residue may be shown to equal 0) then the above method is adequate so long as a small offset is used to prevent any Gauss points falling directly on the singularity. (Is it correct to say that these singularities are 'weakly singular'?)

  • For each singularity that is a pole with a non-zero residue, the same method is used, but $\sum i \pi \times \text{res}$ must be added to the result to include the poles that have been removed by indentation of the contour (the integral of the large arc $P_4 = 0$).

Consider the following path of integration for the example of a single pole at the origin as $N \rightarrow \infty$, and $\delta \rightarrow 0$:

enter image description here

My understanding is that the integrals of paths $P_1$ and $P_3$ should converge when evaluated numerically, using a small value for $\delta$. (The integral is asymptotic and may be truncated)

The problem is that whilst I have successfully dealt with the weakly singular integrals successfully in my computer code, I cannot get $P_1$ and $P_3$ to converge for the case of dealing with poles with $\text{res} \ne 0$.

Is my above understanding correct? Any tips would be greatly appreciated.

Best Answer

If the locations of the singularities of the integrand f(z) are known (or can be computed numerically, e.g. by Newton iterations), then the right thing is to integrate f(z)-(poles) numerically and then handle the poles analytically.

Related Question