Residue/Laurent series of $\frac{z}{1+\sin(z)}$ at $z=-\pi/2$ For some reason, I just can't quite figure out how to easily calculate the Laurent series for the following function: 
$$
f(z)=\frac{z}{1+\sin(z)},\quad z_0=-\frac{\pi}{2}
$$
I don't really need the whole series, just the residue.  The function has a zero of order 2 at $z=-\pi/2$, which would lead to the nasty calculation: 
$$
\text{Res}[f,z_0]=\lim_{z\rightarrow-\pi/2}\frac{d}{dz}(z+\pi/2)^2f(z)
$$  The derivative is nasty and we'd have to apply L'H$\hat{\text{o}}$pital's rule 4 times to get the denominator to not vanish (more nastiness). 
So Laurent series it is!  But for some reason my worn out qual-studying brain can't figure out how to do it.  A hint would be lovely!
 A: Write $z = (-\pi/2) + w$. Then $\sin z = \sin (w-\pi/2) = -\cos w$.
Now, you can easily get the beginning of the Taylor expansion of $1 + \sin z$ around $-\pi/2$:
$$1 + \sin z = 1 - \bigl( 1 - \frac{w^2}{2} + \frac{w^4}{4!} - O(w^6)\bigr) = \frac{w^2}{2}\bigl(1 - \frac{w^2}{12} + O(w^4)\bigr)$$
and therefore
$$\begin{align}
\frac{z}{1+\sin z} &= \frac{w-\pi/2}{\frac{w^2}{2}\bigl(1 - \frac{w^2}{12} + O(w^4)\bigr)}\\
&= \frac{2w-\pi}{w^2}\bigl(1 + \frac{w^2}{12} + O(w^4)\bigr)\\
&= -\frac{\pi}{w^2} + \frac{2}{w} - \frac{\pi}{12} + \frac{w}{6} + O(w^2).
\end{align}$$
Now replace $w$ with $z - (-\pi/2)$.
A: First write the function as a function of $x+\pi/2$. 
$\sin(z)=\sin(z+\pi/2-\pi2)=\sin(z+\pi/2)\cos(-\pi/2)+\cos(z+\pi/2)\sin(-\pi/2)$
So, you function is
$$\frac{-\frac{\pi}{2}+(z+\frac{\pi}{2})}{1-\cos(z+\pi/2)}$$
Now, use long division to with the series of the numerator and denominator.
Take into account that 
$$\cos(x)=1-x^2/2+x^4/41+O(x^5).$$
Also take into account that for long division you need the the constant coefficient of the denominator to be non-zero. So, you would take $(z+\pi/2)^2$ out as a factor from the denominator before dividing, and put it back afterwards.
