# How to integrate $f(x) =\exp(-ax-b/x)$?

I looked for it in the table of integrals but couldn't find it there. The integral is : $$\int_0^{+\infty} \exp\left(-ax-\frac{b}{x}\right) dx.$$ Can I solve it numerically in a program such as matlab. ??

## 2 Answers

We assume $a>0,b>0$. Then by the change of variable $$x=\sqrt{\frac ba}\cdot u$$ one gets $$\int_0^\infty e^{\large-ax-\frac{b}{x}}dx=\sqrt{\frac ab}\cdot\int_0^\infty e^{\large-\sqrt{ab}\left(u+\frac1u \right)}du=2\sqrt{\frac ba}\cdot K_1\left(2 \sqrt{ab}\right)$$ where we have used a standard representation of the modified Bessel function (10.32).

Edit. From (10.32.9) one may write \begin{align} 2K_1\!\left(2z\right)&=2\int_0^\infty e^{\large-2z\cosh t}\cosh t\:dt \\&=\int_0^\infty e^{\large-z\left(e^t+e^{-t}\right)}\left(e^t+e^{-t}\right)dt \\&=\int_0^\infty e^{\large-z\left(e^t+e^{-t}\right)}e^tdt+\int_0^\infty e^{\large-z\left(e^t+e^{-t}\right)}e^{-t}dt \\&=\int_1^\infty e^{\large-z\left(u+\frac1u \right)}du+\int_0^1 e^{\large-z\left(\frac1u+u\right)}du \\&=\int_0^\infty e^{\large-z\left(u+\frac1u \right)}du. \end{align}

• Thank you! Can you please explain further, what modified Bessel function term did you use? I tried using 10.32.8 but I still get confused. – phyM Jul 5 '17 at 7:48
• @maryam You are welcome, please see my edit. – Olivier Oloa Jul 5 '17 at 9:10
• "Hint" doesn't seem like an appropriate description of this answer. – Hurkyl Jul 7 '17 at 3:21
• @Hurkyl You are right (since I gave some details with an edit). Thanks. – Olivier Oloa Jul 7 '17 at 9:13


$\ds{\mrm{K}_{\nu}}$ is a Modified Bessel Function. \eqref{1} is found with $\ds{\mathbf{\color{#000}{9.6.24}}}$ in A & S Table.