Solution (source code)

= Solution

Write the <Laurent series> about $a$ as $\sum_{k\in\mathbb Z}c_k(z-a)^k$. The isolated singularity is:

* <removable singularity> if every negative-index coefficient is zero;
* a <pole> of order $m\geq1$ if $c_{-m}\ne0$ and $c_k=0$ for $k<-m$;
* an <essential singularity> if infinitely many negative-index coefficients are nonzero.

These cases exhaust the possible principal parts. The <residue> is
$$
\boxed{\operatorname{res}(f;a)=c_{-1}=\frac1{2\pi i}\int_{|z-a|=\rho}f(z)\,dz,\quad0<\rho<r.}
$$
For the first example, $\sin z=z+O(z^3)$ gives
$$
\frac1{\sin^2z}=\frac1{z^2}+\frac13+O(z^2).
$$
Thus zero is a \b[double <pole>], with <residue> zero. For the other example,
$$
1-\cos z=\frac{z^2}2+O(z^4),\qquad1-e^z=-z+O(z^2),
$$
so the ratio is $-z/2+O(z^2)$. Its singularity is \b[removable], with extended value zero and <residue> zero. The numerator's zero has higher order than the denominator's, so there is no <pole>.