A general framework of Numerical Singular Integrals (NSI) method based on the Integration By Parts (IBP) has been developed for integrals involving singular and nearly singular integrands, or NSI-IBP. Through a general integration by parts formula and by choosing some analytically integrable function to approximate the original integrand, various well-known integration by parts methods can be derived. Rigorous mathematical derivations have been performed to transform the original singular or nearly singular integrals into non-singular integrals that can be computed efficiently, along with the boundary values added. What's more important, the NSI-IBP method works well even when the exact form of the singular integrand is not known. Criteria on how to choose the appropriate function with a known analytical integral that closely approximates the original integrand have been outlined and explained. Numerical recipe has been presented to apply the proposed NSI-IBP. Numerical experiments have been carried out on various singular integrals such as the power-law decaying integrand, the logarithmic function, and their hybrid products. It can be shown that various relative accuracy up to 10−15 can be achieved, even the exact singular function is not known. Finally, the nearly singular integrals involving the scalar Green's function have been evaluated for both electrostatics applications and Computational Electromagnetics (CEM) applications.
Introduction
Singular integrals or nearly singular integrals exists in many physics problems and have attracted much attention in the past [1]-[10], including electrostatic problems [11]-[13] and electromagnetics problems [14]-[23]. For example, one of the difficulty in Computational Electromagnetics (CEM) is the singularity due to the Green’s function involved, which causes unavoidable singular integrals that need to be evaluated [14]-[23]. Similar problem happens in the Fourier spectral domain, where the Fourier spectrum of the green’s function is singular [24].
In some particular scenarios, analytical expressions exist for some particular singular or nearly singular integrals [3], [4], [25], [26]. What’s more, when the integrands of the singular or nearly singular integrals are known exactly, transform based methods can be employed [27]-[33]. However, Numerical Singular Integral methods (NSI) are much needed to carry out the general singular or nearly singular integrals where the exact forms of the integrands are not known, for example, when only numerical sampled values of the integrands are given, which is the focus of this paper.
As an introductory example in CEM, the scattered electric field at observation point rˉ′=x′x^+y′y^+z′z^ can be computed as the convolution integral of the scalar Green’s function with the surface current, as shown in Figure 1 and can be expressed as follows [14],
Figure 1. The convolution integral of scalar Green’s function shown together with the RWG surface current on a pair of triangles. The red points denote the observation locations. Without loss of generality, the right triangles of unit length is used for the numerical experiment because any quadrilateral can be mapped to the unit square using bilinear transformation.
where ∗ denotes the 2D convolution operation; ω is the angular frequency; μ is the permeability; and the electric dyadic Green’s function is given as Eq. (2),
Ge(rˉ)=[I+k21∇∇]g(rˉ),(2)
where I is the identity matrix; k is the magnitude of the wave vector k=[kx,ky,kz]; and g(r) is the scalar Green’s function at the observation point vector rˉ=[x,y,z],
g(r)=4πre−jkr,r=∣rˉ∣;k=∣kˉ∣=ωμϵ.
Similarly, the surface current can be expressed in terms of the convolution integral of the scalar Green’s function and the scattered electric field as follows [14],
Without loss of generality, the RWG right triangle pair forming a square of unit length is used, as shown in Figure 1. This is because any quadrilateral can be mapped to the square of unit length through bilinear transformation. Now the convolution integral of Eq. (4) for the positive right triangle reduces to the following,
which can be further simplified by change of variables x′−x→x and y′−y→y,
Ig(rˉ′)≡∫01I21(y)dy,(7)
with
I21(y)≡∫01−y(x2+R02)21pˉ0(x,y)dx,(8)
where R0=y2+(z′−z)2 and the following has been defined,
pˉ0(x,y)=4πe−jk[x2+R02]21Jˉ(x′−x,y′−y).(9)
It is clear that the integral I21(y) of Eq. (8) is singular when R0=0 and nearly singular when R0=0. So efficient numerical singular or nearly singular integral method is much needed, which is the focus of this paper.
The main contributions of this article are given below,
A general NSI framework based on a general IBP formula, i.e., the NSI-IBP method, has been presented and proved in a rigorous mathematical way;
The NSI-IBP method effectively transform the original singular or nearly singular integral into the non-singular integral that can be computed numerically friendly, plus the boundary values;
The NSI-IBP method works well for even when the exact singular or nearly singular integrands are not known, for example, when only numerical values at some given sample points of the integrands are given;
The number of sample points for the NSI-IBP method can be optimized by appropriately chose functions that approximate the singular or nearly singular integrands optimally to achieve the best computational cost and memory storage;
Criteria on choosing the appropriate singular or nearly singular function that can best approximate the original singular or nearly singular integrand have been discussed;
Experiments on typical singular integrals such as the power-law singular integrals, the logarithmic singular integrals and their hybrid products, as well as nearly singular integrals met in the electrostatic and electro-magnetics problems. The results show that the NSI-IBP method is very promising to compute various singular or nearly singular integrals, even when the exact form of the singular integrand is not known.
Finally, for simplicity of presentation, only 1D case is shown, this is because, higher dimensions such as the 2D RWG integral of Eq. (7) can be reduced to many 1D integrals.
Numerical Singular Integral Methods
It is clear that the convolution integrals involves singular integrands such as the scalar green’s function, among others. Such singular integrals need to be regularized before they can be implemented numerically.
Let’s look at the following general singular integral,
I0=∫abf(x)dx=∫abq(x)p(x)dx,(10)
where the integrand f(x) is singular that can be generally expressed as follows
f(x)=q(x)p(x),(11)
with p(x) is assumed to be the polynomial of order n, i.e., Pn, and q(x) containing roots xk, k≥1 within the range of integral [a,b],
p(x)∈Pn;q(xk)=0,k≥1.(12)
Integration by Part Method
The original integral I0 can be computed through the integration by part method as follows,
I0=p(x)h(x)ab−∫abh(x)p′(x)dx,(13)
with
h(x)=∫abq(x)1dx.(14)
However, the integration by part method requires q(x) and the analytical formula of h(x) are known, which sometimes is impossible.
Background and Notations
In this Section, basic background knowledge on IBP is presented, along with definitions of notations.
Simple Integration by Part Method
One might try to transform the original integral of Eq. (10) via the integration by part method as follows,
which means that q(x) has to follow the power law decay of xγ. So γ needs to be known before Eq. (16) can be computed efficiently.
Fractional Integration by Part Method
When q(x) or the analytical formula of h(x) of Eq. (14) is not known, a function q(x) with known hq(x) can be chosen to approximately represent q(x) and the original integral I0 can be evaluated as follows,
I0=∫abq(x)1p(x)dx,(23)
with
p(x)=q(x)q(x)p(x)=q(x)f(x).(24)
Similar to Eq. (13), Eq. (23) can be evaluated through the integration by part method as follows,
I0=p(x)hq(x)ab−I1,(25)
with
I1=∫abhq(x)[q(x)f(x)]′dx,(26)
and
hq(x)=∫abq(x)1dx.(27)
Since the integral I0 in Eq. (10) is singular, it is straightforward to reduces its value around its singularities by timing f(x) with some suppressing weight function q(x). So let’s consider the following integral,
I1=∫abh(x)dxd{q(x)f(x)}dx.(28)
The goal is to find some appropriate functions q(x) to meet the following criteria.
The integrand of I1 in Eq. (28) is finite and its derivatives are continuous so that conventional integral methods such as the quadrature rules can be applied,
where wj is some quadrature weight [1], [2], [34]-[36].
A Novel General Integration by Part Method
In this Section, a general IBP method that can be used to derive all IBP variants in Section IV is presented. Let’s consider the following more general integral,
I1=∫abh(x)dxd{q(x)f(x)}dx,(30)
where h(x) here might not be the same as h(x) as in Eq. (28).
Unknown q(x)
When h(x)=h~(x), the original integral I0 of Eq. (25) can be calculated as follows,
where q′(x) and q′′(x) denote the first derivative and second derivative respectively. In order to recover the original integral I0, q(x) should also satisfies the following relation,
which is actually the same as that obtained through integration by part method given in Eq. (13).
Discussion
It can be seen that the integral of Eq. (30) in Section V can lead to various of integration by part methods by choosing different q~(x), which are summarized as follow.
q~(x)=q(x): when q(x) is known and the indefinite integral of its inverse is known, it is equivalent to the integration by part method shown in Eq. (25).
I0=p(x)hq(x)ab−I′,(59)
with
I′≡∫abhq(x)p′(x)dx;(60)
hq(x)=∫q(x)1dx.
q~(x): other q~(x) close to q(x) can be used if the integral of its inverse h~q(x) is known and the following integration by part can be used,
I0=p~(x)h~q(x)ab−I~′,(61)
with
I~′=∫abh~q(x)[q~(x)f(x)]′dx(62)
h~q(x)=∫q~(x)1dx.
q~(x)=xγ: it is equivalent to the integration by part method shown in Eq. (16). In particular, when γ=0 and hγ(x)=x, the following is obtained,
I0=1−γ1{xf(x)∣ab−Iγ′},(63)
with
Iγ′≡∫abx1−γ[xγf(x)]′dx.(64)
In particular, when γ=0,
I0=xf(x)∣ab−I0′,(65)
with
I0′≡∫abxf′(x)dx.(66)
In practice, which one of the above integration by part is used depends on the following criteria.
a) The analytical formula of q(x) or q~(x) and integrals of its inverse hq(x) or h~q are known.
b) The integral I′, I~′ or Iγ′ should be non-singular and can be numerically computed efficiently.
Error Analysis
Now let’s perform the error analysis of Eq. (43). Without loss of generality, assuming that p′(x)=0 and the following is obtained,
Now let’s present the numerical singular integral algorithm via the integration by part methods.
For a given singular or nearly singular integral, the following numerical recipe can be used.
If the analytical formulas of q(x) and the integral of its inverse h(x) is known, then the integration by part method of Eq. (59) can be used. Otherwise, go to the next step.
Find an approximate function q~(x) that can closely fits q(x). Also, the analytical formula of the integral of its inverse h~(x) should be known. Then the integration by part method of Eq. (61) can be used. Otherwise, go to the next step.
Find q~(x)=xγ so that the original integrand f(x) can be effectively suppressed at its singularity location, i.e., xkf(xk)=0. Then, Eq. (63) can be used. If the integrand of Iγ′ is non singular and Iγ′ can be computed numerically, the algorithm stops. Otherwise, go to the next step.
Choose γ=0 and q~(x)=1, so that Eq. (65) can be used.
Repeat Step 4) until I0′ in Eq. (66) can be computed numerically, for example, when γ≤1 and is known.
Important Classes of Singular Integrals
Now let’s look at the following classes of singular integrals.
Singularities of Power-law Decay of x−γ
First, let’s consider the single singularity point located at xk=0 with q(x)=xγ. The singular integral of Eq. (10) reduces to the following,
I0=∫abxγp(x)dx.(72)
Approximate q~(x)
When γ is not known, it would be wise to choose q~(x)=xγ~ with γ~≥γ and Eq. (43) reduces to the following by setting q(x)=q~(x),
It can be shown in Eq. (73) that the order of polynomial in the integrand remains the same for arbitrary chosen γ~, which means that the performance of the numerical computation doesn’t depend on the choice of γ~=1.
Integration by Part Method
When γ is known, Eq. (13) reduces to the following,
I0=1−γxf(x)ab−∫ab1−γx1−γp′(x)dx.(75)
Direct Integration Methods
The formula for the direction integration methods given in Section V-B3 can be shown to be identical to the integration by part method of Eq. (75).
Logarithmic Singularities of lnβ(x)
The singular integral of Eq. (10) reduces to the following,
It is clear that Eq. (84) is non-singular and can be computed numerically readily. In particular, when β=0,
I0=∫abp(x)dx.(85)
Compared to the integration by part method of Eq. (77), the advantage of this method is that one doesn’t need to know the analytical form of hβ(x) and simply repeat the numerical integration of Eq. (83) using q~(x)=xβ.
Hybrid Singularities of x−γlnβ(x)
The singular integral of Eq. (10) reduces to the following,
Iγ,β=∫abxγlnβ(x)p0(x)dx.(86)
Approximate q~(x)
Similar to Eq. (73), when γ is not known, Eq. (43) reduces to the following by setting q(x)=q~(x),
To show the performance of the NSI-IBP method, the following numerical experiments have been carried out. During all numerical computation of the non-singular integrals, the 11-points Gauss-Laguerre quadrature method with 1001 sampling points is used. Finally, all computation is done in Python 3.12 within the PyCharm 2024.1 (Community Edition) environment.
For all experiments, only singularities at the boundaries are studied, because when the singularities are inside the integration zone, it can be divided into multiple integration zones such that the singularities will be on the boundaries. Finally, the relative accuracy of the integral computed through the NSI-IBP method, denoted as ϵ, is used to evaluate the performance, which is defined as the relative deviation NSI-IBP value I from its theoretical value I0 as follows,
ϵ≡I0I−I0.(103)
Singularities of Power-law Decay of x−γ
The following integral with power-law decay function is used,
Iγ=∫ab(x+o)γ1dx,γ∈[0,1),(104)
with the following theoretical value
Iγ=1−γ(x+o)1−γab,(105)
where γ and o≤0 are unknown.
The NSI-IBP method of Eq. (73) has been carried out. Figure 2 shows the accuracy surface plot of the NSI-IBP method with γ=1/2 and [a,b]=[0,1], when γ~ deviates from its exact value γ, i.e., Δγ≡γ~−γ∈[10−12,1]γ for different offsets o∈[10−25,104]. To get the better view of the accuracy, Figure 3 shows the line plots, from which the following are observed,
Figure 2. Accuracy surface plot for the power-law singular function of γ=1/2, with respect to the deviation of Δγ∈[10−12,1]γ for different offsets o∈[10−25,104].
Figure 3. Accuracy lines plot for the power-law singular function with γ=1/2, for different offset deviation o∈[10−25,104], when different deviations of Δγ∈[10−12,1]γ are used.
Smaller deviation, better accuracy: on one hand, it can be seen that the accuracy improves when γ~ reaches its exact value γ, better then 10−13 when Δγ=10−12 for o=10−25.
Large offset, constant accuracy: on the other hand, it can be seen that the accuracy approaches a constant value of
<10−4 when the offset becomes large o≫1, which can be understood as: when the offset o becomes large, the integrand is no longer singular and can be expanded into polynomial of some constant order n.
Worst case: around o∼10−3, the accuracy is the worst ϵ<10−1.3.
Hybrid Power-law and Logarithmic Singularities of x-(x)
The following integral with logarithmic singularity is used,
Iln,γ=∫ab(x+o)γln(x+o)dx,γ∈[0,1),(106)
with the following theoretical value,
Iln,γ=(1−γ)2(1−γ)ln(x)−1x1−γab,(107)
where γ and o≤0 are unknown.
The NSI-IBP method of Eq. (87) has been carried out with γ~=0. Figure 4 shows the accuracy surface plot of the NSI-IBP method for γ=1/2 within [a,b]=[0,0.01], when different Δγ and offsets o are used. To get the better view of the accuracy, Figure 5 shows the line plots, from which the following can be observed,
Figure 5. Accuracy lines plot for the hybrid singular function with γ∈[0,9], for different offsets o∈[10−25,104], when different deviations Δγ∈[10−12,1]γ are used.
γ-insensitive accuracy: the accuracy can reach ϵ<10−12 for all γ∈[0,9].
Optimum offsets: the best accuracy occurs around offsets o∼[0.1,10], where ϵ<10−15 could be achieved for the best case.
Electrostatics Problems
Now let’s consider the electrostatics problem of Eq. (8) when k=0, which is singular d=0 and nearly singular d=0,
I21(y)≡∫a(y)b(y)(x2+R2)211dx,(108)
with the following theoretical value,
I21(y)=ln(x2+R2+x)a(y)b(y),(109)
where d=x2+y2 and the following has been used
pˉ0(x,y)=4πJˉ(x′−x,y′−y)=1.(110)
The NSI-IBP method of Eq. (92) is used with γ~=1. Figure 6 shows the accuracy surface plot of the NSI-IBP method for d∈[0.1,0.2] within [a,b]=[0,d], when different offsets o∈[0,50]d are used. To get the better view of the accuracy, Figure 7 shows the line plots, from which the following can be observed,
Figure 7. Accuracy lines plot for the electrostatic problem, for different offset deviation of o∈[0,50]d.
ϵ<10−4: the accuracy is smaller than 10−4 for all combinations of (d,o).
Optimum offsets: the best accuracy can be obtained for each d by choosing appropriate offset o.
Electromagnetics Problems
Let’s consider the singular or nearly singular electromagnetics convolution integral Ig(rˉ′) of Eq. (7) of the scalar Green’s function with the surface current defined on a RWG triangle pair [21] and the observation point (x′,y′,z′) is set to the same RWG triangle pair, as shown in Figure 1,
where ℓ is the length of the common edge of the RWG triangle pair and +/− denote parameters defined on the positive/negative triangles respectively.
The NSI of Eq. (97) has been used to compute the convolution integral of Eq. (111) with k=1, for the RWG basis current of Jx,RWG and on the positive triangle. Without loss of generality, the RWG triangle pair is chosen to form a square of unit length, i.e.,v+=[0,0] and v−=[1,1]. The observation points are (x,y)+∈[0.05:0.1:0.95], as shown in Figure 1. Also, direct integral with 100,000 sampling points is used as the ground truth for comparison. Figure 8 shows the convolution integral surface plot. Finally, Figure 9 shows the accuracy surface plot, from which it can be seen that the relative accuracy is well below 10−6.
Figure 8. Surface plot of the convolution integral of the scalar Green’s function with the RWG current basis (only on positive triangle).
Conclusion
In this paper, a general framework to compute the singular or nearly singular integrals via the integration by part, or NSI-IBP method, has been presented. A general integration by part formula has been shown to be able to recover all well-known IBP methods. The NSI-IBP method doesn’t even need to know the exact forms of the singular or nearly singular integrands. By choosing appropriate singular or nearly singular function with known analytical integral, the singular and nearly singular integral can be transformed to non-singular integral, plus the boundary values. To make the NSI-IBP method more computation friendly, appropriate singular or nearly singular function with known analytical integral has to be chosen. The thumb of rule is to find the approximate function with known analytical integral that best fits the singular integrand. Numerical experiments have been carried out on various singular integrals such as the power-law decaying function, the logarithmic function and their hybrid products, which shows that the relative accuracy can be as good as 10−15 when the exact singular function is known and still works well even when the exact singular function is not known. What’s more, nearly singular integrals are numerically evaluated for both the electrostatic applications, as well as Computational Electromagnetics (CEM) involving the singular scalar Green’s function on the RWG triangle pair, which shows that the NSI-IBP method is very promising in many important applications involving singular integrands, even its exact form is not known. Finally, although 1D scenario is used to present the method, higher-dimensional singular integrals can be dealt with the NSI-IBP method because they can be reduced to many 1D integrals.
References
References
[1]J. Li, Y. Zhang, and X. Zhang, “Gaussian quadrature for certain two-dimensional hypersingular integrals,” Journal of Computational and Applied Mathematics, vol. 451, p. 116102, Dec. 2024, doi: 10.1016/j.cam.2024.116102.DOI
[2]G. Lombardi and D. Papicopico, “Quadrature of functions with endpoint singular and generalised polynomial behaviour in computational physics,” Computer Physics Communications, vol. 299, p. 109124, Jun. 2024, doi: 10.1016/j.cpc.2024.109124.DOI
[3]D. Tihon and C. Craeye, “Analytical evaluation of the 4-D singular integral: a different perspective for a systematic approach,” in 2023 International Conference on Electromagnetics in Advanced Applications (ICEAA), Oct. 2023, pp. 15–18. doi: 10.1109/ICEAA57318.2023.10297619.DOI
[4]A. Zuccotti and K. Cools, “Exact calculation of matrix entries in space-time Galerkin time domain boundary element method for the scalar wave equation,” in 2023 International Conference on Electromagnetics in Advanced Applications (ICEAA), Oct. 2023, pp. 362–366. doi: 10.1109/ICEAA57318.2023.10297834.DOI
[10]G. Monegato, “Numerical evaluation of hypersingular integrals,” Journal of Computational and Applied Mathematics, vol. 50, no. 1, pp. 9–31, 1994.DOI
[13]D. R. Wilton, S. Rao, A. Glisson, D. Schaubert, O. Al-Bundak, and C. Butler, “Potential integrals for uniform and linear source distributions on polygonal and polyhedral domains,” IEEE Transactions on Antennas and Propagation, vol. 32, no. 3, pp. 276–281, Mar. 1984, doi: 10.1109/TAP.1984.1143304.
[14]S. Liao and L. Ou, “The Ping-Pong Electromagnetic Algorithm for Reflecting Surface Antennas of Arbitrary Shapes,” IEEE Transactions on Antennas and Propagation, vol. 70, no. 4, pp. 2855–2862, Apr. 2022, doi: 10.1109/TAP.2021.3137164.DOI
[21]S. M. Rao, D. R. Wilton, A. W. Glisson, “Electromagnetic Scattering by Surfaces of Arbitrary Shape,” IEEE Transactions on Antennas and Propagation, vol. AP-30, no. 3, pp. 409-418, 1982.
[23]A. D. Yaghjian, “Electric dyadic Green’s functions in the source region,” Proc. IEEE, Vol. 68, 248-263, 1980.DOI
[24]S. Liao and Vernon Ronald J., “A fast algorithm for computation of electromagnetic wave propagation in half-space,” IEEE Transactions on Antennas and Propagation, Vol. 57, No. 7, pp. 2068-2075, 2009.DOI
[25]D. Tihon and C. Craeye, “All-Analytical Evaluation of the Singular Integrals Involved in the Method of Moments,” IEEE Transactions on Antennas and Propagation, vol. 66, no. 4, pp. 1925–1936, Apr. 2018, doi: 10.1109/TAP.2018.2803130.DOI
[26]A. G. Polimeridis and J. R. Mosig, “Complete semi-analytical treatment of weakly singular integrals on planar triangles with the direct evaluation method,” International Journal for Numerical Methods in Engineering, vol. 83, no. 12, pp. 1625–1650, 2010, doi: 10.1002/nme.2877.DOI
[33]W.-H. Tang and S. D. Gedney, “An efficient evaluation of near singular surface integrals via the Khayat–Wilton transform,” Microwave and Optical Technology Letters, vol. 48, no. 8, pp. 1583–1586, 2006, doi: 10.1002/mop.21722.DOI
[36]P. Kolm and V. Rokhlin, “Numerical quadratures for singular and hypersingular integrals,” Computers and Mathematics with Applications, vol. 41, no. 3, pp. 327–352, Feb. 2001, doi: 10.1016/S0898-1221(00)00277-7.DOI