I uploaded a question asking how to proof an equation.
But, I felt that I made some confusions, and I will ask the question in a more tidy form with details.
Suppose that $X \sim N(0,c)$. That is, $X$ is a random variable following the normal distribution with the zero-mean and variance $c$.
Let $f(\cdot)$ be a continuous function and $h$ is a constant.
Also, suppose that intervals $(a_{i-1},a_i)$ for $i \in \{1,\ldots,n,n+1\}$ divide the extended real line, $\bar{\mathbb{R}}=(-\infty,\infty)$.
(where $a_0=-\infty$ and $a_{n+1}=\infty$)
That is, $\cup_{i=1}^{n+1}(a_{i-1},a_i)=(-\infty,\infty)\setminus\{a_1,\ldots,a_n\}.$
Now, I am wondering how to derive the following equations:
$$\mathbb{E}[f(h\cdot X)\cdot X] = \sum \limits_{i=1}^{n+1} \int_{a_{i-1}/h}^{a_{i}/h}f(h\cdot x)\cdot x \cdot (\frac{1}{\sqrt{c}})\cdot \phi(\frac{x}{\sqrt{c}})\;\;dx \\ =\sqrt{c}\left[\sum \limits_{i=1}^{n+1}\int_{a_{i-1}/h}^{a_{i}/h} h\cdot f'(h\cdot x)\phi(\frac{x}{\sqrt{c}})\;\;dx-\sum \limits_{i=1}^{n} [f(a_i^-)-f(a_i^+)]\phi\left(\frac{a_i}{h\sqrt{c}}\right)\right].$$
where $\phi(\cdot)$ denotes the standard normal density function, $f'(\cdot)$ is the first derivative of $f(\cdot)$, $f(a_i^-)=\lim \limits_{x\rightarrow a_i^-}f(x)$, and $f(a_i^+)=\lim \limits_{x\rightarrow a_i^+}f(x)$.
I got an suggestion saying that the first equation is due to the law of the unconscious statistician.
Also, in the paper I am reading, there is a statement saying that "the second equation follows from integraion by parts and re-arrangement of terms."
But, I failed to derive that.