0

How do I integrate: $$\dfrac{1}{\sqrt{4\pi t}}\int_{-\infty}^{\infty}|y|e^{\frac{-(\xi-y)^2}{4t}}dy,$$ in terms of of the error function, erf$(x)=\dfrac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}dt$. I have done some substitutions that result in things like $\int_{\infty}^z$ which I think does not make sense.

Vaolter
  • 1,781

1 Answers1

1

$$\dfrac{1}{\sqrt{4\pi t}}\int_{-\infty}^{\infty}|y|e^{\frac{-(\xi-y)^2}{4t}}dy$$ $$=\dfrac{1}{\sqrt{4\pi t}}\int_{0}^{\infty}ye^{\frac{-(\xi-y)^2}{4t}}dy + \dfrac{1}{\sqrt{4\pi t}}\int_{-\infty}^{0}(-y)e^{\frac{-(\xi-y)^2}{4t}}dy$$ $$=\dfrac{1}{\sqrt{4\pi t}}\int_{0}^{\infty}ye^{\frac{-(\xi-y)^2}{4t}}dy - \dfrac{1}{\sqrt{4\pi t}}\int_{0}^{-\infty}(-y)e^{\frac{-(\xi-y)^2}{4t}}dy$$ $$=\dfrac{1}{\sqrt{4\pi t}}\int_{0}^{\infty}ye^{\frac{-(\xi-y)^2}{4t}}dy + \dfrac{1}{\sqrt{4\pi t}}\int_{0}^{\infty}ye^{\frac{-(\xi+y)^2}{4t}}dy$$ Then, integrating by parts ($u = y$, $\mathrm{d}v = \mathrm{e}^{\dots} $) and using that $\mathrm{erf}(x) = \frac{2}{\sqrt{\pi}}\int_0^x\mathrm{e}^{-t^2}\mathrm{d}t$, then performing the next pair of integrals by shifting $\xi$ away...:

$$=\sqrt{\frac{t}{\pi}}\mathrm{e}^{-\frac{\xi^2}{4t}} + \frac{\xi}{2}\left(1+\mathrm{erf} \frac{\xi}{2\sqrt{t}}\right) + \sqrt{\frac{t}{\pi}}\mathrm{e}^{-\frac{\xi^2}{4t}} - \frac{\xi}{2}\left(1-\mathrm{erf} \frac{\xi}{2\sqrt{t}}\right)$$ and this simplifies to $$=2\sqrt{\frac{t}{\pi}}\mathrm{e}^{-\frac{\xi^2}{4t}} + \xi\left(\mathrm{erf} \frac{\xi}{2\sqrt{t}}\right)$$

Eric Towers
  • 70,953
  • I cannot see how the second integral is the same as the first – Vaolter Apr 15 '14 at 22:32
  • @Vaolter: On the positive half, $|y|=y$. On the negative half, $|y| = -y$. Then, reversing the order of integration on the negative half, we get an additional minus sign and find that we can just double the integral on the positive half. – Eric Towers Apr 15 '14 at 22:36
  • I understand how to split the integral, but if is make $z=-y$ in the second integral I get $\int_0^{\infty}ze^{-(\xi+z)^2/4t}$ which is different to the first integral – Vaolter Apr 15 '14 at 22:45
  • @Vaolter: Not sure what integral you're trying to write, but I think I may have been hasty in cancelling negative signs... Editing. – Eric Towers Apr 15 '14 at 22:48
  • I appreciate your help but I could you add more steps to in the integration process and how you use the erf. – Vaolter Apr 16 '14 at 09:31
  • @Vaolter: Carpal tunnel is acting up. Instead I reference http://en.wikipedia.org/wiki/List_of_integrals_of_Gaussian_functions : $\int x \phi(a+bx)dx$ and also http://math.stackexchange.com/questions/518281/how-to-derive-the-mean-and-variance-of-a-gaussian-random-variable/519631#519631 (which shows the two steps you're asking about in a slightly different order). – Eric Towers Apr 16 '14 at 13:10