Assume the following PDF.
$$f(z) = \frac{1}{\sqrt{2π}}e^{-(z^2 / 2)}$$
Find E(z).
For now, I got
E(z) = $\int_{-\infty}^{\infty} f_z(z) dz $
And for any odd function F, (i.e. F(−x) = −F(x)∀x ∈ R),
$\int_{-\infty}^{\infty} f_z(z) dz= 0$
So, the function zf(z) = $$ z*e^{-(z^2 / 2)} \frac{1}{\sqrt{2π}}$$
is an odd function. Hence E(Z) = 0.
Is it correct? Or is there another way to solve this problem?
Your theorem about integral of an odd function being equal to $0$ is valid only if the integral exists, so you would need to show first that $E|Z| <\infty$, before applying theorem (you may obtain wrongly $EX=0$ for Cauchy distribution because of omitting this assumption). If you don't know that Expected Value of this distribution is finite then you may calculate the Expected Value directly: $$\int_{-\infty}^\infty \frac{1}{\sqrt{2 \pi}}z \cdot e^\frac{-z^2}{2}dz=\int_{-\infty}^{-\infty} \frac{z}{-z \cdot \sqrt{2 \pi}} e^u du=\int_{-\infty}^{-\infty} \frac{-1}{\sqrt{2 \pi}} e^u du=0-0=0$$
We substituded $u=-\frac{z^2}{2}, du=-z dz$, so $dz=\frac{-1}{z}du$. Also $\lim_{z \to -\infty} u=-\infty$ and $\lim_{z \to \infty} u=-\infty$.