Residue Problem I am trying to find residues for all singularities of the function:
$$f(z)= \frac{\tanh z}{z^2}$$
Here is what I did:
 $$f(z)= \frac{\sinh z}{z^2\cosh z}$$
when $$\cosh z=0$$ then $z_k =i( \frac{π}{2}+πk)$,  for $k \in\mathbb{Z}.$  
Let $p(z) = \dfrac{\sinh z}{z^2}$ and $q(z)=\cosh z$ 
Since $z_k$ is a simple pole, then:
$$\operatorname{Res}(f(z),z_k)= \frac{p(z_k)}{q'(z_k)}= \frac{\sinh z}{z_k^2\sinh z}=\frac{1}{z_k^2}= \frac{1}{(i( \frac{π}{2}+πk))^2}= \frac{-1}{( \frac{π}{2}+πk)^2} $$
Is my solution correct?
What about the residue when $z=0$?
 A: The residues at $z=i(2n+1)\pi/2$ are given by $-\frac{4}{(2n+1)^2\pi^2}$ as already evaluated in the posted question.
There is a pole of order $1$ at $z=0$ since
$$\frac{\sinh z}{z^2} =\frac1z+\sum_{n=1}^{\infty}\frac{z^{2n-1}}{(2n+1)!}$$
Therefore, the residue at $z=0$ of $f(z)=\frac{\tanh z}{z^2}$ is simply $1$ since $\cosh (0)=1$.  To be explicit
$$\lim_{z\to 0} \left(z\dfrac{\tanh z}{z^2}\right)=\lim_{z\to 0} \left(\dfrac{\tanh z}{z}\right)=\lim_{z\to 0}\frac{\text{sech}^2 z}{1}=1$$
A: You can get the residue $$\mathrm{Res}\left[f(z),0\right]$$  by Laurent expansion which is equal to the coefficient of $$\frac{1}{z}.$$
And this is also same as the coefficient of $z$ in the expansion of $$\tanh(z)=z-\frac{1}{3}z^3+\frac{2}{15}z^5+\cdots$$.
so, $$\mathrm{Res}_{z=0} f(z)=1$$
A: You've already found out that the singularities of $f$ are:
$$
0, z_k=i\left(\frac\pi2+k\pi\right) \quad k\in \mathbb{Z},
$$
therefore:
\begin{eqnarray}
\mathrm{Res}(f,0)&=&\lim_{z\to0}(z-0)f(z)]=\lim_{z\to0}\frac{\tanh z}{z}=\lim_{z\to0}\frac{(\tanh z)'}{(z)'}=\lim_{z\to0}\frac{1-\tanh^2z}{1}=1\\
\mathrm{Res}(f,z_k)&=&\lim_{z\to z_k}\frac{\sinh(z)/z^2}{(\cosh z)'}=\lim_{z\to z_k}\frac{\sinh z}{z^2\sinh z}=\lim_{z\to z_k}\frac{1}{z^2}=\frac{1}{z_k^2}=-\frac{2}{(2k+1)\pi}.
\end{eqnarray}
