# Integrating interpolated function with singularities

I have the following equations and List of values:

a0 = 0.520;
a1 = 0.902;
b0 = 0.520;
m = 0.13957;
rho[s_] = Sqrt[1 - 4 m^2/s];
step = (2)/20;
si = Table[(i) step, {i, 1, 21}]
ai = Table[{si[[i]], {a0 + a1 si[[i]]}}, {i, 1, 21}];
im = Table[0, {i, 1, 21}];


Now I have to interpolate imto any list of values in my region of interpolation, that is, si.

imi = Interpolation[Table[{si[[i]], im[[i]]}, {i, 1, 21}]];


And now I have to perform the following integral:

Rea =
Table[ai[[i, 2]], {i, 1, 21}] + (1/Pi) Table[
si[[i]] NIntegrate[imi[sp]/(sp (sp - si[[i]])), {sp, 4 m^2, 2},
Method -> PrincipalValue, Exclusions -> Thread[si == sp],
AccuracyGoal -> 8], {i, 1, 21}];


Surprisingly, it says that:

NIntegrate::pvrng: Singular points must be specified in the integration range in order to use PrincipalValue

I don't understand this because I'm already specifying the Exclusions with Thread. Does someone know why does it say so?

The error message means you have to put the singularities si in the "integration range," {sp, 4m^2, 2}, which you can do like this:

Rea = Table[
ai[[i, 2]], {i, 1, 21}] + (1/Pi) Table[
si[[i]] NIntegrate[imi[sp]/(sp (sp - si[[i]])),
Evaluate@Flatten@{sp, 4 m^2, si, 2},           (* insert  si  here *)
Method -> PrincipalValue, AccuracyGoal -> 8], {i, 1, 21}];

Rea
(*
{{0.6102}, {0.7004}, {0.7906}, {0.8808}, {0.971},  {1.0612}, {1.1514},
{1.2416}, {1.3318}, {1.422},  {1.5122}, {1.6024}, {1.6926}, {1.7828},
{1.873},  {1.9632}, {2.0534}, {2.1436}, {2.2338}, {2.324},  {2.4142}}
*)