I'm having trouble with the step highlighted in green. As the angle $2\pi /n$is maintained as R goes to infinity, I don't see how you end up just integrating on the x axis.


I'm having trouble with the step highlighted in green. As the angle $2\pi /n$is maintained as R goes to infinity, I don't see how you end up just integrating on the x axis.


Since the notes you attached are a little cavalier, I have added the details for the problem. Let $f(z) = \frac{1}{1+z^n}$ and $\Gamma$ is the arc. From the contour, we have $$ \int_0^{\infty}\frac{dx}{1 + x^n} = \lim_{R\to\infty}\biggl[\int_0^R+\int_{\Gamma}+\int_R^0\biggr]f(z)dz = 2i\pi\sum_j\operatorname{Res}\{f(z);z_j\} $$ The only pole in the sector is then $z = e^{i\pi/n}$. The residue is then $$ \lim_{z\to e^{i\pi/n}}\frac{z-e^{i\pi/n}}{1+z^n}=\lim_{z\to e^{i\pi/n}}\frac{1}{nz^{n-1}}=\frac{-e^{i\pi/n}}{n} $$ Therefore, we now have $$ \frac{-2i\pi e^{i\pi/n}}{n} = \int_0^{\infty}\frac{dz}{1+z^n}+\lim_{R\to\infty}\int_0^{2\pi/n}\frac{iRe^{i\theta}}{1+R^ne^{in\theta}}d\theta+\int_{\infty}^0\frac{dz}{1+z^n} $$ where, for the third integral, $z = re^{2i\pi/n}$, $r\in[0,R]$, and $dz = e^{2i\pi/n}dr$. Then the third integral can be written as $$ -\int_0^{\infty}\frac{e^{2i\pi/n}}{1+r^n}dr $$ Since $r$ is a dummy variable, let $r = z$. \begin{align} \int_0^{\infty}\frac{dz}{1+z^n} &= -\lim_{R\to\infty}\int_0^{2\pi/n}\frac{iRe^{i\theta}}{1+R^ne^{in\theta}}d\theta+\int_0^{\infty}\frac{e^{2i\pi/n}}{1+z^n}dz - \frac{2i\pi e^{i\pi/n}}{n}\\ (1-e^{2i\pi/n})\int_0^{\infty}\frac{dz}{1+z^n}&= -\lim_{R\to\infty}\int_0^{2\pi/n}\frac{iRe^{i\theta}}{1+R^ne^{in\theta}}d\theta - \frac{2i\pi e^{i\pi/n}}{n} \end{align} Let's consider the first integral only now. $$ \Biggl\lvert\int_0^{2\pi/n}\frac{iRe^{i\theta}}{1+R^ne^{in\theta}}d\theta\Biggr\rvert\leq\int_0^{2\pi/n}\biggl\lvert\frac{iRe^{i\theta}}{1+R^ne^{in\theta}}\biggr\rvert d\theta\leq\int_0^{2\pi/n}\biggl\lvert\frac{Re^{i\theta}}{R^ne^{in\theta}}\biggr\rvert d\theta = \frac{2\pi}{nR^{n-1}} $$ Since our contour is a wedge, $n>1$. If $n=1$, we would be integrating over a circle instead. $$ \lim_{R\to\infty}\int_0^{2\pi/n}\frac{iRe^{i\theta}}{1+R^ne^{in\theta}}d\theta\leq\lim_{R\to\infty}\frac{2\pi}{nR^{n-1}} = 0 $$ We are now only left with \begin{align} (1-e^{2i\pi/n})\int_0^{\infty}\frac{dz}{1+z^n}&= \frac{-2i\pi e^{i\pi/n}}{n}\\ \int_0^{\infty}\frac{dx}{1+x^n} &= \frac{-2i\pi e^{i\pi/n}}{n(1-e^{2i\pi/n})}\\ &=\frac{\pi}{n}\csc(\pi/n) \end{align}