4
$\begingroup$

I am wondering whether the following integral

$\int_{-\infty}^{\infty} \exp( - a x^2 ) sin( bx ) / x$

exists in closed form. I would like to use it for numerical calculation and find an efficient way to evaluate it. If analytical form does not exist, I really appreciate any alternative means for evaluating the integral. One method would be numerical quadrature including Gaussian quadrature, but it may be inefficient when the parameters a and b are very different in scale.

thanks in advance

  • 0
    Following your comment, I have just tried Fourier transform and it looks like the integral can be written as a sum of error functions having complex arguments. My (very very) tentative result is like the integral = const x { erf( ( b - 2*i*a*x0 ) / 2\sqrt{a} ) - similar term }. So, if I can find a reliable math library routine for complex error function, I may be able to evaluate it efficiently.. I'll try along this line. Thanks :D2012-10-06

3 Answers 3

7

We assume $a,b>0$. Then $\begin{eqnarray*} \int_{-\infty}^\infty dx\, e^{-a x^2}\frac{\sin b x}{x} &=& \int_0^b d\beta \, \int_{-\infty}^\infty dx\, e^{-a x^2} \cos \beta x \\ &=& \int_0^b d\beta \, \mathrm{Re} \int_{-\infty}^\infty dx\, e^{-a x^2+i \beta x} \\ &=& \int_0^b d\beta \, \mathrm{Re}\, \sqrt{\frac{\pi}{a}} e^{-{\beta}^2/(4a)} \\ &=& \pi \, \mathrm{erf}\left(\frac{b}{2\sqrt{a}}\right). \end{eqnarray*}$ This approach can be generalized to $x_0\ne0$.

  • 0
    @jaian: You're welcome. Glad to help.2012-10-06
1

We can consider the general type of integral, means

$\int_{-\infty}^{\infty}e^{-a(x-x_{0})^{2}}\frac{\sin(bx)}{x}dx$

Case 1. If $b=0$, the function identically 0, so the integral converges and equals to 0.

Remark. The function is an odd function of $b$ (we consider $b$ as a variable), so we can only consider cases of $b>0$ in the following.

Case 2. If $a<0$, the integral divergent and didn't exist.

Case 3. If $a>0$, we can calculate as following:

$\begin{align*} \int_{-\infty}^{\infty}e^{-a(x-x_{0})^{2}}\frac{\sin(bx)}{x}dx &=\int_{-\infty}^{\infty}e^{-a(x-x_{0})^{2}}(\int_{0}^{b}\cos(xy)dy)dx\\ &=\int_{0}^{b}(\int_{-\infty}^{\infty}e^{-a(x-x_{0})^{2}}\cos(xy)dx)dy \end{align*}$

$\begin{align*} \int_{-\infty}^{\infty}e^{-a(x-x_{0})^{2}}\cos(xy)dx &=\int_{-\infty}^{\infty}e^{-ax^{2}}\cos((x+x_{0})y)dx\\ &=\cos(x_{0}y)\int_{-\infty}^{\infty}e^{-ax^{2}}\cos(xy)dx -\sin(x_{0}y)\int_{-\infty}^{\infty}e^{-ax^{2}}\sin(xy)dx\\ &=\cos(x_{0}y)\int_{-\infty}^{\infty}e^{-ax^{2}}\cos(xy)dx \end{align*}$

We denote $\int_{-\infty}^{\infty}e^{-ax^{2}}\cos(xy)dx$ by $F(y)$, then

$\begin{align*} F^{\prime}(y)&=-\int_{-\infty}^{\infty}xe^{-ax^{2}}\sin(xy)dx =\frac{1}{2a}\int_{-\infty}^{\infty}\sin(xy)de^{-ax^{2}}\\ &=-\frac{y}{2a}\int_{-\infty}^{\infty}e^{-ax^{2}}\cos(xy)dx =-\frac{y}{2a}F(y) \end{align*}$

By calculation, we can obtain that $F(0)=\int_{-\infty}^{\infty}e^{-ax^{2}}dx =2\int_{0}^{\infty}e^{-ax^{2}}dx =\frac{1}{\sqrt{a}}\Gamma(\frac{1}{2}) =\frac{\sqrt{\pi}}{\sqrt{a}}$.

Then solve the ordinary differential equation with initial value, we can get:

$F(y)=F(0)e^{-\frac{y^{2}}{4a}}=\frac{\sqrt{\pi}}{\sqrt{a}}e^{-\frac{y^{2}}{4a}}$

So

$\begin{align*} \int_{-\infty}^{\infty}e^{-a(x-x_{0})^{2}}\frac{\sin(bx)}{x}dx &=\int_{0}^{b}\cos(x_{0}y)F(y)dy\\ &=\frac{\sqrt{\pi}}{\sqrt{a}}\int_{0}^{b}e^{-\frac{y^{2}}{4a}}\cos(x_{0}y)dy\\ &=\sqrt{\pi}\int_{0}^{\frac{b}{\sqrt{a}}}e^{-\frac{t^{2}}{4}}\cos(\sqrt{a}x_{0}t)dt \end{align*}$

Case 4. If $a=0$, then the integral becomes $\int_{-\infty}^{\infty}\frac{\sin(bx)}{x}dx$, by the criterion of sigular integral, we know that the integral converges.

In particular,

$\int_{-\infty}^{\infty}\frac{\sin(bx)}{x}dx =\lim_{a\rightarrow0^{+}}\int_{-\infty}^{\infty}e^{-a(x-x_{0})^{2}}\frac{\sin(bx)}{x}dx$

Set $a\rightarrow0^{+}$ in case 3, we can obtain that $\int_{-\infty}^{\infty}\frac{\sin(bx)}{x}dx =\sqrt{\pi}\int_{0}^{\infty}e^{-\frac{t^{2}}{4}}dt =\sqrt{\pi}\Gamma(\frac{1}{2})=\pi$

  • 0
    I mea$n$, x_0 \ne 0 (I am not sure whether it is displayed correctly here). What I wanted to do is to evaluate the overlap integral between a *shi$f$ted* Gaussian, \exp[ -a (x - x_0)^2 ], with a sinc function, i.e. sin(bx)/x. This appears in my problem at hand. Thanks anyway:)2012-10-06
-1

Thanks very much for your comments, and the following result was obtained including the case for $x_0 \ne 0$: $ \int_{-\infty}^{\infty} dx \exp[-a(x-x_0)^2] \frac{ \sin(bx) }{ x } = \pi \exp(-a x_0^2) \mathrm{Re}\left(\mathrm{erf}\left[\frac{b+2iax_0}{2\sqrt{a}}\right] - \mathrm{erf}\left[\frac{2iax_0}{2\sqrt{a}}\right]\right) $ where $a\gt0, b, x_0$ are assumed to be all real. (note: coefficients etc may be still wrong...)

This integral appears in a type of electronic structure calculation based on a grid representation (sinc-function basis). I believe the above result should be definitely useful.

Thanks much!! --jaian

  • 0
    Note that your raw $\TeX$ code is being displayed. To get it formatted, you need to enclose it in dollar signs; single dollar signs for inline formulas and double dollar signs for displayed equations.2013-02-20