I'm trying to find the residue of the pole $+ib$ of $$f(z) = \frac{e^{iaz}}{(z^2+b^2)^2}$$
(the pole $-ib$ lies outside of the contour).
I'm trying to do this by $$Residue = (\frac{e^{iaz}}{(z^4+2z^2b^2+b^4)'})_{ib} = (\frac{e^{iaz}}{4z^3+4zb^2)})_{ib} = \frac{e^{ia(ib)}}{4(ib)^3+4(ib)b^2}$$
But the denominator still disappears. What am I doing wrong?
Let's demonstrate how to find the residue at the pole $z=i b$ by the definition of a residue, i.e., by finding the coefficient of the $(z-i b)^{-1}$ term in the Laurent expansion of $f(z)$. To do this, define $\zeta=z-i b$; then $f(z)$ may be written as
$$f(\zeta+i b) = \frac{e^{i a (\zeta+i b)}}{[(\zeta+i b)^2+b^2]^2} = \frac{e^{-a b}}{(i 2 b \zeta)^2} \frac{e^{i a \zeta}}{\left ( 1+\frac{\zeta}{i 2 b} \right )^2} $$
As you can see, we have a first term in $\zeta^{-2}$, so we seek the coefficient of $\zeta$ in the expansion of the second term. This expansion is
$$ -\frac{e^{-a b}}{(2 b \zeta)^2} (1+i a \zeta+\cdots) \left ( 1 - 2 \frac{\zeta}{i 2 b} + \cdots\right )$$
so that the coefficient of $\zeta$, and thus the residue is
$$ -i \frac{e^{-a b}}{4 b^2} \left ( a + \frac1{b}\right ) $$