To calculate the residue of a complex integral, I look at the taylor expansion of $ \frac{\cos(z)}{\sin(z)}$, and want to find the coefficient in front of the $z^{-1}$ term.
I have been given the solution, which is: $$ \frac{\cos(z)}{\sin(z)} = \frac{1 - \frac{1}{2}z^2 + \ldots}{z(1 - \frac{1}{6}z^2 + \ldots)} =^{*} \frac{1}{z}(1 - \frac{1}{2}z^2)(1 + \frac{1}{6}z^2) + \ldots = \frac{1}{z} - \frac{1}{3}z + \ldots$$ so the residue is 1.
I can't, however, figure out how he performs the step I've marked with an asterisk (from fraction to no fraction, so to speak). Can anybody help me out?
Thanks in advance!
Note that for $|w|<1$, $$\frac{1}{1-w}=\sum_{n\geq o}w^n=1+w+o(w).$$ Hence $$\frac{1}{1 - \frac{1}{6}z^2+o(z^2)}=1+\frac{1}{6}z^2+o(z^2).$$