# Calculus of residues

I try to calculate the following residue

Clear[α];
f[z_]:=π^2 Cot[(π z α)^(1/2)];
g[z_]:=f[z+(-π/2 + 2 k π)^2/(π α)];
res[k_]=Residue[FullSimplify[TrigToExp@g[z],k\[Element]Integers],{z,0}]


but it does not work. Is it possible calculate the residue automatically?

To clarify: if you try to calculate

f[z_]:= π^2 Tan[(π z α)^(1/2)];
Assuming[k\[Element]Integers,Residue[f[z],{z,(π/2+k π)^2/(π α)}]]


you get $0$, but if you calculate

f[z_]:= π^2 Tan[(π z α)^(1/2)];
Assuming[k\[Element]Integers,Residue[f[z],{z,(π/2+1 π)^2/(π α)}]]


you get -((3 π^2)/α)

• Once I corrected your syntax by inserting several semicolons to separate lines and ran the code I got $0$... Might this be the correct answer? – David G. Stork Dec 7 '17 at 18:55
• No if you subtitute 1 in k no gives answer – antonio asis Dec 7 '17 at 18:57
• I get res = 0. Please fix your syntax and re-run your code. And why is your title Residue4? – David G. Stork Dec 7 '17 at 18:58
• David Please look the question – antonio asis Dec 7 '17 at 19:12
• And what is wrong with those answers? What exactly is the problem you're facing? – David G. Stork Dec 7 '17 at 19:31

## 2 Answers

One possibility is to avoid dealing with the singularity by considering the inverse:

f[z_] := π^2 Tan[(π z α)^(1/2)];

inv = Simplify[
Series[1/f[z], {z, (π/2+k π)^2/(π α), 1}],
Assumptions->k ∈ Integers && k>0
];
inv //TeXForm


$-\frac{\alpha \left(z-\frac{\pi (2 k+1)^2}{4 \alpha }\right)}{\pi ^2 (2 k+1)}+O\left(\left(z-\frac{\pi (2 k+1)^2}{4 \alpha }\right)^2\right)$

Now we can find the residue of the inverse of the inverse:

res[k_] = Residue[1/inv, {z, (π/2+k π)^2/(π α)}];
res[k]


-(((1 + 2 k) π^2)/α)

Let's compare:

res /@ Range
Residue[f[z], {z, (π/2+# π)^2/(π α)}]& /@ Range


{-((3 π^2)/α), -((5 π^2)/α), -(( 7 π^2)/α), -((9 π^2)/α), -((11 π^2)/α)}

{-((3 π^2)/α), -((5 π^2)/α), -(( 7 π^2)/α), -((9 π^2)/α), -((11 π^2)/α)}

• Thanks Carl Woll again – antonio asis Dec 7 '17 at 21:31

The same solution using Tableand FindSequenceFunction:

f[z_] := π^2*Tan[(π z α)^(1/2)]
sol = Table[Residue[f[z], {z, ((π/2) + k π)^2/(π α)}], {k, 1, 5}]
Res = FindSequenceFunction[sol, k] // Simplify


$\left\{-\frac{3 \pi ^2}{\alpha },-\frac{5 \pi ^2}{\alpha },-\frac{7 \pi ^2}{\alpha },-\frac{9 \pi ^2}{\alpha },-\frac{11 \pi ^2}{\alpha }\right\}$

$-\frac{\pi ^2 (2 k+1)}{\alpha }$