<s>[INST] integrate $\frac 1{x^2 + i}$ from $-\infty$ to $\infty$ I have a question regarding this complex integral. How do I calculate $$\int_{-\infty}^{\infty} \frac{1}{x^2 + i} \,{\rm d}x?$$ I keep getting the result $0$ and most probably doing it the wrong way.
 [/INST] Hint. Alternatively, one may observe that
$$
\int_{-\infty}^\infty\frac{1}{1+x^4}\:dx=\int_{-\infty}^\infty\frac{1}{\left(x-\frac1x\right)^2+2}\:\frac{dx}{x^2}=\int_{-\infty}^\infty\frac{1}{x^2+2}\:dx=\frac{\pi }{\sqrt{2}}
$$similarly
$$
\int_{-\infty}^\infty\frac{x^2}{1+x^4}\:dx=\int_{-\infty}^\infty\frac{1}{\left(x-\frac1x\right)^2+2}\:dx=\int_{-\infty}^\infty\frac{1}{x^2+2}\:dx=\frac{\pi }{\sqrt{2}}
$$ then, by writing
$$
\int_{-\infty}^\infty\frac{dx}{x^2+i}=\int_{-\infty}^\infty\frac{x^2-i}{x^4-i^2}\:dx=\int_{-\infty}^\infty\frac{x^2\:dx}{1+x^4}-i\int_{-\infty}^\infty\frac{dx}{1+x^4}
$$ one may conclude with the preceding identities.
</s>