I want to get the pdf of the product of two random variables $X_1$ and $X_2$. There are a lot of posts describing how to get the CDF, but I'm wondering where my logic is wrong in trying to get the pdf of $Z = X_1X_2$. Say $X_1,X_2$ are uniform $(0,1)$, and so to get
$$\Pr(Z = z) = \Pr(X_1X_2 = z) = \Pr(X_1 = \frac{z}{X_2}) = \int_{0}^{1}f_{x_1}(X_1 = \frac{z}{X_2}\vert\space X_2 = x_2)f_{x_2}(X_2 = x_2)\space dx_2 = \int_{0}^{1}f_{x_1}(X_1 = \frac{z}{x_2})f_{x_2}(X_2 = x_2)\space dx_2$$
Now, we need to look at where $\frac{z}{x_2} \in (0,1)$, which is where $x_2 > z$. so this becomes $$\int_{z}^{1}f_{x_1}(X_1 = \frac{z}{x_2})f_{x_2}(X_2 = x_2)\space dx_2 = \int_z^1 f_{x_1}(\frac{z}{x_2})f_{x_2}(x_2) = \int_z^1 1\times1 dx_2 = 1 - z$$ but this isn't the answer, which is $-\log(z)$. Where did I go wrong? Thanks.
$P\{X_i=a\} =0$ for any $a$. You are talking about continuous random variables but your arguments make sense only for discrete random variables. Are you familiar with integration and density functions?