When is the expectation of function times input, the expectation of derivative?

70 Views Asked by At

So, my question is about the identity

$$\int_{-\infty}^\infty x f(x) e^{\frac{-x^2}{2}} \mathrm{d}x = \int_{-\infty}^\infty f'(x) e^{\frac{-x^2}{2}} \mathrm{d}x$$

which, to me, comes down to

$$\mathbb{E}[X f(X)] = \mathbb{E}[f'(X)].$$

Now I would like to know what properties $f$ should satisfy for this identity to hold. Using integration by parts

$$\int_{-a}^a x f(x) e^{\frac{-x^2}{2}} \mathrm{d}x = \int_{-a}^a f'(x) e^{\frac{-x^2}{2}} \mathrm{d}x - \left(f(a) e^{\frac{-a^2}{2}} - f(-a) e^{\frac{-a^2}{2}}\right),$$

I managed to figure out that sufficient conditions would be

  1. $f$ is even, i.e. $f(-x) = f(x)$
  2. $f$ is bounded, i.e. $\lim_{x \to \pm \infty} f(x) \in \mathbb{R}$

but I was wondering whether there are other cases for which this identity holds.

Would anybody be able to tell me for which functions $f$ this identity holds? I would also be grateful if someone could point me to the wiki of this identity, if there would be one.

1

There are 1 best solutions below

1
On

\begin{align} & \int xf(x) e^{-x^2/2} \, dx = \int f(x) \Big( xe^{-x^2/2}\, dx\Big) \\[10pt] = {} & \int u\,dv= uv-\int v\, du & & \text{(integration by parts)} \\[10pt] = {} & f(x) e^{-x^2/2} - \int e^{-x^2/2} \Big(f'(x) \, dx\Big) \end{align} So you need $$ 0 = \Big[ f(x) e^{-x^2/2} \Big]_{x\,:=\,0}^{x\,:=\,+\infty} = \lim_{x\to-\infty} f(x) e^{-x^2/2} - \lim_{x\to+\infty} f(x) e^{-x^2/2}. $$ You also need the integrals of the absolute values of all functions whose integrals are taken to be finite.

You certainly don't need $f$ to be even.

However, if $f'(x) = e^{x^2},$ then you have a complication: the very last integral that appears above diverges to $+\infty.$