$X$ is a random variable with pdf $f$ and $g: \mathbb R \to \mathbb R$ is a measurable function. Before I start operating with $E[g(X)]$ I need to show that it exists. What does it take to show it?
1) Do I need to show that $\forall a \in \mathbb R$ and $\forall b \in \mathbb R$, $a \le b$, $\int_{a}^{b}g(x)f(x)dx$ exists (i.e. $g(x)f(x)$ are Riemann integrable on any interval)?
2) Or I need to show that $\lim_{z \to \infty}\int_{c}^{z}g(x)f(x)dx + \lim_{z \to -\infty}\int_{z}^{c}g(x)f(x)dx=a \in \mathbb R$ (i.e. $a \ne \infty$ and $a \ne -\infty$) (because 1 is somehow automatically true)?
3) Or both?
Basically what can go so wrong that an expected value does not exists?
If your random variable $X$ is $\mathbb{R}$-valued, then you need to show that the integral over the whole of $\mathbb{R}$ exists. Note that from this you will also be able to conclude that the integral over any $[a,b]$ will also exist.