What contour to use the residue theorem Calculate
$\displaystyle\int_{0}^{-\infty }
\frac{\mathrm{d}x}{x^{2n}+1},\,\,\, n\in \mathbb{N}$ with
$n\in \mathbb{N}^{*}$.
I'm a bit thrown off by the bounds of this integral, in class we always used the upper half circle but does this mean I should use the lower half?
In which case $-i$ is the residue I'm considering?
Thank you,
-Velyth
 A: Well, surely you can notice that
$$
\int_0^\infty \frac{1}{x^{2n}+1}dx=\int_{-\infty}^{0} \frac{1}{x^{2n}+1}dx=-\int_0^{-\infty} \frac{1}{x^{2n}+1}dx
$$
because $\frac{1}{x^{2n}+1}$ is an even function. Now we focus on finding
$$
\int_{-\infty}^\infty \frac{1}{x^{2n}+1} dx=2\pi i \sum_k Res(\frac{1}{x^{2n}+1},x_k),
$$
where $x_k$ are zeros of ${x^{2n}+1}$ on the upper half plane. All $x_k$ are distinct and not repeated. We can actually write $x_k=e^{\frac{2k-1}{2n}\pi i},k=1,\ldots,n.$
Then you can go on to calculate the residues.
$$
Res(\frac{1}{x^{2n}+1},e^{\frac{2k-1}{2n}\pi i})=\lim_{z\to e^{\frac{2k-1}{2n}\pi i}} \frac{z-e^{\frac{2k-1}{2n}\pi i}}{z^{2n}+1}\\
=\lim_{z\to e^{\frac{2k-1}{2n}\pi i}} \frac{1}{2nz^{2n-1}}\\
=\frac{1}{2ne^{\frac{(2k-1)(2n-1)}{2n}\pi i}}
$$
Where we have used L'Hopital's rule in the second equality. Further,
$$
Res(\frac{1}{x^{2n}+1},e^{\frac{2k-1}{2n}\pi i})={(2n)^{-1}e^{-\frac{(2k-1)(2n-1)}{2n}\pi i}}\\
={(2n)^{-1}ne^{-\frac{(2k-1)}{2}(2-1/n)\pi i}}={-(2n)^{-1}e^{-\frac{(2k-1)}{2}(-1/n)\pi i}}\\
=-\frac{1}{2n}e^{\frac{2k-1}{2n}\pi i}
$$
Now can you continue?
Take the sum:
$$
2\pi i \sum_{k=1}^{n}  (-\frac{1}{2n})e^{\frac{2k-1}{2n}\pi i}\\
=2\pi i (-\frac{1}{2n}) \frac{1-(e^{\pi i/n})^{n}}{1-e^{\pi i/n}}e^{\frac{\pi i}{2n}}\\
=-\frac{\pi}{n} \frac{2i}{1-e^{\pi i/n}}e^{\frac{\pi i}{2n}}\\
=-\frac{\pi}{n} \frac{2i}{e^{-\frac{\pi i}{2n}}-e^{\frac{\pi i}{2n}}}\\
=\frac{\pi}{n \sin\frac{\pi}{2n}}.
$$
You are done now.
