# Improper integral using complex analysis.

Compute $$\int_0^{\infty} \frac{e^{-ax}}{1+x^2}\,\,dx,\;\; a>0$$ using complex analysis.

I tried to integrate the fucntion $$f(z)=\frac{e^{-az}}{1+z^2}$$ over the contour $$\gamma$$ with counter-clockwise orientation: but with no luck.

Edit The answers are great but lets keep this question open until someone maybe finds a way to solve this integral using complex analysis.

• I think that this integral has no closed form. – Szeto Oct 1 '18 at 12:11
• I myself am not really advanced in complex analysis, but I would suggest a real analysis approach in which you label your integral $f(a)$ and differentiate under the integral sign twice, obtaining $f''(a)$. Upon adding together $f(a)$ and $f''(a)$ you'll yield a solvable integral. From there it is a matter of solving a differential equation. – Jameson Oct 1 '18 at 15:03
• Try a rectangle with sides parallel to the axes. on the sides where the real part of $z$ is constant the integral is simple. where the imaginary part is constant you'll get something similar to the starting integral. Olny need to be careful and avoid the poles – Alan Muniz Oct 1 '18 at 15:42

As I already mentioned in the comments, I did not achieve the result through complex-analysis.

Instead I used the following real-analysis approach.

Let $$f(a)=\int_0^{\infty} \frac{e^{-ax}}{1+x^2}\,\,dx,\;\; a>0.$$ Then, $$f''(a)=\int_0^{\infty} \frac{x^2\cdot e^{-a\cdot x}}{1+x^2}\ dx.$$ It follows that $$f''(a)+f(a)=\int_0^{\infty}\ e^{-a\cdot x}\ dx.$$ Evaluate the integral: $$f''(a)+f(a)=\frac{1}{a}.$$ A general solution to this differential equation can be defined as the sum of a complementary solution and particular solution.

Find the complementary solution by solving the equation: $$f''(a)+f(a)=0.$$ It can be derived that the complementary solution is given by $$f_\text{c}(a)=C_{1}\cdot\cos(a)+C_{2}\cdot\sin(a).$$

Find the particular solution to $$f''(a)+f(a)=\frac{1}{a}$$ by variation of parameters.

List the basis solutions in $$f_{\text{c}}(a)$$: $$f_{b,1}(a)=\cos(a),\\ f_{b,2}(a)=\sin(a).$$ Determine the Wronskian of $$f_{b,1}(a)$$ and $$f_{b,2}(a)$$:

$$W(a)= \begin{vmatrix} \cos(a) & \sin(x) \\ \frac{d}{da}\cos(a) & \frac{d}{da}\sin(a) \\ \end{vmatrix} = \begin{vmatrix} \cos(a) & \sin(x) \\ -\sin(a) & \cos(a) \\ \end{vmatrix} =\cos^2(a)+\sin^2(a)=1.$$ Let $$g(a)=\frac{1}{a},\\ h_{1}(a)=-\int \frac{g(a)\cdot f_{b,2}(a)}{W(a)}\ da,\\ h_{2}(a)=\int \frac{g(a)\cdot f_{b,1}(a)}{W(a)}\ da.$$ The particular solution will be given by $$f_{\text{p}}(a)=h_{1}(a)\cdot f_{b,1}(a)+h_{2}(a)\cdot f_{b,2}(a).$$ Determine $$h_{1}(a)$$ and $$h_{2}(a)$$: $$h_{1}(a)=-\int \frac{\sin(a)}{a}\ da=-\text{Si}(a),\\ h_{2}(a)=\int \frac{\cos(a)}{a}\ da=\text{Ci}(a).$$ The particular equation is given by $$f_{\text{p}}(a)=\text{Ci}(a)\cdot\sin(a)-\text{Si}(a)\cdot \cos(a).$$ A general solution is defined as the sum of the complementary solution and particular solution: $$f(a)=C_{1}\cdot\cos(a)+C_{2}\cdot\sin(a)+\text{Ci}(a)\cdot\sin(a)-\text{Si}(a)\cdot \cos(a).$$ From the above expression for $$f(a)$$ can be derived that $$\lim \limits_{a \to \ 0} f(a)=C_{1}$$. From the integral form of $$f(a)$$ can be derived that $$\lim \limits_{a \to \ 0} f(a)=\frac{\pi}{2}$$. Therefore, $$C_{1}=\frac{\pi}{2}$$.

From the above expression for $$f(a)$$ can be derived that $$\lim \limits_{a \to \ \infty} f(a)=C_{2}\cdot \sin(\infty)$$. From the integral form of $$f(a)$$ can be derived that $$\lim \limits_{a \to \ \infty} f(a)=0$$. Therefore, $$C_{2}=0$$.

Thus, an expression in closed form for your integral is given by $$f(a)=\frac{\pi}{2}\cdot\cos(a)+\text{Ci}(a)\cdot\sin(a)-\text{Si}(a)\cdot \cos(a),\;\; a>0.$$

Not sure how you evaluate numerically this integral, but if you are happy with a special function take the exponential integral defined by $$E_1(z)=\int_z^{\infty}\frac{e^{-z}}{z}dz \space\ \space\ \space\ \left| Arg(z)\right|<\pi$$ Then complexifying \begin{align*} \int_0^{\infty} \frac{e^{-az}}{(z-i)(z+i)}dz &=-\int_0^{\infty}\frac{i}{2}\frac{e^{-az}}{z-i}dz+ \int_{0}^{\infty}\frac{i}{2}\frac{e^{-az}}{z+i}dz=-\int_{-ia}^{\infty}\frac{ia}{2}\frac{e^{-a(z+i)}}{az}dz + \\ &+\int_{ia}^{\infty}\frac{ia}{2}\frac{e^{-a(z-i)}}{az}dz= \frac{ia}{2} \left( -e^{-ia}E_1(-ia) + e^{ia}E_1(ia) \right) \end{align*}