# How to evaluate ∫∞0x−iax2+bx+1dx\int_{0}^{\infty} \frac{x^{-\mathfrak{i}a}}{x^2+bx+1} \,\mathrm{d}x using complex analysis?

We were told today by our teacher (I suppose to scare us) that in certain schools for physics in Soviet Russia there was as an entry examination the following integral given

where $a \in \mathbb{R}$, $b \in [0,2)$, and $\mathfrak{i}$ is the imaginary unit. And since we are doing complex analysis at the moment, it can, according to my teacher, be calculated using complex methods.

I was wondering how this could work? It seems hard to me to find a good curve to apply the residue theorem for this object, I suppose. Is there a trick to compute this integral?

$\phantom{}$ Dear MSE users, this is the new episode of Mister Feynman and Monsieur Laplace versus contour integration.

Tonight we have a scary integral, but we may immediately notice that

where $B$ is the root of $x^2+bx+1$ with a positive imaginary part. By the properties of the Laplace transform, the original integral is converted into

which can be evaluated in terms of the $\Gamma$ function.
Due to the reflection formula, the final outcome simplifies into

and we may notice that $B=\exp\left[i\arccos\frac{b}{2}\right]$ allows a further simplification.

Outro: poor children.