sorry for reposting, the loading for edit seems like taking forever.
$\int_{0}^{\infty} \frac{1}{1+z^n} dz$ = $2 \pi i$ $\sum_{i=1}^{n} Res(f,z_i)$
$z^n = -1 = e^i\pi$
$z = e^{i(\frac{1}{n}+\frac{2k}{n})\pi}$
we can decompose the integral into three parts, where $C_1$ is the straight line on the x-axis, $C_R$ is the curve with radius R and $C_2$ being the line on the second quadrant
$\int_{C}$ = $\int_{C_1}$ + $\int_{C_R}$ + $\int_{C_2}$
for $C_R$:
let x = z $dx = dz$
$\int_{C_R}$ = $\int_{0}^{R} \frac{1}{1+z^n} dz$
as $\lim_{R\to\infty} $ = $\int_{0}^{\infty} \frac{1}{1+z^n} dz$
= $2 \pi R *\frac{\alpha}{2 \pi}* \mid \frac{1}{1+z^n} \mid_{Max}$
= $\alpha R \mid \frac{1}{1+z^n} \mid_{Max}$
$\leq \alpha R \mid \frac{1}{1+R^n} \mid$
$\leq \alpha R \mid \frac{1}{R^n} \mid$
as $\lim_{R\to\infty} $
$\leq \alpha R \mid \frac{1}{R^n} \mid$ = 0
$\int_{0}^{R} \frac{1}{1+z^n} dz = 0$
$----------------------------------------------------$
for $C_1$:
let $x = t e^{i\theta}, dx = e^{i\theta}dt $ $ t \in [0,R] $ and $\theta$ be the angle between the line and x-axis
$\int_{C_1}$ = $\int_{0}^{R} \frac{1}{1+x^n} dz$
as $\lim_{R\to\infty} $ = $\int_{0}^{\infty} \frac{1}{1+x^n} dx$
= $\int_{0}^{\infty} \frac{e^{i\theta}}{1+{t e^{i\theta}}^n} dt$
= $\int_{0}^{\infty} \frac{e^{i\theta}}{1+t^n e^{ni\theta}}dt$
Since $\theta$ = 0
= $\int_{0}^{\infty} \frac{1dt}{1+t^n}$ = $I$
= $I$
$-------------------------------------------------------$
for $C_2$:
let $x = t e^{i\alpha}, dx = e^{i\alpha}dt $ $ t \in [R,0] $
$\int_{C_1}$ = $\int_{R}^{0} \frac{1}{1+x^n} dz$
as $\lim_{R\to\infty} $ = $\int_{\infty}^{0} \frac{1}{1+x^n} dz$
=$\int_{\infty}^{0} \frac{e^{i\alpha}}{1+{te^{i\alpha}}^n} dt$
=$\int_{\infty}^{0} \frac{e^{i\alpha}}{1+{t^ne^{i\alpha n}}} dt$
= -$e^{i\alpha}\int_{0}^{\infty} \frac{1}{1+{t^ne^{i\alpha n}}} dt$
= -$e^{i\alpha}I$
$\int_{C}$ = $I$ -$e^{i\alpha}I$
= $1-e^{i\alpha}$I
=$e^{i(\frac{1}{n}+\frac{2k}{n})\pi}$
$I = \frac{e^{i(\frac{1}{n}+\frac{2k}{n})\pi}}{1-e^{i\alpha}}$
since we are in the principal branch, we let K = 0 Then you do not need $k$ at all anywhere
$I = \frac{e^{i(\frac{1}{n})\pi}}{1-e^{i\alpha}}$