Find residues of a function $f(z) = z^{10}e^{\frac{1}{2z}} + \frac{z+4\pi}{z-4\pi}\cot{\frac{z}{2}}$ I am trying to find residues at singularity points of this function, but I cannot wrap my head around its Laurent series. Singularity points are $2k\pi, k \in \mathbb{Z}.$ $f$ is a sum of two functions and $0$ is an essential singularity for both of them. Should I conclude it is an essential singularity for $f$? Not sure, since some terms could cancel out. It is easy to show that $-4\pi$ is a removable singularity. For $k \neq -2$, I have no idea. 
 A: Actually, $0$ is an essential singularity of $z^{10}e^{1/2z}$, but not of $\frac{z+4\pi}{z-4\pi}\cot\left(\frac z2\right)$. So, $0$ is an essential singularity of $f$.
Anyway,$$\cot\left(\frac z2\right)=\frac2{z-4\pi}-\frac16(z-4\pi)+\cdots,$$and so$$\frac{\cot\left(\frac z2\right)}{z-4\pi}=\frac2{(z-4\pi)^2}-\frac16+\cdots$$It follows from this that\begin{align}\frac{z+4\pi}{z-4\pi}\cot\left(\frac z2\right)&=\bigl((z-4\pi)+8\pi\bigr)\left(\frac2{(z-4\pi)^2}-\frac16+\cdots\right)\\&=\frac{16\pi}{(z-4\pi)^2}+\frac2{z-4\pi}-\frac{4\pi}3+\cdots\end{align}and therefore$$\operatorname{rez}_{z=4\pi}\frac{z+4\pi}{z-4\pi}\cot\left(\frac z2\right)=2.$$So, the residue of $f$ at $4\pi$ is $2$.
On the other hand.$$\operatorname{res}_{z=0}z^{10}\exp\left(\frac1{2z}\right)=\frac1{2^{11}11!}$$and\begin{align}\operatorname{res}_{z=0}\frac{z+4\pi}{z-4\pi}\cot\left(\frac z2\right)&=\lim_{z\to0}z\frac{z+4\pi}{z-4\pi}\cot\left(\frac z2\right)\\&=\lim_{z\to0}\frac{z+4\pi}{z-4\pi}\frac{\cos\left(\frac z2\right)}{\sin\left(\frac z2\right)/z}\\&=\frac{0+4\pi}{0-4\pi}\frac{\cos(0)}{1/2}\\&=-2.\end{align}Therefore,$$\operatorname{res}_{z=0}f(z)=\frac1{2^{11}11!}-2.$$
