Solution (source code)

= Solution

For the <scale family>, substitute $u=y/\sigma$ in the expectation:
$$
\boxed{\mathbb E_\sigma[g(Y/\sigma)]
=\int g(u)\frac1\sigma f(u)\,\sigma du
=\int g(u)f(u)\,du.}
$$
This depends on $f,g$ but not on $\sigma$. It holds whenever the expectation exists, including an extended expectation for nonnegative $g$; an undefined difference of two infinite integrals is not an expectation.