PDF of a function

Let X and Y be independent, each uniform on [0,1]. Find the density of XY.

This is what i have done

\begin{align} F(z)&=P(Z\le z)\\ &=P(XY\le z)\\ &=P(X\le \frac{Z}Y) \end{align}

Consider taking a more geometric approach. You can argue that since $X,Y\in\left[0,1\right]$ you must have $z\in\left(0,1\right]$. Therefore, the value of $F_{Z}\left(z\right)\equiv P\left(Z\leq z\right)$ can be represented by the area bounded by

$$x=0,\: x=1,\: y=0,\: y=1,\: y=\frac{z}{x}$$

If you look for example at the case $z=\frac{1}{2}$ shown here, you can easily see that this area is given by

$$F_{Z}\left(z\right)=z\cdot1+\int_{z}^{1}\frac{z}{x}{\rm d}x=z-z\ln z$$

Finally, differentiating gives you

$$f_{Z}\left(z\right)=\frac{{\rm d}F_{Z}\left(z\right)}{{\rm d}z}=-\ln z$$

as requested.

For a fixed $z\in\mathbb{R}$ we have:$$F_{Z}\left(z\right)=\int\int\left[xy\leq z\right]f_{X}\left(x\right)f_{Y}\left(y\right)dxdy=\int_{0}^{1}\int_{0}^{1}\left[xy\leq z\right]dxdy$$

where $\left[xy\leq z\right]$ denotes the function $\mathbb{R}\to\mathbb{R}$ prescribed by $\langle x,y\rangle\mapsto1$ if $xy\leq z$ and $\langle x,y\rangle\mapsto0$ otherwise.

It is obvious that $F_{Z}\left(z\right)=0$ if $z\leq0$ and that $F_{Z}\left(z\right)=1$ if $z\geq1$.

This indicates that we can go for $f_Z(z)=0$ if $z\notin(0,1)$.

For $z\in\left(0,1\right)$ we find:

\begin{aligned}F_{Z}\left(z\right) & =\int_{0}^{z}\int_{0}^{1}\left[xy\leq z\right]dxdy+\int_{z}^{1}\int_{0}^{1}\left[xy\leq z\right]dxdy\\ & =\int_{0}^{z}\int_{0}^{1}dxdy+\int_{z}^{1}\int_{0}^{\frac{z}{y}}dxdy\\ & =\int_{0}^{z}dy+\int_{z}^{1}\frac{z}{y}dy\\ & =z-z\ln z \end{aligned}

Taking its derivative for $z\in\left(0,1\right)$ we find:$$f_{Z}\left(z\right)=-\ln z$$