# Give the density of the product of independent Uniform random variables

I had a lot of trouble doing this problem on my exam. Can anybody please tell me why my attempt fails?

Let $$X$$~$$Uniform(0,1)$$ and $$Y$$~$$Uniform(0,1)$$ be independent random variables. Find the density of $$Z = XY.$$

Solution attempt: For $$a\in(0,1):$$ $$F_Z(a) = P(Z which is undefined..

• Please, read the MSE-$\tt MathJax$ Tutorial Commented Dec 5, 2022 at 3:42
• @FelixMarin I did. How else would I have formatted everything that I did? Commented Dec 5, 2022 at 4:33

You forgot the condition $$\frac a x <1$$ when you wrote the integral from $$0$$ to $$\frac a x$$. It should be $$\int_0^1\int_0^{\min\{1,a/x\}}1\,\mathrm d y\,\mathrm d x ~=~ \int_a^1\int_0^{\frac{a}x}1\,\mathrm d y\,\mathrm d x+ \int_0^a\int_0^{1}1\,\mathrm d y\,\mathrm d x$$
$$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{{\displaystyle #1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\on}[1]{\operatorname{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\sr}[2]{\,\,\,\stackrel{{#1}}{{#2}}\,\,\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$$ Hereafter, $$\ds{\bracks{\cdots}}$$ is an $$\ds{Iverson\ Bracket}$$. \begin{align} & \color{#44f}{\int_{0}^{1}{\bracks{0< z/x <1} \over x}\dd x} = \bracks{z > 0}\int_{0}^{1} {\bracks{x > z} \over x}\dd x \\[5mm] = & \ \bracks{z > 0}\bracks{z < 1}\int_{z}^{1} {\dd x \over x} = \bbx{\color{#44f}{-\bracks{0 < z < 1}\ln\pars{z}}} \end{align}