How to simplify a multiplication of several summations? The formula is $$-\sin(i)\sum_{n=0}^\infty (\frac{w}{2i})^n\sum_{n=0}^\infty (\frac{w}{i})^n\sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} (w)^{2n-1}.$$
I only want to get the coefficient of the $w^{-1}$ term, and the coefficients of other terms are negligible, so it looks like this
$$-\sin(i)\sum_{n=0}^\infty (\frac{w}{2i})^n\sum_{n=0}^\infty (\frac{w}{i})^n\sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} (w)^{2n-1} = -\sin(i)w^{-1}+ ...$$
I want to have this kind of expression because I'm finding the residue of a function $f$ at the point $i$, so I only need to know the coefficient of the $w^{-1}$ term.
I tried to use the small $o$ notation, but I don't know if I use it correctly.
$$-\sin(i)\sum_{n=0}^\infty (\frac{w}{2i})^n\sum_{n=0}^\infty (\frac{w}{i})^n\sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} (w)^{2n-1} = -\sin(i)(1+o(1))(1+o(1))(w^-1+o(1)),$$
where $\Phi(w) = o(\Psi(w))$ means $lim_{w\to 0} \Phi(w)/\Psi(w) = 0$.
 A: The product can be written in closed form, because the first two sums are geometric series
$$\sum_{n=0}^\infty \left(\frac{w}{2i}\right)^n = \frac{1}{1-(w/2i)}=\frac{2}{2+iw}$$
$$\sum_{n=0}^\infty \left(\frac{w}{i}\right)^n=\frac{1}{1+iw}$$
an the third sum is related to $\cos x:$
$$\sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} w^{2n-1}=
\frac{1}{w}\sum_{n=0}^\infty \frac{(-1)^n}{(2n)!} w^{2n}=\frac{\cos w}{w}$$
Therefore the result is
$$-\frac{\sin i\cos w}{2 (2+iw)(1+w)w} = \left(-\frac{1}{w} + \frac{3i}{2} + \frac{9w}{4}+O(w^2)\right)\sin i$$
A: By the definition of Laurent series multiplication, the only terms that will contribute to $w^{-1}$ in the product are the lowest-indexed terms (said another way, the first coefficient in the product series is the product of the first coefficients.)
Those are $\left(\frac{w}{2i}\right)^0$, $\left(\frac{w}{i}\right)^0$, and $\frac{(-1)^0}{0!}$.  Their product is $1$, and with the additional term of $-\sin(i)$ on the outside, the coefficient for $w^{-1}$ must be $-\sin(i)$.
