How to find the p.d.f of $Z = XY$ 
Let $X$ and $Y$ have the p.d.f $$f(x,y) = \begin{cases}1,& 0<x,y<1\\ 0,& \text{ otherwise}.\end{cases}$$ How to find the p.d.f of $Z = XY$?

I know that if $G$ is the c.d.f of $Z$, then $G(z) = P(XY \le z)$, after finding it I compute the derivative. But how to complete from there?
The answer key gives $g(z) = -\ln(z)$ on $(0,1)$ and $0$ elsewhere.
 A: $$\Pr[XY \le z] = \int_{x=0}^1 \int_{y=0}^{\min(z/x,1)} f(x,y) \, dy \, dx = \int_{x=0}^z \int_{y=0}^1 \, dy \, dx + \int_{x=z}^1 \int_{y=0}^{z/x} \, dy \, dx.$$  Can you do the rest?

Alternatively, a somewhat easier calculation is to consider $$\Pr[XY > z] = \int_{x=z}^1 \int_{y=z/x}^1 \, dy \, dx.$$

Since there was some confusion about how the limits of integration were obtained, I have included the following diagram:

The horizontal axis represents outcomes of $X$, and the vertical axis represents outcomes of $Y$, so the light blue square represents points $(X,Y)$ that are joint outcomes of both variables.  Because we know that $X$, $Y$ are joint uniform random variables on $[0,1] \times [0,1]$, it follows that the probability $\Pr[XY \le z]$ corresponds to the area of the combined red region, which is bounded by a family of hyperbolas of the form $xy = z$ for a constant $z \in [0,1]$.  The first method of integration thus requires us to split the red region into two parts; the first is the lighter red rectangle and corresponds to the interval from $x = 0$ to where the hyperbola $y = z/x$ intersects the upper edge of the square $y = 1$; i.e., $x = z$.  The second part is the darker red region corresponding to the remaining interval from $x = z$ to $x = 1$.
But if you study the picture, you can see that there is an easier way:  the area of the square is constant and equal to 1, so we could have obtained the red area by instead computing the area of its complement--the blue region not covered by the red.  This is the second method I describe, which calculates $\Pr[XY > z]$.
A: As $(X,Y)$ is uniformly distributed over $[0,1]^2$, you can also solve this by considering, for $z\in (0,1)$, the area in the unit square defined by $\{(x,y)\in [0,1]^2,\, y\leq z/x\}$. That way, you can easily determine the integral you have to calculate. 
A: This is a Product Distribution.
$$\begin{align}
f_{XY}(z) & = \int_\Bbb R \frac 1 {\lvert x\rvert} f_{X,Y}(x, z/x)\operatorname d x \;\Bbb I_{0<z<1}
\\ & = \int_\Bbb R \frac 1 {\lvert x\rvert} \mathbb  I_{0<x, z/x<1} \operatorname d x \;\Bbb I_{0<z<1}
\\ & = \int_{z}^{1} \frac 1 x \operatorname d x \;\Bbb I_{0<z<1}
\\ & = -\ln z \;\Bbb I_{0<z<1}
\end{align}$$
