<s>[INST] $ \int\limits_{-\infty}^{+\infty} \frac{2}{(x-1)\cdot(x^2-6x+10)}\,\mathrm{d}\,x$ how to approach such types of problems as improper integral?

$$ \int\limits_{-\infty}^{+\infty} \frac{2}{(x-1)\cdot(x^2-6x+10)}\,\mathrm{d}\,x$$

is it also solve by complex theory integration?
 [/INST] Your integral is$$\int_{-\infty}^\infty\left(\tfrac{2}{5(x-1)}-\tfrac{2(x-5)}{5(x^2-6x+10)}\right)dx=\left[\tfrac15\ln\tfrac{(x-1)^2}{x^2-6x+10}+\tfrac45\arctan(x-3)\right]_{-\infty}^\infty.$$As $x\to\pm\infty$, the numerator and denominator of $\tfrac{(x-1)^2}{x^2-6x+10}$ are both asymptotic to $x^2$, so the logarithm $\to\ln1=0$, and the integral is $\tfrac45(\tfrac{\pi}{2}-\tfrac{-\pi}{2})=\tfrac{4\pi}{5}$.
</s>