# Do I have a chance to get a closed form for this integral?

I conjecture that $$\int_{-z}^z \frac{\sin \left(\frac \pi {2z} x + \frac \pi 2 \right)} z \int_z^\infty \exp\left({- \frac {(y-x)^2 \pi^2}{16}}\right) \,d y d x \sim \frac 1 {z^2}$$ when $$z\to \infty$$.

Maybe there should be also equality.

• The integral over $y$ should have a closed form involving $\operatorname{erf}$, though I'm not hopeful about the resulting integral over $x$. Jun 6, 2019 at 14:15
• My back-of-the-envelope estimate seems to indicate that there is a term of size about $1/z$. Ignoring signs and $\pi$s and constants, I see this term essentially like this: in the Taylor expansion of $\sin(\pi/2 + (x/z))$, one gets $1 - x^2/2z^2 + x^4/24z^4 + \cdots$, so the first integral has terms of the form $1/z + x^2/z^3 + x^4/z^5 + \cdots$. Changing variables in the inner integral to $y \mapsto y + x$ transforms the integrand into $e^{-y^2}$ and the lower bound of integration to $z - x$. The integral is thus approximately $e^{-(z-x)^2}$, which is tiny unless $z \approx x$. Using this... Jun 6, 2019 at 14:31
• naively in the outer integral shows that each term in the Taylor expansion looks roughly like a sum of $1/z \times (\cdots)$. I haven't been tracking the constants, but in fact they converge and look something like $1/e$ in my handwavy estimate. I suspect this analysis could be made more precise to show that the asymptotic is more like $1/z$. [Or I made an error]. Jun 6, 2019 at 14:32
• I think your handwavy estimation is quite good, but $\int_u^\infty e^{-y^2} d y \sim \frac 1 u e^{-u^2}$, not $e^{-u^2}$. Jun 6, 2019 at 14:42

Changing $$x=zt, y=zt+u$$, on can express \begin{align} I&=\int_{-z}^z \frac{\sin \left(\frac \pi {2z} x + \frac \pi 2 \right)} z \int_z^\infty \exp\left({- \frac {(y-x)^2 \pi^2}{16}}\right) \,d y d x\\ &=\int_{-1}^1\cos\frac{\pi t}{2}\,dt\int_{z(1-t)}^\infty \exp\left( -\frac{\pi^2}{16} u^2 \right)\,du \end{align} It can be integrated by parts, \begin{align} I=\frac{2}{\pi}&\left[\sin \frac{\pi}{2}\int_{0}^\infty \exp\left( -\frac{\pi^2}{16}t^2 \right)\,dt \right. \\ -&\sin \left( \frac{-\pi}{2} \right)\int_{2z}^\infty \exp\left( -\frac{z^2\pi^2}{16}t^2 \right)\,dt\\ -&z\left.\int_{-1}^1\sin \frac{\pi t}{2}\exp\left( -\frac{z^2\pi^2}{16}(1-t)^2 \right)\,dt \right] \end{align} or, $$\begin{equation} I=\frac{2}{\pi}\left[\frac{2}{\sqrt{\pi}}\left( 2-\operatorname{erf}\left( \frac{z\pi}{2} \right) \right)-z\int_{0}^2\cos \frac{\pi s}{2}\exp\left( -\frac{z^2\pi^2}{16}s^2 \right)\,ds\right] \end{equation}$$ For $$z\to\infty$$, one can evaluate the integral using the Laplace method, $$\begin{equation} z\int_{0}^2\cos \frac{\pi s}{2}\exp\left( -\frac{z^2\pi^2}{16}s^2 \right)\,ds\sim \frac{2}{\sqrt{\pi}}-\frac{2}{\sqrt{\pi}z^2}+\frac{1}{\sqrt{\pi}z^4}+O\left( z^{-6} \right) \end{equation}$$ while (DLMF) $$\begin{equation} \frac{2}{\sqrt{\pi}}\left( 2-\operatorname{erf}\left( \frac{z\pi}{2} \right) \right)\sim \frac{2}{\sqrt{\pi}}+O\left( z^{-1}e^{-z^2\pi^2/4} \right) \end{equation}$$ and thus $$\begin{equation} I\sim \frac{4}{\pi^{3/2}}\frac{1}{z^2}\left[1-\frac{1}{2z^2}+O\left( z^{-4} \right)\right] \end{equation}$$ Alternatively, by expressing the $$\cos$$ in complex and completing the exponent, the integral can be expressed as $$\begin{equation} z\int_{0}^2\cos \frac{\pi s}{2}\exp\left( -\frac{z^2\pi^2}{16}s^2 \right)\,ds=\frac{\exp(-1/z^2)}{\sqrt{\pi}}\left[ \operatorname{erf}\left( \frac{z^2\pi+2i}{2z} \right)+\operatorname{erf}\left( \frac{z^2\pi-2i}{2z} \right) \right] \end{equation}$$ which gives a closed form expression for the integral.
• It is very helpful to have your references to dlmf here. The expression for $I$ turns out far more complicated as I expected. Thanks for your help, it seems I have to find another way for what I wanted to do. Jun 7, 2019 at 8:35
As Paul Enta already answered, the integral can be exactly computed. $$J=\int_z^\infty \exp\left({- \frac { \pi^2}{16}(y-x)^2}\right) \,d y=\frac{2 }{\sqrt{\pi }}\left(1+\text{erf}\left(\frac{\pi}{4} (x-z)\right)\right)$$ $$I=\int \frac{\cos \left(\frac{\pi x}{2 z}\right)}{z}J \,dx=\frac{2 e^{-\frac{1}{z^2}}}{\pi ^{3/2}}\left(\text{erf}\left(\frac{\pi z (z-x)+4 i}{4 z}\right)-\text{erf}\left(\frac{\pi z (x-z)+4 i}{4 z}\right) \right)+\frac{4 \sin \left(\frac{\pi x}{2 z}\right)}{\pi ^{3/2}} \left(1+\text{erf}\left(\frac{\pi (x-z)}{4} \right)\right)$$ Now, using the bounds, the result of the given definite integral is $$\frac{2 \left(4-2 \text{erf}\left(\frac{\pi z}{2}\right)-i e^{-\frac{1}{z^2}} \left(\text{erfi}\left(\frac{1}{z}-\frac{i \pi z}{2}\right)-\text{erfi}\left(\frac{1}{z}+\frac{i \pi z}{2}\right)\right)\right)}{\pi ^{3/2}}$$ and expanding for large values of $$z$$, this gives $$\sim \frac{4}{\pi ^{3/2} z^2}\left(1-\frac{1}{2 z^2}+\frac{1}{6 z^4}+O\left(\frac{1}{z^6}\right) \right)+\frac{32 e^{-\frac{1}{4} \pi ^2 z^2}}{\pi ^5 z^5}\left(1-\frac{12}{\pi ^2 z^2}+\frac{4 \left(45-\pi ^2\right)}{\pi ^4 z^4}+O\left(\frac{1}{z^6}\right) \right)$$
• @Falrach. For sure, it was good. And moreover, when we notice that the leading factor is $0.718348$, still better ! Cheers :-) Jun 7, 2019 at 8:46
• @Falrach. Using the first portion of the expansion, it is already good for $z=2$. The approximation gives $0.159009$ instead of $0.158898$ Jun 7, 2019 at 13:47