$$f(z)=\frac{e^{zt}}{z^2(e^z-1)^2}$$ Singularities are at: $z = 0$ and at $z = 2k\pi i$
$1.$ I tried to find the residue at $z=2k\pi i$ as follows
let $w=z-2k\pi i$ $\implies z = w+2k\pi i \therefore$
$$f(w) = \frac{1}{(w+2k\pi i)(e^{(w+2k\pi i)}-1)^2}=\frac{1}{2k\pi i(\frac{w}{2k\pi i }+1)(e^we^{2k\pi i}-1)^2}$$
using the taylor series we can simplify as follows:
$(\frac{w}{2k\pi i }+1)^{-1}$ = $1-(\frac{w}{2k\pi i}) + (\frac{w}{2k\pi i})^2+(\frac{w}{2k\pi i})^3+..$
and
$(e^w-1)^2=(w(1+(\frac{w}{2})+(\frac{w}{3!})^2+(\frac{w}{4!})^3+..)^2$
let $\{(\frac{w}{2})+(\frac{w}{3!})^2+(\frac{w}{4!})^3+..\} = \alpha$ $\implies (e^w-1)^2 $= $w^2(1+\alpha)^2$
and
$(1+\alpha)^{-2}=\sum_{i=0}^\infty\binom{-2}{i}(\alpha)^i$
and
$e^{zt} = 1+ (zt)+(zt)^2+(zt)^3+..$
$\therefore f(w)=\frac{1}{2k\pi i w^2}\{1+ (wt)+(wt)^2+..\}\{1-(\frac{w}{2k\pi i}) + (\frac{w}{2k\pi i})^2+..\}\{\sum_{i=0}^\infty\binom{-2}{i}(\alpha)^i\}$
where
$\sum_{i=0}^\infty\binom{-2}{i}(\alpha)^i=1-2\alpha +3\alpha^2+..=1-2\{(\frac{w}{2})+(\frac{w}{3!})^2+..\}+3\{(\frac{w}{2})+(\frac{w}{3!})^2+..\}^2+..$
all i need now is the coefficient of $\frac{1}{w}$
which is:
$\frac{1}{w}((t-\frac{1}{2k\pi i}-1)\frac{1}{2k\pi i})$
however this is no way close to what my textbook says is right, did i do something wrong please assist. I am particularly intrested with the residue at the pole $z=2k\pi i$ the one at $z=0$ i feel is relatively easy to find using the residue theorem. The follwoing post also deals with a similar question however i couldnt understand the answer Finding the poles and residues of a complex function $\frac{\cos(z)-1}{(e^z - 1)^2}$ Thanks for any help you can offer
Since $z_k=2k\pi i$ ($k\neq 0$) is a double pole, the Laurent expansion in a neighbourhood of $z_k$ takes the form: $$ f(z) = \frac{B_k}{(z-z_k)^2}+\frac{A_k}{(z-z_k)}+g(z) $$ where $g(z)$ is a holomorphic function. This gives: $$ (z-z_k)^2 f(z) = B_k + A_k(z-z_k) + \ldots $$ and: $$ A_k= \operatorname{Res}\left(f(z),z=z_k\right) = \left.\frac{d}{dz}(z-z_k)^2 f(z)\right|_{z=z_k}. \tag{1}$$ The last formula gives: $$ A_k = \left.\frac{d}{dz}\frac{(z-z_k)^2 e^{zt}}{z^2(e^{z}-1)^2}\right|_{z=z_k} =e^{tz_k}\left.\frac{d}{dz}\frac{e^{tz}}{(z+z_k)^2}\cdot\left(\frac{z}{e^z-1}\right)^2\right|_{z=0}.\tag{2}$$ Since $e^{z_k}=1$ and $\frac{z}{e^z-1}=1-\frac{z}{2}+O\left(z^2\right)$ in a neighbourhood of the origin, while $e^{tz}=1+tz+O(z^2)$, the last expression simplifies to: $$ A_k = [z]\,e^{tz_k}\frac{(1-z)(1+tz)}{(z+z_k)^2} = \color{red}{e^{tz_k}\frac{tz_k-z_k-2}{z_k^3}}.\tag{3}$$