I need to find the PDF of $Z=|Y-X|$ given that $X,Y\sim exp(\lambda)$ and both independent.
What I did (I want to use the CDF and not convolutions):
$f_{X,Y}(x,y)=\cases{\lambda^2 e^{-\lambda(x+y)} & if $x,y \ge 0$\cr 0 & otherwise\cr}$
$F_{Z}(z)=P(-z \le Y-X \le z)=P(-z + X \le Y \le z + X)$
I chose $z$ as a fixed point, which results in this picture :
$$
$$
So we're interested in set $E$ which collects all the sandwiched points, we need to integrate capturing them. What I claim is that $y \in [-z+x,z+x]$ and $x \in [0, \infty)$
$$F_{Z}(z) = \int\int_{E}f_{X,Y}(x,y)dydx=\int_{0}^{\infty}\int_{-z+x}^{z+x}f_{X,Y}(x,y)dydx$$
The result I got is a wrong one : $F_{Z}(z)=-\frac{1}{2}(e^{\lambda z}-e^{-\lambda z})$
Question : Are my intervals for $x,y$ false ?
Expected result : $f_{Z}(z) = \lambda e^{-\lambda z}$
Note that $f(x,y)=0$ for some of your integration region.
\begin{align} F_Z(z) &= \int_0^z \int_0^{z+x}f_{X,Y}(x,y) \, \, dydx + \int_z^\infty \int_{-z+x}^{z+x}f_{X,Y}(x,y) \, \, dydx \\ &= \int_0^z \int_0^{z+x}\lambda^2\exp(-\lambda(x+y)) \, \, dydx + \int_z^\infty \int_{-z+x}^{z+x}\lambda^2\exp(-\lambda(x+y)) \, \, dydx \\ \end{align}