I think the residue at 0 should be 0..
Here's my answer: (in calculation I ignore k for convenience)
f(z)=tan(z) +zcot2(z)=sin(z) cos(z) +zcos2(z) sin2(z) =sin3(z) +zcos3(z) cos(z) sin2(z)
If cos(z) =0, then z=π2+kπ
For numerator, sin3(π2) +π2cos3(π2)≠0 , the numerator has zero order of zeros
For denominator, cos(π2) sin2(π2)=0 ,−sin3(π2) +π2cos2(π2) sin(π2) ≠0 , the denominator has zeros of order 1
Then f(z) has simple pole z=π2+kπ
If sin2(z) =0, then z=0 or z=kπ
When z=0,
For numerator, sin3(0) +0cos3(0)=0 ,3sin2(0)+cos3(0) +3cos2(0) sin?(0) ≠0 , the numerator has zero order of 1
For denominator, cos(0) sin2(0)=0 ,−sin3(0) +2cos2(0) sin(0) =0 , −3sin2(0)cos(0) −4cos(0) sin2(0) +2cos3(0)≠0 , the denominator has zeros of order 2
Then f(z) has simple pole z=0
When z=kπ,
For numerator, sin3(π) +0cos3(π)≠0 the numerator has zero order of 0
For denominator, cos(π) sin2(π)=0 ,−sin3(π) +2cos2(π) sin(π) =0 , −3sin2(π)cos(π) −4cos(π) sin2(π) +2cos3(π)≠0 , the denominator has zeros of order 2
Then f(z) has pole z=kπ with order 2
Res(f(z),π2+kπ)=sin3(π2) +π2cos3(π2) −sin3(π2) +2cos2(π2) sin(π2) =1−1=−1
Res(f(z),kπ)=3sin2(π)+cos3(π) +3cos2(π) sin(π) 1!=−11=−1
Since f(z)=sin3(z) +zcos3(z) cos(z) sin2(z) =(∫∞0(−1)nz2n+1(2n+1)!)3+∫∞0(−1)nz2n+1(2n)!∫∞0(−1)nz2n(2n)! (∫∞0(−1)nz2n+1(2n+1)!)2 has no term of (z−0)−1, then
Res(f(z),0)=0