# How to find the integral $\int_{0}^{\infty}\exp(- (ax+b/x))\,dx$?

How do I find $$\large\int_{0}^{\infty}e^{-\left(ax+\frac{b}{x}\right)}dx$$ where $a$ and $b$ are positive numbers?

This is not a homework question. I will be quite happy if somebody can come up with a sort of bound, like an upper bound or a lower bound of integrand.

-
tried integration by parts, but didn't seem to work out. – dineshdileep Feb 5 '14 at 7:04
It is not an elementary integral. – Mhenni Benghorbal Feb 5 '14 at 7:08
WolframAlpha sort of demurred on the indefinite integral and just said the anti-derivative "couldn't be expressed in terms of elementary functions". [I often like to see what it does on the integrations that are known to be nasty...] – RecklessReckoner Feb 5 '14 at 7:24
Lazy but wondering - what if one squares the integrand to get $e^{-x^2} * e^{-1/x^2}*e^{-2}$ and then tries to play games in the complex plane similar to the way one solves the integral of $e^{-x^2}$ ? – Carl Witthoft Feb 5 '14 at 13:02

Sub $u=a x+b/x$. Then $a x^2-u x+b = 0$, and therefore

$$x = \frac{u}{2 a} \pm \frac{\sqrt{u^2-4 a b}}{2 a}$$

$$dx = \frac1{2 a}\left (1 \pm \frac{u}{\sqrt{u^2-4 a b}}\right ) du$$

Now, it should be understood that as $x$ traverses from $0$ to $\infty$, $u$ traverses from $\infty$ down to a min of $2 \sqrt{a b}$ (corresponding to $x \in [0,\sqrt{b/a}]$), then from $2 \sqrt{a b}$ back to $\infty$ (corresponding to $x \in [\sqrt{b/a},\infty)$). Therefore the integral is

$$\frac1{2 a} \int_{\infty}^{2 \sqrt{a b}} du \left (1 - \frac{u}{\sqrt{u^2-4 a b}}\right ) e^{-u} + \frac1{2 a} \int_{2 \sqrt{a b}}^{\infty} du \left (1 + \frac{u}{\sqrt{u^2-4 a b}}\right ) e^{-u}$$

which simplifies to

$$\frac1{a} \int_{2 \sqrt{a b}}^{\infty} du \frac{u}{\sqrt{u^2-4 a b}} e^{-u} = 2 \sqrt{\frac{b}{a}} \int_0^{\infty} dv \cosh{v} \, e^{-2 \sqrt{a b} \cosh{v}}$$

which is then

$$\int_0^{\infty} dx \, e^{-(a x+b/x)} = 2 \sqrt{\frac{b}{a}} K_1\left ( 2 \sqrt{a b}\right )$$

-
So beautiful. One more think I learnt ! Thanks for that. – Claude Leibovici Feb 5 '14 at 9:59
Brilliant! very good answer – franvergara66 Feb 5 '14 at 12:15
I've never seen that method before, turning $x=...$ into $dx=...$ what's that called and what's the argument that it's valid? – spraff Feb 5 '14 at 13:31
What is $K_1$ ? – enthdegree Feb 6 '14 at 4:39
@enthdegree: Modified Bessel function of the second kind, of order $1$. – Ron Gordon Feb 6 '14 at 7:08

As you say, this is a difficult integral. Provided $\Re(a)>0$ and $\Re(b)>0$, the solution I found is $$\frac{2 \sqrt{b} K_1\left(2 \sqrt{a} \sqrt{b}\right)}{\sqrt{a}}$$ in which appears the modified Bessel function of the second kind.

I obtained the result from a CAS. I have not been able to obtain any analytical form for the antiderivative but, surprizingly, the integral came out !

-
ya, you can assume they are positive, but may i know how you derived this. – dineshdileep Feb 5 '14 at 7:17
I obtained the result from a CAS. I have not been able to obtain any analytical form for the antiderivative but, surprizingly, the integral came out. – Claude Leibovici Feb 5 '14 at 7:41
can you please elaborate? I would like to inform you that this comes from a real world engineering problem I am working on and am not a mathematician. – dineshdileep Feb 5 '14 at 7:44
I really cannot tell you more except my surprize when I got the result for the integral. When I started, I thought that I should not get any result. By the way, I am a physicist and from very far away not a real mathematician. – Claude Leibovici Feb 5 '14 at 8:00

Of course we need $a,b>0$.

Knowing that the answer is supposed to be what Claude obtained, I can confirm that. By linear change of variables, we may assume $a=1$. Also for convenience take $b = c^2/4$. So now let $$F(c) = \dfrac{1}{c} \int_0^\infty e^{-x - c^2/(4 x)}\ dx$$ I claim $F(c) = K_1(c)$.
A differential equation for $y(c) = K_1(c)$ is $$y'' + \dfrac{1}{c} y' - \left(1 - \dfrac{1}{c^2}\right) y = 0$$ If we apply that to $F(c)$ and do some simplification, we get $$F'' + \dfrac{1}{c} F' - \left(1 - \dfrac{1}{c^2}\right) F = \int_0^\infty e^{-x-c^2/(4x)} \dfrac{c^2 - 4 x^2}{4 c x^2}\ dx$$ Using the change of variables $x = c^2/(4t)$, the right side becomes $$- \int_0^\infty e^{-t-c^2/(4t)} \dfrac{c^2 - 4 t^2}{4 c t^2}\ dt$$ and therefore is $0$. Now the general solution of the differential equation is $A I_1(c) + B K_1(c)$ where $A$ and $B$ are arbitrary constants. $K_1(c)$ is the solution that goes to $0$ as $c \to +\infty$ and is asymptotic to $1/c$ as $c \to 0+$.

-
Nice answer ! Thanks for it. – Claude Leibovici Feb 5 '14 at 10:04

$\newcommand{\+}{^{\dagger}} \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle} \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack} \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,} \newcommand{\dd}{{\rm d}} \newcommand{\down}{\downarrow} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,{\rm e}^{#1}\,} \newcommand{\fermi}{\,{\rm f}} \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,} \newcommand{\half}{{1 \over 2}} \newcommand{\ic}{{\rm i}} \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow} \newcommand{\isdiv}{\,\left.\right\vert\,} \newcommand{\ket}[1]{\left\vert #1\right\rangle} \newcommand{\ol}[1]{\overline{#1}} \newcommand{\pars}[1]{\left(\, #1 \,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}} \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,} \newcommand{\sech}{\,{\rm sech}} \newcommand{\sgn}{\,{\rm sgn}} \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}} \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert} \newcommand{\wt}[1]{\widetilde{#1}}$ $\ds{\int_{0}^{\infty}\expo{-\pars{ax + b/x}}\,\dd x\,,\qquad a > 0\,,\quad b > 0}$.

Let's $\ds{x \equiv A\expo{\theta}}$ such that $\ds{ax + {b \over x} = aA\expo{\theta} + {b \over A}\,\expo{-\theta}}$. We can choose $\ds{A}$ to satisfy $\ds{aA = {b \over A}\quad\imp\quad A =\root{b \over a}}$. Then, $\ds{ax + bx = a\root{b \over a}\pars{\expo{\theta} + \expo{-\theta}} =2\root{ab}\cosh\pars{\theta}}$

\begin{align} &\color{#c00000}{\int_{0}^{\infty}\expo{-\pars{ax + b/x}}\,\dd x} =\int_{-\infty}^{\infty}\expo{-2\root{ab}\cosh\pars{\theta}}\root{b \over a} \expo{\theta}\,\dd\theta \\[3mm]&=\root{b \over a}\int_{-\infty}^{\infty}\expo{-2\root{ab}\cosh\pars{\theta}} \bracks{\cosh\pars{\theta} + \sinh\pars{\theta}}\,\dd\theta \\[3mm]&=\color{#c00000}{2\root{b \over a}\ \overbrace{\quad\int_{0}^{\infty}\expo{-2\root{ab}\cosh\pars{\theta}} \cosh\pars{\theta}\,\dd\theta\quad}^{\ds{{\rm K}_{1}\pars{2\root{ab}}}}} \end{align} where $\ds{{\rm K}_{\nu}\pars{z}}$ is a Modified Bessel Function. See ${\bf 9.6.24}$ formula.

$$\color{#00f}{\large% \int_{0}^{\infty}\expo{-\pars{ax + b/x}}\,\dd x =2\root{b \over a}{\rm K}_{1}\pars{2\root{ab}}}$$

-