# Rewriting the expectation of f(x) by means of its derivative

I have a question regarding this proposition.

Let $$f: \mathbb{R} \rightarrow \mathbb{R}$$ be an a.e. differentiable function so that $$\int \frac{\left|f^{\prime}(x)\right|}{(1+|x|)^s} d x<\infty$$ ($$s$$ is an integer such that $$s \geq 1$$) and $$X$$ be a random variable with cdf $$F$$. Then, we have

$$\mathbb{E}\left[f\left(X\right)\right]=-\mathbb{E}\left[\int_{X}^{\infty} f^{\prime}(x) d x\right]=-\int_{-\infty}^{\infty} f^{\prime}(x) \mathbb{P}\left(X \leq x\right) d x=-\int_{-\infty}^{\infty} f^{\prime}(x) F(x) d x$$

I'm a bit confused by the first equality. Because

$$-\int_{X}^{\infty} f^{\prime}(x) d x = - f(x) \bigl\lvert_0^\infty = \lim _{x \rightarrow \infty} f(x) + f(X)$$.

However, we do not assume that $$\lim _{x \rightarrow \infty} f(x) = 0$$ or am I missing something?

Source: Hafouta, Y. (2022) Non-uniform Berry-Esseen theorem and Edgeworth expansions with applications to transport distances for weakly dependent random variables. arXiv:2210.07204.

• I was very much confused by the use of $f(x)$ and thought it was the pdf of the CDf $F(x)$. Jun 10 at 18:50 The above result from Hafouta (2022) is false without further assumptions like $$\lim _{x \rightarrow \infty} f(x)= \lim _{x \rightarrow -\infty} f(x)F(x)=0$$ Take $$f(x)=x\qquad F(x)=\Phi(x)=\int_{-\infty}^x \dfrac{\exp\{-\xi^2/2\}}{\sqrt{2\pi}}\text d\xi$$ Then $$\int_{-\infty}^{+\infty} \frac{\left|f^{\prime}(x)\right|}{(1+|x|)^2} \text d x<\infty$$ and $$\mathbb E[X]=0 \qquad \int_{-\infty}^{+\infty} \Phi(x)\,\text dx=+\infty$$
• Another counter example would be to compare the results from the functions $f(x)$ and $f(x)+1$. They have the same derivative but different expectation. Jun 10 at 19:07