i want to understand the solution of the following integral:
$$\int_{0}^{+\infty} x^{-1/2}\;\exp({-x-\frac{a}{x}})dx=\sqrt\pi\; \exp(-2\sqrt a),\, a>0$$
The solution was generated by Mathematica, but i can't find a way to solve it my self. I have tried to substitute $\exp(-\frac{a}{x})=\sum_{n=0}^\infty\frac{(-\frac{a}{x})^n}{n!}$ and switching integration and summation (i now know this isn't legal in this case), which gave:
$$\sum_{n=0}^\infty\frac{(-a)^n}{n!}\int_0^{+\infty}x^{\frac 1 2 -n+1}\;e^{-x}dx$$
I also now know that these integrals do not converge, but i just set them to $\Gamma(\frac 1 2-n)=\sqrt \pi \frac{n!(-4^n)}{(2n)!}$, which yields:
$$ \sum_{n=0}^\infty\frac{(2\sqrt a)^n}{n!}\sqrt \pi= \sqrt\pi \;\exp(2\sqrt a)$$
It seems using $|\Gamma(\frac 1 2-n)|$ instead of $\Gamma(\frac 1 2-n)$ gives the right results. Observing that $$x^{\frac 1 2 -n+1}\;e^{-x}>0\,\forall x\in(0,+\infty)$$
using the absolute value seems somehow justified.
My questions are:
1. How do you evaluate the original integral?
2. Could the methods i used be modified so that they were legal and yielded the right result?
Thank you all very much in advance :)