I have been practicing contour integrals and I have come across the following integral and I have been trying to solve it via contour:
$$ \int_0^\infty \frac{dx}{x^p+1} = \frac{\pi}{p} \frac{1}{\text{sin}(\pi/p)}$$
Specifically, for my first step I am thinking of doing $$x^p+1=0 \implies x^p=-1$$ then to write $$x^p=-1$$ in terms of e and somehow this becomes $$x^p= e^{i\pi}\cdot e^{i2\pi m}\text{ for } m=0,1,\dots, p-1$$
and therefore $$x=e^{i \pi/p} \cdot e^{i2\pi/p} \text{ for }m=0,1,\dots,p-1.$$
Now I don't really quite know what happens here, I was told to break up the integral into 3 parts. I have been suggested to do,
$$\int_C \frac{1}{1+z^p} dz= \int_A \frac{1}{1+z^p} dz + \int_B \frac{1}{1+z^p}dz + \int_C \frac{1}{1+z^p}dz$$
Geometrically this isn't immediately clear to me. Are there any similar problems available to this via online or in textbook a reference? I'm unable to find any so far and I would very much like to learn.
Hint The integrand $f$ satisfies $f(e^{2 \pi i / p} z) = f(z)$, which suggests using a contour $\Gamma_R$ that parameterizes the boundary of a sector (centered at the origin) of radius $R$, with one side on the positive real axis, and of central angle $\frac{2 \pi}{p}$.
Which poles of the integrand are inside this contour (for $R > 1$)?