Determine all singularites and its character of function in $\bar{\mathbb{C}}$: $f(z) = z^{3}e^{1/(2z)} + \frac{z + 2\pi}{z-2\pi}\,\cot(z).$ 
Determine all singularites of function in $\bar{\mathbb{C}}$ and question its character:
$$f(z) = z^{3}e^{1/(2z)} + \frac{z + 2\pi}{z-2\pi}\,\cot (z).$$

It seems to me that singularities are $z =k\pi, k \in \mathbb{Z}$ and $z=\infty$.
Now, I'm having trouble with determining its character. At first, I was thinking of developing to Laurent's series, but I got stuck at the $\cot (z)$ part. Are there any other ways to solve this problem, and can you help me with $\cot (z)$?
 A: Let's write down all points that can be singularities for $f(z)$:


*

*$z = 0$

*$z = 2\pi$

*$sin(z) = 0$ or $z = \pi n$

*$z = \infty$
Case $z = 0$: 
It's sum of pole and is essential singularity, so it's is essential singularity (because the principal part of the Laurent series is an infinite sum).
Case $z = 2\pi$: 
It's order 2 pole. Indeed: 
$$f(z) = z^{3}e^{1/(2z)} + \frac{z + 2\pi}{z-2\pi}\,\cot (z) = z^{3}e^{1/(2z)} + \frac{z + 2\pi}{z-2\pi}\ \frac{cos(z)}{sin(z)} = u(z) + \frac{v(z)}{(z-2\pi)sin(z)}$$
where $u, v$ - is holomorphic in $2\pi$. 
So $z = 2\pi$ is pole. First derivative $\frac{d}{dz}((z-2\pi)sin(z)) = sin(z) + (z-2\pi)cos(z)$ is equal to $0$ at $z = 2\pi$. Second derivative at $z = 2\pi$ is not equal to $0$. We get that $z=2\pi$ order 2 pole.
Case $z = \pi n$, where $n \neq 0, 2$:
It's order 1 pole. Prove is the same as for case $z = 2\pi$, except that the first derivative is not equal to zero. 
Case $z = \infty$:
It is not singularity, because it's a limit of singularities.
A: Recalling that $\cot z = \cos z / \sin z$, we see $f(z)$ is not defined in all $z_k = k\pi$, $k \in \mathbb Z$. However, $f(z)$ is defined for all $z$ with $0 < \lvert z - z_k \rvert < \pi$, hence the $z_k$ are isolated singularities. Let us study first the singularities of
$$g(z) = \frac{z + 2\pi}{z-2\pi}\,\cot (z).$$
$\sin z$ has zeros of order $1$ at all $z_k$, hence $\cot z$ has poles of order $1$ at all $z_k$. Thus $g(z)$ has poles of order $1$ at all $z_k$, $k \ne 2,-2$. At $z_2$ it has a pole of order $2$ and at $z_{-2}$ it has a removable singularity (because $\sin z /(z + 2 \pi)$ has a  removable singularity at $z_{-2}$).
Thus the same is true for $f(z)$ except at $z_0 = 0$. Note that $e^{1/2z}$ has an essential singularity at $0$, thus the same is true for $f$.
What about $\infty$? It depends on the definition of a singularity. In my interpretation a singularity of a function $\phi$ is a point $\zeta$ at which $\phi$ is not defined, but for which we have an open neighborhood $U$ such that $\phi(z)$ is defined for all $z \in U \setminus \{ \zeta \}$. If you agree with this, then $\infty$ is no singularity of $f$ because there does not exist a neighborhood $U$ of $\infty$ such that $f(z)$ is defined for all $u \in U \setminus \{ \infty \}$. This comes from the fact that each $U$ contains almost all $z_k$.
