TITLE: $\int_0^\infty \frac{1}{1+x^ 9} \, dx$
QUESTION [8 upvotes]: $\int_0^\infty \frac{1}{1+x^9} \, dx$
I tried taking the integral of $\Gamma_R = [0,R] \cup \gamma_R \cup I_R$, where we see that \gamma_R is the circle parametrized by $z = Re^{it}$ with $t\in[0,\frac{\pi}{2}]$. And $I_R$ is the line form $iR$ to $0$
one can note the following three things:
1) $\int_0^\infty \frac{1}{1+x^ 9}\,dz$ = $\int_0^\infty \frac{1}{1+z^ 9}\,dz$. (Note that $z$ is on the $x$-axis)
2) $\int_{\gamma_R}\frac{1}{1+z^ 9} = 0$. (By the ML inequality)
the main problem is when i parametrize $I^{-}_{R}$ with $z(x) = xi$ and $x \in [0,R]$. The main problem is that i get that:
3) $\int_{I_R}\frac{1}{1+z^9} = -\int_{I_R^-}\frac{1}{1+z^9} = -\int_{0}^{R} \frac{i}{ix^9 + 1}$. 
note that i want to work towards taking $R$ to infinity eventually and then equal the sum of the integrals to the sum of the residuals of $\Gamma_R$ times $2\pi i$. The main problem here is that my term in 3), does not look like the form $c \cdot \int_{0}^{\infty}\frac{1}{1+x^ 9}$ with c a constant value. If i can get this done i think i'm finished.
PS: The singular points i got where $e^{\frac{\pi i}{9}},e^{\frac{3 \pi i}{9}}$.

REPLY [3 votes]: An easier way to evaluate the general case is to consider a sector surrounding one residue, rather than a whole circle because it's easier to compute the contour integral. To start, consider the function
$$f(z)=\frac 1{z^n+1}$$
Where $n$ is an integer. Now imagine a "pizza slice" contour of radius $R$ pictured below

As $R\to\infty$, the arc integral vanishes. Leaving us with
$$\oint\limits_{C}dz\, f(z)=\int\limits_0^{\infty}dx\, f(x)-e^{2\pi i/n}\int\limits_0^{\infty}dz\, f(z)$$
Here, observe that if you take out a factor of $e^{\pi i/n}$, you get$$e^{\pi i/n}(e^{-\pi i/n}-e^{\pi i/n})\int\limits_0^{\infty}dx\, f(x)=-2i e^{\pi i/n}\sin\left(\frac {\pi}n\right)\int\limits_0^{\infty}dx\, f(x)$$The contour integral as only one residue at $z=e^{\pi i/n}$. The residue is given by
$$\operatorname*{Res}_{z=e^{\pi i/n}}\frac 1{1+z^n}=\lim\limits_{z\to e^{\pi i/n}}\frac {z-e^{\pi i/n}}{z^n+1}=-\frac 1ne^{\pi i/n}$$Therefore$$-2ie^{\pi i/n}\sin\left(\frac {\pi}n\right)\int\limits_0^{\infty}dx\, f(x)=-\frac {2\pi i}ne^{\pi i/n}$$
Simplify both sides you see that
$$\int\limits_0^{\infty}\frac {dx}{1+x^n}=\frac {\pi}n\csc\left(\frac {\pi}n\right)$$