I'm currently trying to solve an integral of this type
$$ I=\int_{x_0}^\infty dx \frac{1}{x^2 \sqrt{1+\frac{a}{x}+\frac{b}{x^2}}}, $$ where $x$ and $x_0$ are positive but $a,b$ can be both positive and negative (their specific value is not really important so you can pick some random choice you like in the answer, if you want).
I know already this integral could be done with trigonometric substitutions but it's kind of a mess so I was wondering if it can be done in a smarter way using residues and complex analysis. However, I'm a bit rusty/not great with complex integration so I was wondering if somebody can help me with it? (Assuming this is actually a doable integral in such a way).
Thanks!
$\displaystyle I=\int_{x_0}^{+\infty}\frac{1}{x^2 \sqrt{1+\frac{a}{x}+\frac{b}{x^2}}}dx$
By letting $\,t=\dfrac1x\,,\,$ we get that
$I=\displaystyle\int_{\frac1{x_0}}^0\frac{t^2}{\sqrt{bt^2+at+1}}\left(-\frac1{t^2}\right)dt=\int_0^{\frac1{x_0}}\frac1{\sqrt{bt^2+at+1}}dt.$
First case : $\;b<0\;.$
In this case it results that
$\displaystyle\begin{align} I&=\frac1{\sqrt{-b}}\int_0^{\frac1{x_0}}\frac1{\sqrt{\frac{a^2-4b}{4b^2}-\left(t+\frac a{2b}\right)^2}}dt=\\ &=\frac1{\sqrt{-b}}\left[-\arcsin\left(\frac{2bt+a}{\sqrt{a^2-4b}}\right)\right]_0^{\frac1{x_0}}=\\ &=\frac1{\sqrt{-b}}\left[\arcsin\left(\frac a{\sqrt{a^2-4b}}\right)-\arcsin\left(\frac{2b+ax_0}{x_0\sqrt{a^2-4b}}\right)\right]. \end{align}$
Second case : $\;b>0\;$ and $\;a^2<4b\;.$
In this case it results that
$\displaystyle\begin{align} I&=\frac1{\sqrt b}\int_0^{\frac1{x_0}}\frac1{\sqrt{\left(t+\frac a{2b}\right)^2+\frac{4b-a^2}{4b^2}}}dt=\\ &=\frac1{\sqrt b}\left[\ln\left(t+\frac a{2b}+\sqrt{\left(t+\frac a{2b}\right)^2+\frac{4b-a^2}{4b^2}}\;\right)\right]_0^{\frac1{x_0}}=\\ &=\frac1{\sqrt b}\left[\ln\left(t+\frac a{2b}+\sqrt{t^2+\frac abt+\frac1b}\;\right)\right]_0^{\frac1{x_0}}=\\ &=\frac1{\sqrt b}\left[\ln\left(\frac1{x_0}+\frac a{2b}+\sqrt{\frac1{x_0^2}+\frac a{bx_0}+\frac1b}\;\right)-\ln\left(\frac a{2b}+\frac1{\sqrt b}\right)\right] \end{align}$
Now, try to calculate the integral $\,I\,$ in the other cases.