When trying to calculate a residue, I came across this limit:
$$L:=\lim_{z\to \pi k} \frac{z^3-2z^2}{(1-\mathrm e^{\mathrm iz})\sin(z)}\left[\frac{(3z^2-4z)(z-\pi k)^2}{z^3-2z^2}+2(z-\pi k)-\frac{(z-\pi k)^2\cos(z)}{\sin(z)}+\frac{(z-\pi k)^2\mathrm i\,\mathrm e^{\mathrm i z}}{1-\mathrm e^{\mathrm iz}}\right]$$
where $0\neq k\in\mathbb Z$ and $k$ is even.
Since the limits of the individual summands do not exist, it seems to be very hard to apply l'Hopital to the whole fraction.
Is there any way to simplify this in order to calculate the limit?
(The original problem was to find the residue of $z\mapsto\frac{z^2(z-2)}{(1-\exp(\mathrm i z))\sin(z)}$ at $z=k\pi$ where $0\neq k$ is an even integer.)
Thank you.
We can calculate the limit using series expansion at $z=\pi k$ where $0\neq k\in\mathbb Z, k \text{ even}$. We recall \begin{align*} \cos(z)&=1+\mathcal{O}\left((z-\pi k)^2\right)\\ e^{iz}&=1+i(z-\pi k)+\mathcal{O}\left((z-\pi k)^2\right)\\ \frac{1}{\sin(z)}&=\frac{1}{z-\pi k}+\mathcal{O}\left(z-\pi k\right)\\ \frac{1}{1-e^{iz}}&=\frac{i}{z-\pi k}+\frac{1}{2}+\mathcal{O}\left(z-\pi k\right) \end{align*} where we expand the series up to terms we need for calculation and put everything else into big-$\mathcal{O}$'s.
Comment:
In (1) we separate the first bracketed term by a limit of its own, since it can be calculated separately from the other terms. We cancel $z^3-2z^2$ and use the series expansion of $\frac{1}{1-e^{iz}}$ and $\frac{1}{\sin z}$.
In (2) we calculate the first limit. We factor out $z^3-2z^2$ and evaluate it at $z=\pi k$. We multiply out within in the limit and skip terms which do not contribute.
In (3) we collect related terms.
In (4) we expand $\frac{\cos z}{\sin z}$ and $\frac{e^{iz}}{1-e^{iz}}$ at $z=\pi k$.
In (5) we multiply out and cancel again terms which do not contribute. Now we are ready to cancel away some terms in the last step and do a final limit calculation.