Pdf of $Z=XY$ where $X$ and $Y$ are independent uniform$(0,1)$ variables

Solution 1:

We have for a $z\in(0,1)$ (well, $(0,1)$ is the range of $Z$, we need information only on this interval): $$ \begin{aligned} f_Z(z) &= \int_{-\infty}^{+\infty} \left|\frac{1}{x}\right|\; f_{(X,Y)}\left(x,\color{red}{\frac zx}\right)\; dx \\ &= \int_{-\infty}^{+\infty} \left|\frac{1}{x}\right|\; f_X(x)\; f_Y\left(\color{red}{\frac zx}\right)\; dx \\ &= \int_0^1 \frac{1}{x}\; (1)\; f_Y\left(\color{red}{\frac zx}\right)\; dx \\ &= \int_z^1 \frac{1}{x}\; (1)\; (1)\; dx \\ &=\Big[\ \ln x\ \Big]_{x=z}^{x=1} \\ &=-\ln z\ . \end{aligned} $$ The limits of integration were changed according to $0\le x\le 1$, needed for $f_X(x)\ne 0$, and according to $0\le \frac zx\le 1$, needed for $f_Y(z/x)\ne 0$.