last day (15 days later) » 

19:59
0
Q: How to compute the residue of $f(z)=\frac{n/z}{z^{n}-1}$ to be $-n$ at $z=0$?

onepoundHow to get residue of $f(z)=\frac{n/z}{z^{n}-1}$ with correct residue of $-n$ at zero? It works it out just fine at 1 with: Residue[(n/z/(z^n - 1)), {z, 1}]

What do you mean by residue of $-n$? There is no singularity in $-n$ for $n>1$.
Question has been changed a few times since I've read it. Residue at zero is obvious, see e.g. Table[Residue[n/(z (z^n - 1)), {z, 0}], {n, 10}]
Residue[(n/z/(z^n - 1)), {z, 0}, Assumptions -> n \[Element] PositiveIntegers] returns the input and (see Wiki) 1/4/Pi/I* Integrate[((n/z/(z^n - 1)) /. z -> 1/2*Exp[I*t])*I*Exp[I*t], {t, -Pi, Pi}, Assumptions -> n \[Element] PositiveIntegers] produces -((I (4 ArcTanh[1-2^(1-n) E^(I n \[Pi])]-2 Log[-1+2^n E^(I n \[Pi])]))/(4 \[Pi])) which is fase. Submit a bug to Technical Support.
@Artes: You are not right, saying " Residue at zero is obvious...". See the above comment of me.
@user64494 Since when Residue has the Assumptions option? I'm using version 13.0.1.
@Artes: In any case this is not a syntax error. Residue[(n/z/(z^n - 1)), {z, 0}] also returns the input. Do you have to say something serious?
Residue hasn't been updated since version 2.0 and so you should not expect evaluating Residue[(n/z/(z^n - 1)), {z, 0}] for abstract n. If you prescirbe n e.g. with Table or With it returns correct values. See in your comment inappropriate z -> 1/2*Exp[I*t])*I*Exp[I*t].
19:59
@Artes: You don't pay your attention to the calculation of that residue by the integral 1/4/Pi/I* Integrate[((n/z/(z^n - 1)) /. z -> 1/2*Exp[I*t])*I*Exp[I*t], {t, -Pi, Pi}, Assumptions -> n \[Element] PositiveIntegers] which produces a wrong result.
@user64494 Yes, I don't since you incorrectly calculate the integral.
@Artes: Unfortunately, 1/4/Pi/I* Integrate[ Exp[I*t]*((n/z/(z^n - 1)) /. z -> 1/2*Exp[I*t]) /. z -> 1/2*Exp[I*t], {t, -Pi, Pi}, Assumptions -> n \[Element] PositiveIntegers] also produces a wrong result.
@Artes: The results of 1/4/Pi/I* Integrate[((n/z/(z^n - 1)) /. z -> 1/2*Exp[I*t])*I*Exp[I*t], {t, -Pi, Pi}, Assumptions -> n \[Element] PositiveIntegers] and 1/4/Pi/I* Integrate[((n/z/(z^n - 1)) /. z -> 1/2*Exp[I*t])*I*Exp[I*t], {t, -Pi, Pi}, Assumptions -> n \[Element] PositiveIntegers] are identical. Why do you claim "you incorrectly calculate the integral"? Can you kindly ground it? TIA.
bmf
bmf
to the author of the O.P: can you clarify what you mean in light of all the comments? What value do you want $n$ to be and do you want the residue at $z=0$ or $z=1$?
@Artes this is something related to your question about assumptions in taking residues 180179. I hope you'll find this interesting.
Finally, as a comment: it is worthwhile noting that following the approach suggested in the link answer by Carl Woll the result agrees with what @Artes suggested from a quick check that I performed.
@bmf: It is worthwhile noting that Assuming[n \[Element] Integers && n > 0, Residue[(n/z/(z^n - 1)), {z, 1}]] produces an incorrect result 1.
@bmf I don't see any need to clarify the question. It clearly states the residue at $z=0$ is sought. That the OP has neglected hypotheses required to obtain the desired result is typical for this site. While I agree with others that the residue is obvious (you can make the calculation in your head), if Residue can't handle this case in code, then it would break one's program. I would say that the Q&A you linked is a duplicate.
19:59
@MichaelE2: Disagree concerning a duplicate. When considering the question, Several new bugs are detected.
bmf
bmf
@MichaelE2 you said that it is obvious that the residue at $z=0$ is sought but the code in the OP reads Residue[(n/z/(z^n - 1)), {z, 1}]. Am I being that stupid here? Yes, I am being that stupid because I followed the comments and missed the original point. Thanks for spotting this :-)
@bmf: Did you read "t works it out just fine at 1 with Residue[(n/z/(z^n - 1)), {z, 1}] " in the question? Be careful.
@user64494 You would find the same bugs if you had explored the other question. The questions are duplicates. The bug with Integrate is irrelevant -- post separately if it's important to you to find a workaround, but one is not supposed to use the site for reporting bugs. Bugs should be reported to WRI instead. So reporting new bugs in the comments is not a reason to keep a question open. (The residue at z=1 is 1, obviously, which is what Residue correctly returns. You said it was incorrect.)
@MichaelE2: Thank you for the indication of the skip of the keyboard by me.
I agree with @user64494 that this is not a complete duplicate and further the closure of the question. However I'm grateful for time and useful information all have contributed nevertheless. If I understand the system correctly the question might be automatically removed in time especially as it is now likely to attract downvotes - rather unfortunate considering it might help somebody else. TTFN

last day (15 days later) »