# Joint distribution of $X+Y$ and $\frac{X}{X+Y}$

Let $X$ and $Y$ be two random variables i.i.d $U(0,1)$. Find the joint pdf of $T = X+Y$ and $U = \frac{X}{X+Y}$ and the marginal densities of $T$ and $U$

My attempt:

We will have the following transformation:

$X = TU$ and $Y = T - TU$. The jacobian is $J = -ut -t(1-u) = -t$ and the joint pdf:

$$f_{T,U}(t,u) = I_{(0,1)}(tu)I_{(0,1)}(t-tu) |t|$$

where $I$ is the indicatr function

Note that $U$ and $T$ will be jointly defined in the following region:

1) $0 < t < 2$

2) $0 < u < \infty$

3) $0 < tu < 1 \Rightarrow t<\frac{1}{u} (u>0)$

4)$0 < t -tu < 1$

4.1) $u < 1 (t>0)$

4.2) $t < \frac{1}{1-u}$

Integrating in respect of $t$, I could obtain th right pdf of $U$ because I know the answer. But in respect of $u$ I couldn't. Is my region wrong?

P.S: I know how to obtain the pdf of $X+Y$ using other ways, I want it using this joint distribution.

Thanks!

Note that $$I_{(0,1)}(tu)\cdot I_{(0,1)}(t-tu)=I_{(0,2)}(t)\cdot I_{(0,1)}(u)\cdot I_{(1-1/t,1/t)}(u),$$ hence $$f_{T,U}(t,u)=|t|\cdot\left(I_{(0,1)}(t)\cdot I_{(0,1)}(u)+I_{(1,2)}(t)\cdot I_{(1-1/t,1/t)}(u)\right).$$ Integrating this with respect to $u$ yields $$f_T(t)=|t|\cdot\left(I_{(0,1)}(t)+(2/t-1)\cdot I_{(1,2)}(t)\right),$$ thus, $$f_T(t)=t\cdot I_{(0,1)}(t)+(2-t)\cdot I_{(1,2)}(t).$$