I am interested to find the residue of
$$\frac{\cos{ax}}{(x^2-b^2)\sin{ax}}$$
at $x=b$.
How would I go about doing this?
I can see that the pole is second order, and so the formula
$$\text{res} = \lim_{x \rightarrow b} \Big[ \frac{d}{dx} \Big((x-b)^2 \frac{\cos{ax}}{(x^2-b^2)\sin{ax}} \Big) \Big]$$
should apply, but I am stuck as to how to evaluate this without maybe trying something like numerical differentiation. Which is the appropriate method?
The function $$f(x) = \frac{\cos{ax}}{(x^2-b^2)\sin{ax}}$$ has a pole of order $1$ at $x=b$, so your residue would be $$\lim_{x\to b} \left((x-b)\frac{\cos{ax}}{(x^2-b^2)\sin{ax}}\right)$$ you are doing for second order pole.