Using the function,
$f(z)=-\left(\frac{z-1}{z+1}\right)^2\frac{2n/z}{z^{2n}-1}$,
should give residues as follows:
$ \begin{align} \ &\left(\operatorname*{Res}_{z=0}(f(z))+\operatorname*{Res}_{z=-1}(f(z))\right) = &\left(2n-\frac23(2n^2+1)\right) \end{align} $
However when I use the Mathematica Residue[]
function:
Residue[-((z - 1)/(z + 1))^2 (((2 n)/z)/(-1 + z^(2 n))), {z, -1}]
Residue[-((z - 1)/(z + 1))^2 (((2 n)/z)/(-1 + z^(2 n))), {z, 0}]
I do not get the same result.
What do I have to do to get Mathematica to work out these residues?
Residue[f,{z,0}]
doesn't evaluate, only for particularn=1,2,...
. Even computing for particularn
(I getResidue[f,{z,0}]==2n
), the sum doesn't seem to be correct $\endgroup$n
which was wrong and is fixed now. Sorry for the confusion. The updated version works fine :-) You can see the exact agreement with the result in the OP. Please note, that to get that result $n>0$ $\endgroup$