Sunday, 4 October 2015

integration - Seeking help with an error function Integral



I am trying to compute the following Integral
$$
I = \int_{0}^\infty x \exp \left(-2 x \right) \operatorname{erf}\left(\frac{x}{t^{H}\sqrt[4]{2}}-\frac{t^H}{2^{3/4}}\right) \, dx
$$
where
$\operatorname{erf} \left(z\right)$ is the error function given by

\begin{equation}
\operatorname{erf}(z) = \frac{2}{\sqrt{\pi}}\int_0^z \mathrm{e}^{-t^2} \,dt .
\end{equation}



Edit
To provide some context to the problem I have a probability density function, which I am trying to verify that it is well behaved and integrates to 1. I am also interested in computing the expectation and the integral above is the part I am struggling to integrate. In order to reduce the noise, I only posted part of the formula I was struggling with. The below integral should work out to be 1, but I have not been able to establish that, as of yet.
\begin{eqnarray}
I &=& \int_0^{\infty}\mathrm{e}^{-2 x} \left(\Psi\left(x, t\right) + \frac{2^{3/4} \mathrm{e}^{x-\frac{t^{-2 H} \left(t^{4 H}+2 x^2\right)}{2 \sqrt{2}}}}{t^{H}\sqrt{\pi }}\right){\kern 1pt} \,dx \\
&=& \int_0^{\infty} \mathrm{e}^{-2 x}\Psi\left(x, t\right){\kern 1pt} \,dx + \frac{2^{3/4}}{t^{H}\sqrt{\pi }}\int_0^{\infty}\mathrm{e}^{-x-\frac{t^{-2 H} \left(t^{4 H}+2 x^2\right)}{2 \sqrt{2}}}{\kern 1pt} \,dx\\
&=& \int_0^{\infty} \mathrm{e}^{-2 x}\Psi\left(x, t\right){\kern 1pt} \,dx + \operatorname{erfc}\left(\frac{t^H}{2^{3/4}}\right)\\

\end{eqnarray}
where
\begin{equation}
\Psi\left(x, t\right) = \operatorname{erfc} \left(\frac{x_0}{t^{H}\sqrt[4]{2}}-\frac{t^H}{2^{3/4}}\right),
\end{equation}



Formulation 2
$$\lim_{x\to\infty} \frac{1}{2}\left(\Xi\left(x, t\right) - \mathrm{e}^{2 x} \Psi\left(x, t\right)+1\right) = 1$$
where
$$\begin{equation}

\Xi\left(x_0, t\right) = \operatorname{erf} \left(\frac{x_0}{t^{H}\sqrt[4]{2}}+\frac{t^H}{2^{3/4}} \right),
\end{equation}$$
Any help would be much appreciated.


Answer



If $a=\frac1{t^H\sqrt[4]2}$, $b=\frac{t^H}{2^{3/4}}$, then we need
$$\begin{align}\int_0^{\infty}xe^{-2x}\cdot\frac2{\sqrt{\pi}}\int_0^{ax-b}e^{-y^2}dy&=\left.\frac2{\sqrt{\pi}}\left(-\frac x2-\frac14\right)e^{-2x}\int_0^{ax-b}e^{-y^2}dy\right|_0^{\infty}\\
&+\frac a{\sqrt{\pi}}\int_0^{\infty}\left(x+\frac12\right)e^{-2x}e^{-(ax-b)^2}dx\\
&=\frac14\frac2{\sqrt{\pi}}\int_0^{-b}e^{-y^2}dy\\
&+\frac a{\sqrt{\pi}}e^{-\frac{2b}a+\frac1{a^2}}\int_0^{\infty}\left(x-\frac ba+\frac1{a^2}+\frac ba-\frac1{a^2}+\frac12\right)e^{-a^2\left(x-\frac ba+\frac1{a^2}\right)^2}dx\\
&=\frac14\text{erf}(-b)+\frac a{\sqrt{\pi}}e^{-\frac{2b}a+\frac1{a^2}}\int_{-\frac ba+\frac1{a^2}}^{\infty}\left(u+\frac ba-\frac1{a^2}\right)e^{-a^2u^2}du\\

&=\frac14\text{erf}(-b)+\frac a{\sqrt{\pi}}e^{-\frac{2b}a+\frac1{a^2}}\left\{\left.-\frac1{2a^2}e^{-a^2u^2}\right|_{-\frac ba+\frac1{a^2}}^{\infty}+\frac1a\left(\frac ba-\frac1{a^2}\right)\int_{-b+\frac1a}^{\infty}e^{-v^2}dv\right\}\\
&=\frac14\text{erf}(-b)+e^{-\frac{2b}a+\frac1{a^2}}\left\{\frac1{2a\sqrt{\pi}}e^{-\left(b-\frac1a\right)^2}+\frac12\left(\frac ba-\frac1{a^2}\right)\text{erfc}\left(-b+\frac1a\right)\right\}\end{align}$$
Is that the kind of stuff you're looking for?



EDIT: I should have gone a little farther since $ab=\frac12$. Then $\frac1a=2b$, so we can write this result as
$$\int_0^{\infty}xe^{-2x}\cdot\frac2{\sqrt{\pi}}\int_0^{ax-b}e^{-y^2}dy=
\frac14\text{erf}(-b)+\frac1{2a\sqrt{\pi}}e^{-b^2}-b^2\text{erfc}(b)$$
Also by popular demand,
$$\begin{align}\int_0^{\infty}e^{-2x}\text{erfc}(ax-b)dx+\text{erfc}(b)&=
\text{erfc}(b)+\frac2{\sqrt{\pi}}\int_0^{\infty}e^{-2x}\int_{ax-b}^{\infty}e^{-y^2}dy\\

&=\text{erfc}(b)+\frac2{\sqrt{\pi}}\left\{\left.-\frac12e^{-2x}\int_{ax-b}^{\infty}e^{-y^2}dy\right|_0^{\infty}-\frac a2\int_0^{\infty}e^{-2x}e^{-(ax-b)^2}dx\right\}\\
&=\text{erfc}(b)+\frac12\text{erfc}(-b)-\frac a{\sqrt{\pi}}e^{-\frac{2b}a+\frac1{a^2}}\int_0^{\infty}e^{-a^2\left(x-\frac ba+\frac1{a^2}\right)^2}dx\\
&=\text{erfc}(b)+\frac12\text{erfc}(-b)-\frac a{\sqrt{\pi}}e^{-\frac{2b}a+\frac1{a^2}}\int_{-\frac ba+\frac1{a^2}}^{\infty}e^{-a^2u^2}du\\
&=\text{erfc}(b)+\frac12\text{erfc}(-b)-\frac1{\sqrt{\pi}}e^{-\frac{2b}a+\frac1{a^2}}\int_{-b+\frac1{a}}^{\infty}e^{-v^2}vu\\
&=\text{erfc}(b)+\frac12\text{erfc}(-b)-\frac12e^{-\frac{2b}a+\frac1{a^2}}\text{erfc}\left(-b+\frac1a\right)\\
&=\text{erfc}(b)+\frac12\text{erfc}(-b)-\frac12\text{erfc}\left(b\right)\\
&=\frac12\text{erfc}(b)+\frac12\text{erfc}(-b)\\
&=\frac1{\sqrt{\pi}}\int_b^{\infty}e^{-y^2}dy+\frac1{\sqrt{\pi}}\int_{-b}^{\infty}e^{-y^2}dy\\
&=\frac1{\sqrt{\pi}}\int_b^{\infty}e^{-v^2}dv-\frac1{\sqrt{\pi}}\int_b^{-\infty}e^{-v^2}dv\\
&=\frac1{\sqrt{\pi}}\int_b^{\infty}e^{-v^2}dv+\frac1{\sqrt{\pi}}\int_{-\infty}^be^{-v^2}dv\\

&=\frac1{\sqrt{\pi}}\int_{-\infty}^{\infty}e^{-v^2}dv\\
&=\frac1{\sqrt{\pi}}(2)\left(\frac12\right)\Gamma\left(\frac12\right)=1\end{align}$$
Verification complete, but I noticed that my error rate was kind of high in the above. Please check and let me know of any further edits required.


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...