Residue of a simple pole. Why are they different? We'll show you two way of calculation of the Residue in consideration.
$$f(z) = \frac{z\sin(z)}{1-\cos(z)}$$
I'm interested to calculate the residues in $2\pi$ and $-2\pi$.
I choose one of them.($2\pi$)
After checked the type of singularity(simple pole), I choose one of two manner to get the residue.
(1)
$$\lim_{z\rightarrow 2\pi} \frac{z\sin(z)}{D(1-\cos(z))} = \lim_{z\rightarrow 2\pi} \frac{z\sin(z)}{\sin(z)} = \lim_{z\rightarrow 2\pi} z = 2\pi$$
(2)
$$\lim_{z\rightarrow 2\pi} \frac{z\sin(z)}{1-\cos(z)} = \lim_{z\rightarrow 2\pi} \frac{z\sin(z-2pi)(z-2\pi)^2}{(1-\cos(z))(z-2\pi)} = 4\pi$$
Which of two I have to choose?
Thanks for the answers
 A: Here, the denominator has a double zero, which is partially compensated by a zero of the numerator to produce a simple pole altogether, thus the residue is not given by the formula
$$\operatorname{Res} \left(\frac{f(z)}{g(z)}; z_0\right) = \frac{f(z_0)}{g'(z_0)}$$
that one uses for simple zeros of the denominator.
If we write $f(z) = (z-z_0)\cdot f_1(z)$ with $f_1(z_0) = f'(z_0) \neq 0$, and $g(z) = (z-z_0)^2\cdot g_2(z)$ with $g_2(z_0) = \frac12 g''(z_0) \neq 0$, we see that the residue of $\frac{f}{g}$ in $z_0$ is
$$\operatorname{Res} \left(\frac{f(z)}{g(z)}; z_0\right) = \operatorname{Res} \left(\frac{(z-z_0)f_1(z)}{(z-z_0)^2g_2(z)}; z_0\right) = \frac{f_1(z_0)}{g_2(z_0)} = 2\frac{f'(z_0)}{g''(z_0)}.$$
That means your second way is correct.
More generally, if the denominator has a zero of order $n$, and the numerator a zero of order $n-1$ in $z_0$, the Taylor series of numerator and denominator start
$$\begin{align}
f(z) &= \frac{f^{(n-1)}(z_0)}{(n-1)!}(z-z_0)^{n-1} + \dotsc,\\
g(z) &= \frac{g^{(n)}(z_0)}{n!}(z-z_0)^n + \dotsc,
\end{align}$$
and the residue of $f/g$ in $z_0$ is then
$$\operatorname{Res}\left(\frac{f(z)}{g(z)}; z_0\right) = \frac{f^{(n-1)}(z_0)/(n-1)!}{g^{(n)}(z_0)/n!} = n\cdot \frac{f^{(n-1)}(z_0)}{g^{(n)}(z_0)}.$$
