The pdf of the normal distribution is: $$ \phi(x) = \frac{1}{\sqrt{2\pi \sigma^2}} e^{-\tfrac{1}{2}\left( \tfrac{x - \mu}{\sigma} \right)^2}.$$
Now assume $X \sim N(\mu, \sigma^2)$.
I am interested in $\mathbb{E}[Z^2]$ for $Z = \dfrac{x- \mu}{\sigma}$. For this purpose, I first write: $$ \phi(z) = \frac{1}{\sqrt{2\pi \sigma^2}} e^{-\tfrac{1}{2} z^2}$$
and then have $$ \mathbb{E}[Z^2] = \frac{1}{\sqrt{2\pi \sigma^2}} \int_{- \infty}^{\infty} z^2 e^{-\tfrac{1}{2} z^2} dz \qquad (1)$$
But apparently the correct answer is: $$ \mathbb{E}[Z^2] = \frac{1}{\sqrt{2\pi \sigma^2}} \sigma\int_{- \infty}^{\infty} z^2 e^{-\tfrac{1}{2} z^2} dz. \qquad (2) $$
I can see that in order to have $\sigma$ in the beginning, at (1) I need to use $dx$ (instead of $dz$) and then we have $\sigma dz = dx$. But, once we write the pdf of $z$ as $\phi(z)$ isn't the change in $z$ anymore? I am confused.
Edit: I think if I instead write down the formula $\mathbb{E}[((X-\mu)/\sigma)^2]$ then I end up at the correct answer. Maybe I am missing an important calculus property at (1).
Let $X \sim \mathcal N(\mu, \sigma^2)$ and let $Z = \frac{X-\mu}{\sigma}$.
Then the density function of $X$ (call it $f_X$) is equal to: $f_X(x) = \frac{1}{\sqrt{2\pi}\sigma}\exp(-\frac{(x-\mu)^2}{2\sigma^2})$. Since $Z$ is just a translated and scalled $X$, will have density, too ( call it $f_Z $ ).
As I see, you have problem in one point:
It is true, that for $\omega \in \Omega$ we have $Z(\omega) = \frac{X(\omega) - \mu}{\sigma}$, but not that $f_Z(x) = f_X(\frac{x-\mu}{\sigma})$. Densities do not work this way. In fact you can derive the density of $Z$ by looking at $CDF$ and then differentiate it (as long as it will be piecewise continuosly differentiable or so) or try to substitute in integrals to get from $f_X$ to $f_Z$ like this:
Let $A \in \mathcal B(\mathbb R)$ be borel set and denote $\nu_Z, \nu_X$ the distributions of $Z,X$ respectivelly.
Then we have $\nu_Z(A) = \mathbb P(Z \in A) = \mathbb P(\frac{X-\mu}{\sigma} \in A) = \mathbb P(X \in \sigma A + \mu) = \nu_X(\sigma A + \mu) $, where $\sigma A + \mu = \{ \sigma a + \mu : a \in A \}$
Now, we have $$\nu_X(\sigma A + \mu) = \int_{\sigma A + \mu} f_X(x)dx $$
And here, doing substitution $z = \frac{x-\mu}{\sigma}$, we get $dz = \frac{1}{\sigma} dx$ (that is the $\sigma$ u were missing). and from set $\sigma A + \mu$ we get back to just $A$, getting:
$$ \nu_X(\sigma A + \mu) = \int_A \sigma f_X(\sigma z + \mu) dz, $$
but $\nu_X(\sigma A + \mu) = \nu_Z(A)$, so we get the distribution of $Z$ which is:
$$\nu_Z(A) = \int_A \sigma f_X(\sigma z + \mu) dz.$$
So the density of $Z$ is $f_Z(z) = \sigma f_X(\sigma z + \mu) = \frac{1}{\sqrt{2\pi}} \exp( - \frac{z^2}{2}).$
If you're interested in approach with $CDF$ it goes like this: let $F_X, F_Z$ be CDF of $X,Z$ respectivelly, then:
$F_Z(t) = \mathbb P(Z \le t) = \mathbb P(X \le \sigma t + \mu) = F_X(\sigma t + \mu)$
Since $F_X$ was differentiable continuosly and function $t \to \sigma t + \mu$ is continuosuly differentiable, so is their superposition, so to get density of $Z$ just differentiate $F_Z$ getting:
$f_Z(t) = \frac{d}{dt} F_Z(t) = \frac{d}{dt} F_X(\sigma t + \mu) = F_X'(\sigma t + \mu) \cdot \sigma = f_X(\sigma t + \mu) \cdot \sigma$
(in this case it is simplier and generally (at least for me) it is simplier