Evaluate $$\int_{-\infty}^\infty \frac{dx}{(x^2+1)(x^2+9)}$$
Firsly I found the residues of this function:
$$Res(i)=-i/16$$
$$Res(-i)=i/16$$
$$Res(3i)=i/48$$
$$Res(-3i)=-i/48$$
I then closed the contour using the upper half semi circle $C$, parametrized by $Rz^{it}$ where $0\leq t\leq \pi$ and $R$ is radius, which I'll take to infinity.
Using partial fractions:
$$\frac{1}{(z^2+1)(z^2+9)}=\frac{1}{8(z^2+1)}-\frac{1}{8(z^2+9)}$$
ML Lemma(I think) gives me that this integral is $\leq \pi R / (R^2-1)$ and $\leq \pi R / (R^2-9)$
But then the residue theorem:
$2\pi i (i/16+i/48)$ is negative. What is my mistake?
Since complex integration and I do not get along, I would just do this with real integration. I know that this isn't what the OP asked for, but it can be useful to solve a problem in more than one way.
$\int_0^{\infty} \frac{dx}{x^2+a^2} = \frac1{a}\arctan(\frac{x}{a})|_0^{\infty} = \frac{\pi}{2a} $, so $\int_{-\infty}^{\infty} \frac{dx}{x^2+a^2} = \frac{\pi}{a} $.
Using your partial fraction decomposition of $\frac{1}{(z^2+1)(z^2+9)} =\frac1{8}(\frac{1}{z^2+1}-\frac{1}{z^2+9}) $, I get $\frac{\pi}{8}(1-\frac1{3}) =\frac{\pi}{12} $.
Note that $ \int \frac{dx}{x^2-a^2} = -\frac1{a}(\tanh^{-1}(x/a)) $.