3
$\begingroup$

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?

$\endgroup$
4
  • 2
    $\begingroup$ For me the second line, Residue[f,{z,0}] doesn't evaluate, only for particular n=1,2,.... Even computing for particular n (I get Residue[f,{z,0}]==2n), the sum doesn't seem to be correct $\endgroup$
    – Adam
    Apr 4, 2022 at 19:40
  • $\begingroup$ That's not all the residues. $\endgroup$
    – josh
    Apr 4, 2022 at 20:35
  • $\begingroup$ @josh true there are many residue 1 $\endgroup$
    – onepound
    Apr 4, 2022 at 20:40
  • $\begingroup$ @onepound in the original version of my answer there was a shift in the number 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$
    – bmf
    Apr 4, 2022 at 22:36

4 Answers 4

5
$\begingroup$

With

f[z_] := -((z - 1)/(z + 1))^2 (((2 n)/z)/(-1 + z^(2 n)))

we generate data

Table[Residue[f[z] /. n -> xx, {z, -1}] + 
  Residue[f[z] /. n -> xx, {z, 0}], {xx, 1, 17, 1}]

res

and then

FindSequenceFunction[{0, -2, -(20/3), -14, -24, -(110/
      3), -52, -70, -(272/3), -114, -140, -(506/3), -200, -234, -(812/
      3), -310, -352}, n] // FullSimplify

correct

Edit:

Discussing the minimum number of terms

The following seems to be the minimal choice

FindSequenceFunction[
   Table[Residue[f[z] /. n -> xx, {z, -1}] + 
     Residue[f[z] /. n -> xx, {z, 0}], {xx, 1, 4, 1}], n] // FullSimplify

For {xx,1,3,1} Mathematica does not return the formula.

$\endgroup$
6
$\begingroup$

In V13:

Residue[-((z - 1)/(z + 1))^2 (((2 n)/z)/(-1 + z^(2 n))), {z, -1}, 
 Assumptions -> n \[Element] Integers && n > 0]
(*  -(2/3) (1 + 2 n^2)  *)
Assuming[n \[Element] Integers && n > 0, 
 Simplify@
  SeriesCoefficient[
   Normal@
    Series[-((2 n (-1 + z)^2)/(z (1 + z)^2 (-1 + z^(2 n)))), {z, 
      0, -1}], {z, 0, -1}]
 ]
(*  2 n  *)

Not sure why SeriesCoefficient fails on the given function when Series succeeds. (Bug?)

$\endgroup$
0
2
$\begingroup$

Following bmf's idea:

Total[Map[FindSequenceFunction[#, n] &, 
  Transpose[
   Table[Map[
     Residue[-((z - 1)/(z + 1))^2 (2 n)/(
        z (-1 + z^(2 n))), {z, #}] &, {0, -1}], {n, 1, 17}]]]]
 (*2 n - 2/3 (1 + 2 n^2)*)
$\endgroup$
2
  • 1
    $\begingroup$ thanks for the additional contribution. Why {n, 1, 17} is this range chosen? $\endgroup$
    – onepound
    Apr 4, 2022 at 20:52
  • 1
    $\begingroup$ @onepound you need enough input data for the FindSequenceFunction command to work. There's no standard for how many terms you need and in this case the number 17 is not the minimum. For instance you can check on your machine that FindSequenceFunction[ Table[Residue[f[z] /. n -> xx, {z, -1}] + Residue[f[z] /. n -> xx, {z, 0}], {xx, 1, 4, 1}], n] /. n -> n + 1 // FullSimplify yields the right answer. f[z] is the function from the OP. See also my edit $\endgroup$
    – bmf
    Apr 4, 2022 at 21:11
1
$\begingroup$

In version 13 on Windows 10

Residue[-((z - 1)/(z + 1))^2 (((2 n)/z)/(-1 + z^(2 n))), {z, -1},Assumptions->n\[Element] PositiveIntegers]

-2/3 (1 + 2 n^2)

Let us check it through

Table[Residue[-((z - 1)/(z + 1))^2 (((2 n)/z)/(-1 + 
   z^(2 n))), {z, -1}]+ 2/3*(1 + 2*n^2), {n, 1, 5}]

{0,0,0,0,0}

$\endgroup$
2
  • $\begingroup$ yes that works on version 12 too, thanks. Not sure if anything can be done about residue at 0 other than to inspect the function visually for the answer. $\endgroup$
    – onepound
    Apr 4, 2022 at 20:19
  • $\begingroup$ Agreed. Residue[-((z - 1)/(z + 1))^2 (((2 n)/z)/(-1 + z^(2 n))), {z,0},Assumptions->n\[Element] PositiveIntegers] fails. $\endgroup$
    – user64494
    Apr 4, 2022 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.