1. ## [SOLVED] integral

$\displaystyle \int_{-\infty}^{\infty} {e^{-\frac {u^2 + (u-z)^2}{2 \sigma^2}} du} = \int_{-\infty}^{\infty} {e^{-\frac {2u^2 - 2uz + z^2}{2 \sigma^2}}du} = e^{-\frac{z^2}{2 \sigma^2}} \int_{-\infty}^{\infty} {e^{-\frac {2u^2 - 2uz}{2 \sigma^2}}du}$

$\displaystyle = e^{-\frac{z^2}{2 \sigma^2}} \int_{\infty}^{\infty} {e^{-\frac {u^2 - uz}{ \sigma^2}}du}$

what now?

sorry, I didn't mean to put this thread here...

2. Originally Posted by akane
$\displaystyle \int_{-\infty}^{\infty} {e^{-\frac {u^2 + (u-z)^2}{2 \sigma^2}} du} = \int_{-\infty}^{\infty} {e^{-\frac {2u^2 - 2uz + z^2}{2 \sigma^2}}du} = e^{-\frac{z^2}{2 \sigma^2}} \int_{-\infty}^{\infty} {e^{-\frac {2u^2 - 2uz}{2 \sigma^2}}du}$

$\displaystyle = e^{-\frac{z^2}{2 \sigma^2}} \int_{\infty}^{\infty} {e^{-\frac {u^2 - uz}{ \sigma^2}}du}$

what now?

sorry, I didn't mean to put this thread here...
You want to use the fact that $\displaystyle \int f_X\text{ dx }= 1.$

Turn your integrand into a normal pdf.

3. Originally Posted by Anonymous1
You want to use the fact that $\displaystyle \int f_X\text{ dx }= 1.$

Turn your integrand into a normal pdf.
I have this:

$\displaystyle g_{Z}(z) = \int_{-\infty}^{\infty} f(u,u-z) du = \int_{-\infty}^{\infty} \frac{1}{2 \pi \sigma^2} e^{-\frac{u^2+(u-z)^2}{2 \sigma^2}} du$

Z should also be a normal variable, I don't know how to get a function of only one variable under the integral

4. Have you ever heard of the error function?

$\displaystyle \int_{-\infty}^{\infty} {e^{-\frac {u^2 + (u-z)^2}{2 \sigma^2}} du} =\left(\frac{1}{2}\sqrt{\pi\sigma^2} e^{-\frac{z^2}{4\sigma^2}}\right)\cdot\left[\text{erf}(-\frac{z-2u}{2\sigma})|_{-\infty}^{+\infty}\right]$

Also, $\displaystyle \text{erf}(\infty)=1$ and $\displaystyle \text{erf}(-\infty)=-1$

5. Originally Posted by Anonymous1
Have you ever heard of the error function?

$\displaystyle \int_{-\infty}^{\infty} {e^{-\frac {u^2 + (u-z)^2}{2 \sigma^2}} du} =\left(\frac{1}{2}\sqrt{\pi\sigma^2} e^{-\frac{z^2}{4\sigma^2}}\right)\cdot\left[\text{erf}(-\frac{z-2u}{2\sigma})|_{-\infty}^{+\infty}\right]$

Also, $\displaystyle \text{erf}(\infty)=1$ and $\displaystyle \text{erf}(-\infty)=-1$
thanks for help

I've heard of it, but this is actually the first time it appeared in my assignment so I wasn't able to recognize it

6. Originally Posted by akane
$\displaystyle \int_{-\infty}^{\infty} {e^{-\frac {u^2 + (u-z)^2}{2 \sigma^2}} du} = \int_{-\infty}^{\infty} {e^{-\frac {2u^2 - 2uz + z^2}{2 \sigma^2}}du} = e^{-\frac{z^2}{2 \sigma^2}} \int_{-\infty}^{\infty} {e^{-\frac {2u^2 - 2uz}{2 \sigma^2}}du}$

$\displaystyle = e^{-\frac{z^2}{2 \sigma^2}} \int_{\infty}^{\infty} {e^{-\frac {u^2 - uz}{ \sigma^2}}du}$

what now?

sorry, I didn't mean to put this thread here...
You have:

$\displaystyle \int_{-\infty}^{\infty} e^{-\frac{u^2+(u-z)^2}{2\sigma^2}}\;du$

To do this we complete the square of the integrand:

$\displaystyle u^2+(u-z)^2=\left(\sqrt{2}u-\frac{z}{\sqrt{2}}\right)^2+\frac{z^2}{2}$

So:

$\displaystyle \int_{-\infty}^{\infty} e^{-\frac{u^2+(u-z)^2}{2\sigma^2}}\;du =e^{\frac{z^2}{4\sigma^2}} \int_{-\infty}^{\infty}$$\displaystyle e^{-\frac{\left(\sqrt{2}u-z/\sqrt{2}\right)^2}{2\sigma^2}}\;du$

Now make the change of variable:

$\displaystyle v=\frac{\sqrt{2}u-z/\sqrt{2}}{\sigma}$

and see what happens.

CB