I am asked to find the covariance of $X$ and $Z=min(X,Y)$, where $X$ has exponential distribution $\epsilon(2)$, $Y$ has exponential distribution $\epsilon(3)$ and $X$ and $Y$ are independent. I am trying to find $E(XZ)$. To do this I calculate $$F_{X,Z} (x,z) = p \{X \leq x, Z \leq z \} = p\{X \leq x \} = 1 - e^{-2x}$$, in case $x \leq z$ and $$F_{X,Z} (x,z) = p\{ X \leq z\} + p\{z<X\leq x, Z \leq z \} = (1 - e^{-2z}) + (1 - e^{-2x} - 1 + e^{-2z})(1 - e^{-3z}) = 1 - e^{-2x} - e^{-5z} +e^{-2x -3z}$$, otherwise.
So density function is $F_{X,Z}$ derivated with respect to $x$ and $z$: $$f_{X,Z}(x,z) = 6e^{-3z-2x}$$ when $x > z$, and $0$ otherwise.
But when I integrate this: $$\int_{0}^{+\infty} \int_{0}^{x} 6 e^{-3z-2x} dzdx = \frac{3}{5}$$
I don't get 1. Why ?
$(X,Z)$ is not jointly continuously distributed, so one cannot obtain its density by pointwise differentiation of its CDF. The actual source of the error is that $F$ is not even differentiable at a point $(x,x)$ with $x>0$. You can see this by looking at the directional derivatives, e.g. comparing the unnormalized directional derivative in the directions $(1,0),(0,1)$ and $(1,1)$. The first two should add up to the third if $F$ were differentiable, but they don't.