The function f(x) has a singularity of the form 1/(x-a) inside the interval [-1, 1], so that the integral I exists only as a cauchy principal value. The weight function w(x) also has a singularity of the form log|x-b| at some point b which may be different from the point a.

Could anyone advise a good quadrature rule to deal with the cauchy principal value integral?
Is such a quadrature rule sensitive to the presence of other integrable singularities?
Maybe this rule is implemented in some Julia package?

Can SingularIntegralEquations.jl deal with the situation when there are both 1/x and log|x| singularities present? Also, is it possible to get the points and weights of the quadrature separately (I know f(x) only numerically, although I have an analytical estimate for the singularity)?

In my case, I would prefer not to evaluate x*f(x) at singularity.
I suppose, I should separate a symmetric interval centered on 1/x singularity and construct a symmetric quadrature on this interval. Then, the odd part of the integrand wonât contribute to the integral.

However, there is the problem stemming from the fact that the integrand looks like f(x)*w(x), and the weight function has its own singularity. In normal situation, I can account for the singularity of w(x) by constructing the appropriate gauss quadrature with this weight function.
So, I either suit-tailor the quadrature to the w(x), but it is non-symmetric with respect to 1/x singularity, or I construct symmetric quadrature for unity weight (f(x)*w(x) = (f(x)*w(x))*1), but it wonât be very accurate in the vicinity of the singularity of w(x).

In the situation when the singularities of f(x) and w(x) are well separated, I could treat them separately. What can be done in the situation when they are close to each other?

In any case where you have multiple singularities, you must typically break the integral into pieces at each singularity. (Assuming you donât want to build a special quadrature rule that takes all of your singularities into account. This is possible, but is probably more trouble than it is worth unless you are evaluating a lot of integrals for exactly the same singularities.)

(With QuadGK.jl, you can pass multiple integration segments to quadgk in a single call, which is useful because that means that adaptivity is based on a global estimate for the error of the whole integral, not on the errors of individual segments treated independently.)