$X,Y$ are independent random variables with common PDF $f(x) = e^{-x}$ then density of $X-Y = \text{?}$
I thought of this let $ Y_1 = X + Y$, $Y_2 = \frac{X-Y}{X+Y}$, solving which gives me $X = \frac{Y_1(1 + Y_2)}{2}$, $Y = \frac{Y_1-Y_2}{2}$
then I calculated the Jacobian $J = \begin{bmatrix} \frac{1+y_2}{2} & \frac{y_1}{2} \\ \frac{1}{2} & -\frac{1}{2} \end{bmatrix}$ so that $\left|\det(J)\right| = \frac{1+y_1+y_2}{4}$
and the joint density of $Y_1,Y_2$ is the following $W(Y_1,Y_2) = \left|\det(J)\right| e^{-(y_1+y_2)}$ when $y_1,y_2> 0$ and $0$ otherwise.
Next I thought of recovering $X-Y$ as the marginal but I got stuck. I think i messed up in the variables.
Any help is great!.
\begin{align} \underbrace{\text{For } u>0} \text{ we have } f_{X-Y}(u) & = \frac d {du} \Pr(X-Y\le u) \\[10pt] & = \frac d {du} \operatorname{E}(\Pr(X-Y \le u \mid Y)) \\[10pt] & = \frac d {du} \operatorname{E}(\Pr(X \le u+Y\mid Y)) \\[10pt] & = \frac d {du} \operatorname{E}(1-e^{-(u+Y)}) \\[10pt] & = \frac d {du} \int_0^\infty (1 - e^{-(u+y)} ) e^{-y} \, dy \\[10pt] & = \frac d {du} \int_0^\infty (e^{-y} - e^{-u} e^{-2y}) \, dy \\[10pt] & = \frac d {du} \left( 1 - \frac 1 2 {} e^{-u} \right) \\[10pt] & = \frac 1 2 e^{-u}. \end{align} A similar thing applied when $u<0$ gives you $\dfrac 1 2 e^u,$ so you get $\dfrac 1 2 e^{-|u|}.$
But a simpler way to deal with $u<0$ is to say that since the distribution of $X-Y$ is plainly symmetric about $0$ (since $X-Y$ has the same distribution as $Y-X$), if you get $\dfrac 1 2 e^{-u}$ when $u>0,$ you have to get $\dfrac 1 2 e^u$ when $u<0.$