I have the following joint density: $$ f_{X,Y}(x,y) =\frac{2}{(1+x)^3} (0<y<x) $$
I want to find the density of X - Y. Now, I found that $f_X(x) = \frac{1}{x} (0<x<\infty)$ and $ f_Y(y) = \mathbb{1} (0,x)$, so X and Y are not independent.
I want to use the following formula that gives me the density function of Z = X + Y:
$$ f_Z(z) = \int f_{X,Y}(x,z-x)dx $$
However I am not sure how should I change it to get the density of X - Y. I tried using $x - z$ instead of $z-x$ but it does not work.
Any hint?
No need to write down marginal densities. $P(X-Y\leq t) =\int _0^{\infty} \int _y ^{y+t} \frac 2 {(1+x)^{3}} dx dy=1-\frac 1 {1+t}$ for $t \geq 0$ and $0$ for $t <0$. Hence the density of $X-Y$ is $\frac 1 {(1+t)^{2}}, 0<t<\infty$. [ To get the limits for integration note that When $t >0$, $x-y < t$ and $0 <y<x$ are equivalent to $y<x<y+t$ and $ x >0$