Skip to main content
1 of 3

Integrate gives inconsistent result for gamma-like integral with complex variables

I am trying to come up with a generic formula for the below integral, which is analogous to the upper incomplete gamma function,

Clear[x, t, n]; x1 =  FullSimplify[Integrate[(1 + I t)^(-1 - I x) E^(2 \[Pi] I n t) , {t, 0, 1}, Assumptions -> x > 0 && n > 0]]

I used assumptions to increase the likelihood of getting a correct answer. It gives me the not so neat function below: enter image description here

But I usually don't blindly trust Mathematica's results, so I tried to validate the formula it gave me,

Clear[t]; x = 2; n = 1; N[{x1 = Integrate[(1 + I t)^(-1 - I x) E^(2 \[Pi] I n t) , {t, 0, 1}],  x2 = I 2^((I x)/2) E^(-2 n \[Pi] - (13 \[Pi] x)/4) ((1 - I) n)^(I x) \[Pi]^(I x) ((1 - E^(2 \[Pi] x)) Gamma[-I x] - Gamma[-I x, -2 n \[Pi]] + E^(4 \[Pi] x) Gamma[-I x, (-2 - 2 I) n \[Pi]])}, 5]

but the values don't match:

enter image description here

Any ideas?