<s>[INST] How to evaluate residue of $\cot z/z^4$ at $z=0$? How to evaluate residue of $\cot z/z^4$ at $z=0$?
As we know :
$$f(x)=f(0)+f'(0)x+f''(0)x^2/2+...$$
but $\cot(0)\to\infty$ or is undefined? I know that:
$$\tan x=x+x^3/3+2x^5/15+...$$
 [/INST] Well,
\begin{align}\cot z = \frac{\cos z}{\sin z} &= \frac{1 - \frac{z^2}{2!} + \frac{z^4}{4!} + O(z^6)}{z - \frac{z^3}{3!} + \frac{z^5}{5!} + O(z^7)}\\
& = \frac{1}{z}\cdot \left(1 - \frac{z^2}{2!} + \frac{z^4}{4!} + O(z^6)\right)\cdot \left(1 + \frac{z^2}{3!} - \frac{z^4}{5!} +\frac{z^4}{3!3!}+ O(z^6)\right)\\
&= \frac{1}{z}\cdot \left(1 + \left(-\frac{1}{2!} + \frac{1}{3!}\right)z^2 + \left(-\frac{1}{2!3!} + \frac{1}{4!} - \frac{1}{5!} + \frac{1}{3!3!}\right)z^4 + O(z^6)\right).\end{align}
Therefore, the coefficient of $\frac{1}{z}$ in the Laurent expansion of $\frac{\cot(z)}{z^4}$ is
$$-\frac{1}{2!3!} + \frac{1}{4!} - \frac{1}{5!} + \frac{1}{3!3!} = -\frac{1}{45}.$$
Hence, $$\text{Res}_{z = 0}\frac{\cot(z)}{z^4} = -\frac{1}{45}.$$
</s>