<s>[INST] Evaluate $\int_0^{\infty} \frac{1}{1+x^6} dx$ using Contour Integral My attempt:
I am considering a contour C consisting of upper half circle $|z|=R$ and the real axis from $-R$ to $R$ and finding $\int_C \dfrac{1}{z^6+1}dz$ around it.
First, I find the poles of this function, which are given by $z^6+1=0$
The poles are all simple poles, $z=\pm i,\dfrac{\sqrt{3}}{2} \pm i\dfrac{1}{2},-\dfrac{\sqrt{3}}{2} \pm i\dfrac{1}{2} $
Only the 3 poles $z= i,\dfrac{\sqrt{3}}{2} + i\dfrac{1}{2},-\dfrac{\sqrt{3}}{2} + i\dfrac{1}{2} $ lie within the contour, so I find the residues at these poles and then apply residue theorem to find $\int_C \dfrac{1}{z^6+1}dz$
Residue at $z=i$ comes out to be $\dfrac{1}{6i}$, at $z=\dfrac{\sqrt{3}}{2} + i\dfrac{1}{2}$ comes out to be $\dfrac{1}{3i(1-\sqrt3 i)}$ and at $z=\dfrac{\sqrt{3}}{2} + i\dfrac{1}{2}$ is $\dfrac{-1}{6i}$
So from Cauchy's theorem I get $\int_C \dfrac{1}{z^6+1}dz=2\pi i \times $sum of the residues= $\dfrac{2\pi}{3(1-\sqrt3 i)}$
Taking $R \to \infty$ and using $f(z)$ is an even function, I get my final answer as: $\int_0^{\infty} \frac{1}{1+x^6} dx=\dfrac{\pi}{3(1-\sqrt3 i)}$
Is this solution correct? Is there a shorter or better way to do this? Thank you.
 [/INST] You have miscalculated the residues at $\dfrac{\pm\sqrt{3} + i}{2}$. Note that if $\zeta$ is a simple zero of $f$, then the residue of $\dfrac{1}{f}$ at $\zeta$ is $\dfrac{1}{f'(\zeta)}$, so here for $f(z) = z^6 + 1$, we have the residues
$$\frac{1}{f'(\zeta)} = \frac{1}{6 \zeta^5} = \frac{\zeta}{6\zeta^6} = - \frac{1}{6}\zeta.$$
Thus the integral over $C$ is - for $R > 1$ -
$$-\frac{2\pi i}{6} (\zeta_1 + \zeta_2 + \zeta_3) = -\frac{\pi i}{3}\biggl(\frac{\sqrt{3} + i}{2} + i + \frac{-\sqrt{3}+ i}{2}\biggr) = -\frac{\pi i}{3}\cdot 2i = \frac{2\pi }{3}.$$
Letting $R \to +\infty$, the integral over the semicircle tends to $0$, whence
$$\int_{-\infty}^{+\infty} \frac{dx}{x^6+1} = \frac{2\pi}{3}.$$
The integral over $[0,+\infty)$ is half of that by parity.
Note that the integrand is real on the real axis, so the integral needs to be real too, by that you could have seen that you must have made a mistake somewhere.
</s>