$(X,Y)$ has the following joint pdf:
$f_{X,Y}(x,y)=x+y$ if $0<x<1, 0<y<1$
If $U=X+Y$, find the marginal pdf of $U$.
I have tried to do it using transformation.
I have considered the transformation $(X,Y)\rightarrow (U,Y)$ where $U=X+Y$.
Clearly, $0<U<2$.
Now, $x=u-y$.
The jacobian is $J(\frac{x,y}{u,y})=\frac{\delta x}{\delta u}=1$, so $|J|=1$.
So, joint pdf of $(U,Y)$ is:
$f_{U,Y}(u,y)=f_{X,Y}(u-y,y)|J|$
But $-1<u-y<2$, whereas $0<x<1$, so I don't think I can write $f_{X,Y}(u-y,y)=u-y+y=u$. I am getting stuck here.
Please anyone help me solve it. Thanks in advance.
For the purposes of the transformation we consider the map $(X,Y)\to (U, V)$ where $U=X+Y$ and $V=Y$. Following your work it follows that the joint density of $(U,V)$ is given by $$ f_{U,V}(u,v)=f_{X,Y}(u-v, v)=u\quad (0< v<1, v< u< v+1)) $$ and zero otherwise by application of the change of variables formula. Note that the joint density is supported on a parallelogram in the plane (sketch the region). To find the density of $U$ we integrate over $v$ i.e. $$ f_{U}(u)=\int_{S_{u}} f_{U, V}(u,v)\, dv $$ where $S_{u}=\{v\in\mathbb{R}\mid f_{U, V}(u,v)\neq 0\}$ is the slice of the parallelogram on which the joint density does not vanish.
For $0<u\leq 1$, we have $$ f_{U}(u)=\int_{0}^u u\, dv=u^2 $$ while for $1<u\leq 2$ $$ f_{U}(u)=\int_{u-1}^1 u\, dv=u(2-u)=2u-u^2. $$