Let $U \sim U(0,1)$ and $V\sim U(0,1)$ be two independent uniform random variables. Find the pdf of $U=X-Y$.
My attempt: First find the CDF of U. $$P(U\leq t) = P(X-Y \leq t) = \int_0^1 P(X\leq t+y) F_Y(y) = \int_0^1 F_X(t+y)F_Y(y)$$ Evaluating this integral, I get $F_U(t) = \frac{t}{2}+1/3$. To find the pdf, I differentiate this to obtain $f_U(t) = 1/2$ which I know is wrong but I have no idea where I went wrong.
Any help is appreciated. Thanks.
Slow solution: first, find pdf of $Z=-Y$, which is quite straightforward in two steps: first, find CDF $F_{Z}(z) = P(Y\geq -z)$. The inequality changed because $Z=\varphi(Y)$ is a decreasing function, therefore you want $Y\geq \varphi^{-1}(z)$. Once you have got it, differentiate wrt $z$ to get $f_Z(z): Z \sim R[-1,0]$ is Now you have $$ U=X+Z $$ It is easier to find pdf of $U$ rather than CDF using convolution formula: $$ f_{U}(u) = \int f_{Z}(u-x)f_{X}(x)dx $$ Obvisouly $f_{Z}(u-x)$ is not $0$ only when $-1 <u-x<0$. Therefore you can split the support of the integral into 2 intervals: $$ \int_{0}^{x<u+1}f_X(x)dx \ \text { if } -1 <u<0\\ \int_{x>u}^{1}f_{X}(x)dx \ \text { if } 0<u<1 $$ Outside of these intervals it is $0$.