Let $X,Y$ be independent random variables with uniform distribution on $[0,2]$. I want to find the p.d.f of $Z=X/Y$.
Here is my solution: $$F_Z(z)=P(Z\leq z)=P(X/Y\leq z)=P(X\leq Yz)$$ Since the joint density is the product of the two densities, then we can write: \begin{align} P(X\leq Yz)& =\int_0^2\int_0^{\min(zy,2)}\frac{1}{4}dxdy\\ & =\int_0^2\frac{1}{4}\min(zy,2)dy\\ \end{align}
Solving out the integral: $$ \int_0^2\frac{1}{4}\min(zy,2)dy= \begin{cases} \int_0^{2/z}\frac{1}{4}zydy+\int_{2/z}^2\frac{1}{4}2dy&\text{if}\, z\geq 1, \\ \int_0^2\frac{1}{4}zydy&\text{if}\, z<1\\ \end{cases} $$
Then I get the distribution $$ F_Z(z)= \begin{cases} 1-1/2z&\text{if}\ z\geq 1, \\ z/2&\text{if}\, z<1\\ \end{cases} $$ Diffrentiating, I get the density: $$ f_Z(z)= \begin{cases} \frac{1}{2z^2}&\text{if}\, z\geq 1 \\ \frac{1}{2}&\text{if}\, z<1\\ 0&\text{if}\, z<0\\ \end{cases} $$
Did I do this correctly? I would love some feedback on my attempt.