# simplifying an expression involving an integral

Simplify the following expression

$$\iint_{-\infty}^{c+x}xf(x)f(y) \,dy\,dx+\iint_{c+x}^{\infty}yf(x)f(y) \,dy\,dx$$

where $x$ and $y$ are iid random variables; $c$ is a constant; and $f$ is the probability density function. You may call the CDF as $F(\cdot)$.

-

## 1 Answer

This is $\mathbb E(Z)$, where $$Z=X\cdot\mathbf 1_{Y\leqslant c+X}+Y\cdot\mathbf 1_{Y\geqslant c+X}.$$ Since $X$ and $Y$ are identically distributed, this is also $\mathbb E(T)$, where $$T=X\cdot(\mathbf 1_{Y\leqslant X+c}+\mathbf 1_{Y\leqslant X-c}).$$ And finally, this is also $$\mathbb E(\max\{X,Y\})-\mathbb E(Y-X\,;\,0\leqslant Y-X\leqslant c).$$

-