I am trying to understand how to evaluate the following integral.
$$\int_{-\infty}^{\infty} \dfrac{1}{x^6+1}dx$$
We start by considering $f(z) = \dfrac{1}{z^6+1}dz.$ Then we find that $z_k = \exp \left (i \left (\frac{\pi}{6}+\frac{\pi k}{3}\right)\right )$, and simple poles occur when $k=0,1,2,3,4,5$.
Then
$$\text{Res}(f,z_k)= \dots =\dfrac{1}{6}\lim_{z \to z_k} z^{-5}= \dfrac{1}{6} \exp \left( -\frac{5 \pi i}{6} (1 +2k) \right)$$
I think that in the missing part, the following formula is used,
$$\text{Res}(f,c)=\frac{1}{(n-1)!}\lim_{z \to c} \frac{d^{n-1}}{dz^{n-1}} ((z-c)^n f(z)) $$
that $n=4$ and that a cancellation occurs (otherwise it would be really messy), but I'm not sure how to do it. How do I proceed?
Thanks for your help.