I'd like to calculate $\int_{-\infty}^{\infty}\mathrm{d}x/(1+x^6)$ through a variation of the residue formula, which is $\int_{-\infty}^{\infty}f(x)\mathrm{d}x=2\pi i\sum \text{Res }f$ for Residues in the upper half plane.
To calculate this, I've reached the below formula, which I believe to be correct.
$$\int_{-\infty}^{\infty}\frac{\mathrm{d}x}{1+x^6}=2\pi i\sum_{k=0}^{5}\prod_{\substack{j=0\\j\neq k}}^5\frac{1}{e^{\pi i(2k+1)/6}-e^{\pi i(2j+1)/6}}$$
I'd like my Mathematica code to incorporate the $j\neq k$ part of the product, which from this question appears possible with the function DeleteCases. The code I used is displayed below.
RootOfUnity[k_] := Exp[2 \[Pi] I k/6]
Simplify[2 \[Pi] I Sum[Product[1/(RootOfUnity[2 k + 1] - RootOfUnity[2 j + 1]), {j, DeleteCases[Range[0, 5], k]}], {k, 0, 5}]]
This gives me the answer $0$, which disagrees with WolframAlpha calculating the integral to be $2\pi/3$. The problem might be with my derivation of the residues, but does my Mathematica code (specifically the DeleteCases part of it) work how I want it to (based off of my LaTeX equation)?
2 π I Total[Residue[1/(1 + t^6), {t, #}] & /@ (t /. Solve[{Denominator[1/(1 + t^6)] == 0, Im[t] >= 0}, t])] // FullSimplify? – J. M.'s missing motivation Mar 09 '16 at 02:332 π I Sum[Product[1/(Exp[π I (2 j - 1)/6] - Exp[π I (2 k - 1)/6]), {k, Delete[Range[6], j]}], {j, 1, 3}] // Simplifysuit your needs? – J. M.'s missing motivation Mar 09 '16 at 03:20