I am performing an contour integral of the form

```
h[R_, \[Epsilon]_, \[Rho]_, b_, Q_, k_, a_] :=
NIntegrate[
I*R*Exp[I*
t]/((k - a - b + I*\[Epsilon])*(k - a - Q/(R*Exp[I*t])*k +
I*\[Epsilon])*(R*Exp[I*t] - I*\[Epsilon]))*a^(-\[Rho]), {t, 2*Pi,
Pi}, Method -> "MonteCarlo", MinRecursion -> 10,
MaxRecursion -> 10, MaxPoints -> 10^4, PrecisionGoal -> 10,
WorkingPrecision -> 15]
```

for b,Q,a > 0, k < 0 and small positive $ \epsilon$ and small negative $ \rho$ (in the limit $ \epsilon$ goes to 0 from above, while $ \rho$ goes to 0 from below). R is also > 0, but since we ultimately want to take the limit $ R \rightarrow \infty $ , we choose R to be large. Mathematica can evaluate this and gives back the following solution:

```
sh[R_, \[Epsilon]_, \[Rho]_, b_, Q_, k_,
a_] := (-I k Q Log[k (Q - R) - R (a + I \[Epsilon])] +
I k Q Log[
k (Q + R) + R (a + I \[Epsilon])] - (a + k +
I \[Epsilon]) \[Epsilon] (Log[-R + I \[Epsilon]] -
Log[R + I \[Epsilon]]))/((a + k + I \[Epsilon]) (a - b + k +
I \[Epsilon]) ((a + I \[Epsilon]) \[Epsilon] +
k (I Q + \[Epsilon])))*a^(-\[Rho])
```

Now i check whether sh and f agree for given values of R,a,b,k,$ \rho$ ,$ \epsilon$ and i see that the imaginary part has a sign change:

```
In[29]:= h[10^10, 0.00000001, -0.00001, 5630, 2040, -10^6, 1]
Out[29]= 4.01458747711187*10^-19 - 3.12399828060183*10^-12 I
In[30]:= sh[10^10, 0.00000001, -0.00001, 5630, 2040, -10^6, 1]
Out[30]= 4.05686*10^-19 + 3.12401*10^-12 I
```

I do not really care about the real part since i expect the integral to be purely imaginary. But the sign flip between integral and its solution is strange. Do you guys know what happens there?