Exchanging derivatives and integrals with the delta function

dirac deltaexpected valuefunctional-analysisintegration

Let $H(x) = \begin{cases} 1 \text{ if } x \geq 0 \\ 0 \text{ if } x < 0 \end{cases},$ and let $\delta(x)$ be its distributional derivative (the Dirac Delta function). I have a function of the form

$$f(x,t) = \sum_{i=1}^{N} b_i H(t-g_i(x))$$

where each $g_i(\cdot)$ is differentiable. The derivative of $f$ with respect to $x$ is

$$\frac{\partial f}{\partial x} = – \sum_{i=1}^{N} b_i g_i'(x) \delta(t-g_i(x)).$$

This is not a function, but rather a functional on test functions. Now imagine that I assume that $t$ has some random variable with smooth density $\nu(t)$ with compact support on the real line, so that

$$\mathbb{E}[\frac{\partial f}{\partial x}] = \int_{-\infty}^{\infty} \frac{\partial f}{\partial x} \nu(t) dt = – \sum_{i=1}^{N} b_i g_i'(x) \nu(g_i(x)).$$

So far this is all fine and respects the rules of using the Delta function. However, I want to interpret $f(x,t)$ itself as a random variable with random component $t$. Is it correct to exchange the expectation and differentiation operator so that
$$\mathbb{E}[\frac{\partial f}{\partial x}] = \frac{\partial \mathbb{E}[f]}{\partial x}?$$

Furthermore, can I then take second derivatives and argue that

$$\frac{\partial^2 \mathbb{E}[f]}{\partial x^2} =- \sum_{i=1}^{N} b_i (g_i''(x) \nu(g_i(x)) + (g_i'(x))^2 \nu'(g_i(x)))?$$

Best Answer

The distributional/random variable interpretations of these integrals are not really useful to justify the differentiation OP wants do to. Instead, it is easier to write the integrals explicitely and perform the differentiation explicitely.

Let $F(x) = \mathbb E_{t\sim \nu}[f(x,t)]$. Then : \begin{align} F(x) &= \int_{\mathbb R} f(x,t) \nu(t)\text dt\\ &= \sum_{i=1}^Nb_i\int_{g_i(x)}^{+\infty}\nu(t)\text dt \end{align} From this last formula, we see that $F$ is differentiable and : \begin{align} F'(x) &=-\sum_{i=1}^N b_i \nu(g_i(x))g_i'(x) \end{align} We can rewrite this as : $$\frac{d}{dx}\mathbb E[f(x,t)]=\mathbb E\left[\frac{\partial f}{\partial x}(x,t)\right]$$

Likewise, we can compute : $$F''(x) = -\sum_{i=1}^N b_i \left(\nu'(g_i(x)) (g_i'(x))^2 + \nu(g_i(x))g_i''(x)\right)$$

Related Question