how to integrate the definite integral using residue theorem? How to evaluate $\int_{0}^{\infty}\dfrac{1}{x^a+1}dx$, where $a>1$. I don't know where to start since $x^a+1$ could have infinitely many roots, then it is impossible(?) to evaluate its residues. And even we did find a way to do so, how are we gonna choose the contour at the first place? Any hint would be appreciated.

Hint: It is done through integration along a branch cut:
By a change of variable and setting $b = 1 - \frac{1}{a}$, we have:
$\int_{0}^{\infty} \frac{1}{x^{a} + 1}dx = \frac{1}{a} \int_{0}^{\infty} \frac{t^{-b}}{t + 1}dt = \frac{1}{a} \frac{\pi}{\sin b\pi}$, where the last integral (this or its variant is likely to be an example in your textbook or class notes) is evaluated using residue method by integrating $f(z) = \frac{z^{-b}}{z + 1}$, where  $(|z| > 0, 0 < \arg z < 2\pi$ using a certain nice simple closed contour. 
