# Thread: completing the square?

1. ## completing the square?

Hi, I'm really bad at basic math can someone please help me complete the square ><?

$
\int_{-\infty}^{\infty} \frac{e^{tx}}{\sigma\sqrt{2\Pi}} e^{\frac{-(x-\mu)^2}{2 \sigma{^2}}} dx
$

Then i let, $z = \frac{x - \mu}{\sigma}; dz = \frac{1}{\sigma}; x = z\sigma + \mu$

$
\int_{-\infty}^{\infty} \frac{e^{tz\sigma + \mu}}{\sqrt{2\Pi}} e^{\frac{z^2}{2}} dz
$

hmm! i really don't know what I'm doing but I'll just keep going..
$
\int_{-\infty}^{\infty} \frac{1}{\sqrt{2\Pi}} e^{\frac{z^2+ 2t(z\sigma + \mu)}{2}}e^{\frac{t^2}{2}} dz
$

yeahh i really don't know what to do but the answer is meant to be:
$e^{t\mu + \frac{t^2\sigma^2}{2}}$

I know that eventually I'm meant to have
$
\int_{-\infty}^{\infty} \frac{1}{\sqrt{2\Pi}} e^{\frac{-(x-\mu)^2}{2 \sigma{^2}}} dx = 1
$

and then have the answer outside this integral, but i don't know how to do it. Please help me

2. Originally Posted by Katina88
Hi, I'm really bad at basic math can someone please help me complete the square ><?

$
\int_{-\infty}^{\infty} \frac{e^{tx}}{\sigma\sqrt{2\Pi}} e^{\frac{-(x-\mu)^2}{2 \sigma{^2}}} dx
$

Then i let, $z = \frac{x - \mu}{\sigma}; dz = \frac{1}{\sigma}; x = z\sigma + \mu$

$
\int_{-\infty}^{\infty} \frac{e^{tz\sigma + \mu}}{\sqrt{2\Pi}} e^{\frac{z^2}{2}} dz
$

hmm! i really don't know what I'm doing but I'll just keep going..
$
\int_{-\infty}^{\infty} \frac{1}{\sqrt{2\Pi}} e^{\frac{z^2+ 2t(z\sigma + \mu)}{2}}e^{\frac{t^2}{2}} dz
$

yeahh i really don't know what to do but the answer is meant to be:
$e^{t\mu + \frac{t^2\sigma^2}{2}}$

I know that eventually I'm meant to have
$
\int_{-\infty}^{\infty} \frac{1}{\sqrt{2\Pi}} e^{\frac{-(x-\mu)^2}{2 \sigma{^2}}} dx = 1
$

and then have the answer outside this integral, but i don't know how to do it. Please help me
I think you missed minus before z^2 / 2 accidently. If plus is here the integral does not exist.