Problem: Z is normally distributed with mean $0$ standard deviation 1. Goal: obtain the moment generating function of Z.
So I started with $E[e^{tz}] = M_z(t)= \int_{-\infty}^{\infty}e^{tz}(\frac{1}{\sqrt{2\pi}}e^{\frac{-z^2}{2}})dz$
$\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-(\frac{z^2}{2}-tz)} dz = \int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-(\frac{z^2-2tz}{2})} dz$ completing the squares in the exponent we get
$\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-(\frac{z^2-2tz+t^2}{2})}*e^{\frac{t^2}{2}} dz = \int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{(\frac{-(z-t)^2}{2})}*e^{\frac{t^2}{2}} dz$
then my notes says $e^{\frac{t^2}{2}} \int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{(\frac{-(z-t)^2}{2})} dz $ where $\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{(\frac{-(z-t)^2}{2})} =1$ so the mgf is $e^{\frac{t^2}{2}}$.
Why is $\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{(\frac{-(z-t)^2}{2})} =1$?
I know that $\int_{-\infty}^{\infty}(\frac{1}{\sqrt{2\pi}}e^{\frac{-(x-\mu)^2}{2\sigma^2}})dx = 1$(prob. density function of a normal distribution) but no where in the problem did it mention $\mu = t$ in fact, $\mu=0$ how could $\int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{(\frac{-(z-t)^2}{2})} =1$??