4
$\begingroup$

I am wondering whether the following integral

$$\int_{-\infty}^{\infty} \frac{\exp( - a x^2 ) \sin( bx )}{x} \,\mathrm{d}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.


EDIT : In view of this discussion, we have decided to add OP's self-answer to the end of the question, for it does not qualify as an answer yet contains vital details. The copying is unabridged.

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

$\endgroup$
5
  • $\begingroup$ Oops, I meant the integral to be \int_{-\infty}^{\infty} \exp( - a (x - x0) ^2 ) sin( bx ) / x, where a, b, and x0 are constant parameters. But the integral in the above post is also helpful to me. Thanks! $\endgroup$ – jaian Oct 6 '12 at 15:36
  • 1
    $\begingroup$ Have you considered Fourier transforms? This is a convolution in physical space which is multiplication in Fourier space. $\endgroup$ – tpg2114 Oct 6 '12 at 15:46
  • $\begingroup$ 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*iax0 ) / 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 :D $\endgroup$ – jaian Oct 6 '12 at 16:28
  • $\begingroup$ @Teresa you added the content of the incomplete answer by the op into their post, but you failed to work on deleting the no-longer-necessary "incomplete answer" from the OP?? And who is the "we" that decided for you to edit the content of the answer, while the answer still exists? $\endgroup$ – amWhy Feb 17 at 18:15
  • $\begingroup$ @amWhy What more can I do than send a flag? I raised one more than 7-8 hours ago. If I could delete it instantly I would most definitely do so. Maybe I will revert to the original answer, if it is felt that I should not have tampered with the content. Now I have unedited my edits to get the OPs original answer. $\endgroup$ – Teresa Lisbon Feb 17 at 18:16
8
$\begingroup$

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$.

$\endgroup$
0
2
$\begingroup$

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$$

$\endgroup$
3
  • $\begingroup$ I guess sin(bx)/x is an even function of x, so the integral should probably be nonzero. I was interested particularly in the case where x0 != 0 (which should be definitely nonzero), but I posted a wrong one..sry. $\endgroup$ – jaian Oct 6 '12 at 17:40
  • $\begingroup$ @jaian: Oh, I'm so sorry! I'm so careless and made a mistake! What did you mean about "where xo!=o"? $\endgroup$ – Alfred Chern Oct 6 '12 at 17:49
  • $\begingroup$ I mean, 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 shifted 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:) $\endgroup$ – jaian Oct 6 '12 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.