# A complicated answer to a simple Integral

This simple integration:

Integrate[ E^(I q x)/(q + I \[Kappa]), {q, -\[Infinity], \[Infinity]}, Assumptions -> { x \[Element]
Reals, \[Kappa] \[Element] Reals, x != 0, \[Kappa] != 0 }]


gives a complicated answer in terms of MeijerG function. Whereas the answer is simply

E^(- \[Kappa] x) (2 \[Pi] I ) UnitStep[\[Kappa] x] Sign[-\[Kappa]]

• Your suggestion is not true in view of Integrate[E^(I q 1/2)/(q + I 1/2), {q, -\[Infinity], \[Infinity]}] which results in 0, whereas E^(-\[Kappa] x) (2 \[Pi] I) UnitStep[\[Kappa] x] Sign[-\[Kappa]] /. \ {x -> 1/2, \[Kappa] -> 1/2} performs -((2 I \[Pi])/E^(1/4)). Commented May 20, 2021 at 6:13

Up to George Pólya, two small steps are better than one big step, so

Integrate[Cos[(q x)]/(q + I*\[Kappa]), {q, -\[Infinity], \[Infinity]}, Assumptions -> x > 0]


ConditionalExpression[ I*E^(x*\[Kappa])*Pi, Re[\[Kappa]] < 0]

and

Integrate[Sin[(q x)]/(q + I*\[Kappa]), {q, -\[Infinity], \[Infinity]},Assumptions -> x > 0]


ConditionalExpression[E^(x \[Kappa]) \[Pi], Re[\[Kappa]] < 0]