cdf of $X/(X+Y)$, where $X$ and $Y$ are i.i.d. uniform $X$ and $Y$ are i.i.d. uniform on $[0,1]$. I am asked to find the cdf of $R=\frac{X}{X+Y}$.
I tried to use the auxiliary variable $S=X+Y$, find the joint pdf and then marginalize, but I am not able to find the support of $(R,S)$.
How would you go to do that?

$P\left[R\leq r\right]=\int_{0}^{1}P\left[R\leq r\mid Y=y\right]dy=\int_{0}^{1}P\left[X\leq\frac{ry}{1-r}\right]dy$.
It is evident that $P\left[R\leq0\right]=0$ and $P\left[R\leq1\right]=1$
so we can focus on the $r$ in interval $\left(0,1\right)$. 
For $\frac{r}{1-r}\leq1$
or equivalently $r\leq\frac{1}{2}$ this leads to $\frac{r}{1-r}\int_{0}^{1}ydy=\frac{r}{2-2r}$.
For $r>\frac{1}{2}$ this leads to $\frac{r}{1-r}\int_{0}^{\frac{1-r}{r}}ydy+\int_{\frac{1-r}{r}}^{1}dy=\frac{3}{2}-\frac{1}{2r}$.
EDIT
In a more general context:
If $X,Y$ are independent real-valued random variables and $f:\mathbb{R}^{2}\rightarrow\mathbb{R}$
is measurable and nonnegative then 

$Ef\left(X,Y\right)=\int\int f\left(x,y\right)dF_{X}\left(x\right)dF_{Y}\left(y\right)$.

If you are looking for the CDF of $R=g\left(X,Y\right)$ then you
can define $f$ by $\left(x,y\right)\mapsto1$ if $g\left(x,y\right)\leq z$
and $\left(x,y\right)\mapsto0$ otherwise. 
This leads to $Ef\left(X,Y\right)=P\left[Z\leq z\right]$
and $P\left[Z\leq z\mid Y=y\right]=\int f\left(x,y\right)dF_{X}\left(x\right)$
and we find 

$P\left[Z\leq z\right]=\int P\left[Z\leq z\mid Y=y\right]dF_{Y}\left(y\right)$. 

This statement is even true if $X,Y$ are not independent, but that is another chapter. The method is convenient if $P\left[Z\leq z\mid Y=y\right]$ is easy to find. 
