When attempting to find an alternative solution to this question here, which called for the evaluation of the integral $$\int_0^\infty \frac{x \sin x}{1 + x^4} \, dx$$ using real methods, I ran up against the following improper integral $$\int_0^\infty e^{-x^2} \sin \left (\frac{1}{4 x^2} \right ) \, dx. \tag1$$ A value for this improper integral can be found. It is $$\frac{\sqrt{\pi}}{2} \exp \left (-\frac{1}{\sqrt{2}} \right ) \sin \left (\frac{1}{\sqrt{2}} \right ),$$ and is what I am having trouble in finding.

I have tried a number of the various tricks one typically employs when attempting to find such integrals such as Feynman trick of differentiating under the integral sign, series solution, and so on, all to no avail (perhaps I missed something here).

One method that looked promising was to use properties for the (inverse) Laplace transform, namely $$\int_0^\infty f(x) g(x) \, dx = \int_0^\infty (\mathcal{L} f)(s) \cdot (\mathcal{L}^{-1} g)(s) \, ds.$$

After enforcing a change of variable $x \mapsto \dfrac{1}{2 \sqrt{x}}$ we have \begin{align*} \int_0^\infty e^{-x^2} \sin \left (\frac{1}{4 x^2} \right ) \, dx &= \frac{1}{4} \int_0^\infty \frac{e^{-1/(4x)}}{x^{3/2}} \cdot \sin x \, dx\\ &= \int_0^\infty \mathcal{L} \{\sin x\} \cdot \mathcal{L}^{-1} \left \{\frac{e^{-1/(4x)}}{x^{3/2}} \right \} \, ds\\ &= \frac{1}{4} \int_0^\infty \frac{1}{s^2 + 1} \cdot \frac{2 \sin (\sqrt{s})}{\sqrt{\pi}} \, ds\\ &= \frac{1}{\sqrt{\pi}} \int_0^\infty \frac{s \sin s}{1 + s^4} \, ds, \tag2 \end{align*} where in the last line a substitution of $s \mapsto s^2$ has been made.

While this is a perfectly valid approach the only problem is the integral one ends up with in (2) is exactly the integral one started out with.

So my question is

Is it possible to evaluate the integral given in (1) using real methods that does not depend on evaluating the integral given in (2)?

  • $\begingroup$ Have you tried using complex residues? $\endgroup$
    – Dylan
    Dec 30, 2017 at 3:34
  • $\begingroup$ My preference is for a method that is real. $\endgroup$
    – omegadot
    Dec 30, 2017 at 3:35
  • $\begingroup$ Hmm, I somehow missed the "real methods" part twice. Carry on then. $\endgroup$
    – Dylan
    Dec 30, 2017 at 3:39
  • $\begingroup$ A method that evaluates the integral given in (2) using complex residues can be found here: math.stackexchange.com/questions/2335664/… If you feel residues make light work of (1) compared to finding (2) using a complex approach then by all means please share your solution. $\endgroup$
    – omegadot
    Dec 30, 2017 at 3:41
  • 3
    $\begingroup$ mathworld.wolfram.com/GlassersMasterTheorem.html $\endgroup$
    – tired
    Dec 30, 2017 at 10:42

3 Answers 3


Following tired's suggestion, the problem is equivalent to finding

$$\text{Im}\int_{0}^{+\infty}\exp\left(-x^2+\frac{i}{4x^2}\right)\,dx =\frac{1}{2}\text{Im}\int_{-\infty}^{+\infty}\exp\left(-\left(x-\frac{1-i}{2\sqrt{2}\,x}\right)^2-\frac{1-i}{\sqrt{2}}\right)\,dx$$ and through a rotation of the integration line this can be easily computed through the Cauchy-Schlömilch substitution, the best known instance of Glasser's master theorem: $$\forall a\in\mathbb{R}^+,\qquad \int_{0}^{+\infty}\exp\left(-x^2-\frac{a}{x^2}\right)\,dx = \frac{\sqrt{\pi}}{2}\,e^{-2\sqrt{a}}.$$


$$ \begin{align} \int_0^\infty e^{-x^2-\frac i{4x^2}}\,\mathrm{d}x &=\frac{i^{1/4}}{\sqrt2}\int_0^\infty e^{-\frac{i^{1/2}}2\left(x^2+\frac1{x^2}\right)}\,\mathrm{d}x\tag1\\ &=\frac{i^{1/4}}{\sqrt2}e^{-i^{1/2}}\int_0^\infty e^{-\frac{i^{1/2}}2\left(x-\frac1x\right)^2}\,\mathrm{d}x\tag2\\ &=\frac{i^{1/4}}{\sqrt2}e^{-i^{1/2}}\int_0^\infty e^{-\frac{i^{1/2}}2\left(x-\frac1x\right)^2}\frac1{x^2}\,\mathrm{d}x\tag3\\ &=\frac{i^{1/4}}{2\sqrt2}e^{-i^{1/2}}\int_{-\infty}^\infty e^{-\frac{i^{1/2}}2u^2}\,\mathrm{d}u\tag4\\ &=\frac{\sqrt\pi}2e^{-i^{1/2}}\tag5\\[3pt] &=\frac{\sqrt\pi}2e^{-\frac1{\sqrt2}}\left(\cos\left(\frac1{\sqrt2}\right)-i\sin\left(\frac1{\sqrt2}\right)\right)\tag6 \end{align} $$ Explanation:
$(1)$: substitute $x\mapsto\frac{i^{1/4}}{\sqrt2}x\quad$(this requires Cauchy's Theorem)
$(2)$: multiply by $e^{-i^{1/2}}e^{i^{1/2}}$
$(3)$: substitute $x\mapsto\frac1x$
$(4)$: average $(2)$ and $(3)$
$(5)$: evaluate integral$\quad$(this requires Cauchy's Theorem)
$(6)$: expand complex exponential

Both of the applications of Cauchy's Theorem above use the contour $$ [0,R]\cup\left[Re^{i\left[0,\frac\pi8\right]}\right]\cup\left[Re^{i\frac\pi8},0\right] $$ Looking at the imaginary parts of $(6)$, we get $$ \int_0^\infty e^{-x^2}\sin\left(\frac1{4x^2}\right)\,\mathrm{d}x=\frac{\sqrt\pi}2e^{-\frac1{\sqrt2}}\sin\left(\frac1{\sqrt2}\right)\tag7 $$


Considering $$ I=\int e^{-x^2} \cos \left (\frac{1}{4 x^2} \right ) \, dx\qquad \qquad J=\int e^{-x^2} \sin \left (\frac{1}{4 x^2} \right ) \, dx$$

$$K=I+iJ=\int e^{-x^2+\frac{i}{4 x^2}}\,dx\qquad \qquad \qquad \qquad L=I-iJ=e^{-x^2-\frac{i}{4 x^2}}\,dx$$

$$-x^2+\frac{i}{4 x^2}=-\left(x^2-\frac{i}{4 x^2} \right)=-\left(x+\frac{\sqrt{-i}}{2 x} \right)^2+\sqrt{-i}$$ $$-x^2-\frac{i}{4 x^2}=-\left(x^2+\frac{i}{4 x^2} \right)=-\left(x+\frac{\sqrt{i}}{2 x} \right)^2-\sqrt{i}$$

All of that makes $$K=\frac{ \sqrt{\pi }}{4} \left(e^{-(-1)^{3/4}} \left(-\text{erf}\left(\frac{(-1)^{3/4}}{2 x}-x\right)-1\right)+e^{(-1)^{3/4}} \left(\text{erf}\left(x+\frac{(-1)^{3/4}}{2 x}\right)+1\right)\right)$$ $$L=\frac{\sqrt{\pi }}{4} \left(e^{-\sqrt[4]{-1}} \left(1-\text{erf}\left(\frac{\sqrt[4]{-1}}{2 x}-x\right)\right)+e^{\sqrt[4]{-1}} \left(\text{erf}\left(x+\frac{\sqrt[4]{-1}}{2 x}\right)-1\right)\right)$$ and then $I$ and $J$ and finally your result since $J=\frac{1}{2} i (L-K)$


Using Wolfram Alpha $$\int_0^\infty e^{-x^2+\frac{a}{x^2}}\,dx=\frac{\sqrt{\pi }}{2} e^{-2 \sqrt{-a}}$$

  • $\begingroup$ You used Wolfram Alpha I'm guessing because of the signature $(-1)^{3/4}$... $\endgroup$
    – Crescendo
    Dec 30, 2017 at 4:51
  • $\begingroup$ @Crescendo. I finalized the calculation with another CAS which has the same signature. $\endgroup$ Dec 30, 2017 at 4:53
  • $\begingroup$ Wouldn't it be easier to just compute $K$ and then take its real part? $\endgroup$
    – Dylan
    Dec 30, 2017 at 10:21
  • $\begingroup$ @Dylan. You are totally correct but don't you think that it is the same ? In nay way, I am an old fashioned man and this is what I use to do for more than 60 years ! Cheers :-) $\endgroup$ Dec 30, 2017 at 10:25
  • $\begingroup$ No, I think it makes life easier to do one integral instead of two (half the work). Nonetheless, still a good answer +1 $\endgroup$
    – Dylan
    Dec 30, 2017 at 10:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .