# Problems with bounds of integration with a function of uniform random variables.

I am struggling finding the right bounds on integration when I try solve the following:

$$X_1 \sim U[0,1]$$; $$X_2\sim U[1,2]$$.

$$Y_1 = X_1 X_2$$

$$Y_2 = X_1$$

I want to find $$f_{Y_1}$$.

I have gotten to the point where I have:

$$x_1 = y_2$$.

$$x_2=\frac{y_1}{y_2}$$.

$$f_{Y_1,Y_2} (y_1,y_2)= \frac{1}{y_2}$$.

$$x_1 \geq 0: y_2\geq0$$

$$x_1\leq1: y_2\leq1$$

$$x_2\geq1: y_2\leq y_1$$

$$x_2\leq2: y_2\geq \frac{y_1}{2}$$

Putting this together I have for:

$$0\leq y_1 \leq 1$$ -> $$0 \leq \frac{y_1}{2} \leq {y_2} \leq y_1$$

$$1\leq y_1 \leq2$$ -> $$\frac{y_1}{2} \leq {y_2} \leq 1$$

Which to me suggests that

$$f_{Y_1}(y_1) = \int_{\frac{y_1}{2}}^{y_1} \frac{1}{y_2} dy_2 + \int_{\frac{y_1}{2}}^1\frac{1}{y_2} dy_2 = ln(y_1)-2ln(\frac{y_1}{2}) = ln(4y_1)$$

However, $$\int_0^2 f_{Y_1}(y_1)dy_1$$ does not integrate to 1 which indicates that I have messed something up. I would appreciate any pointer to where I have gone wrong.

• $f_{Y_1,Y_2}(y_1,y_2)$ is wrong . How did you get $\frac 1 {y_2}$? Commented Sep 7, 2022 at 8:26
• $f_{Y_1,Y_2}(y_1,y_2)= f_{X_1,X_2}(x_1(y_1,y_2),x_2(y_1,y_2))|J|$. $X_1$ and $X_2$ are independent RVs with $f_{X_i}=1$, so $f_{X_1,X_2}(x_1(y_1,y_2),x_2(y_1,y_2)) =1$, and the Jacobian is $1/y_2$. Commented Sep 7, 2022 at 8:34
• Your $f_{Y_1,Y_2} (y_1,y_2)$ does not integrate to $1$ so you have a problem right in the beginning. Commented Sep 7, 2022 at 8:56
• Okay. I see your point. I did the same approach for $X_2 \sim U[0,1]$ and got the right correct $f_{y_1}$. I also then got the $f_{Y_1,Y_2}$ as I have above. I will take another crack at it. Commented Sep 7, 2022 at 10:22
• I found my answer to $f_{Y_1}$ but I had to go another route. Commented Sep 7, 2022 at 11:34

I found my answer to $$f_{Y_1}$$ but I had to go another route.

$$F_{Y_1}(y_1) = \int_{x_2=1}^1Pr(X_1<\frac{y_1}{x_2})f_{X_2}dx_2$$.
For $$0\leq y_1\leq1$$: $$y_1\int_1^2\frac{1}{t}dt = y_1ln(2)$$.
For $$1\leq y_1\leq2$$: $$\int_1^{y_1}dt + y_1\int_{y_1}^2\frac{1}{t}dt = (y_1-1)+y_1ln(\frac{2}{y})$$.
$$f_{Y_1}(y_1)=\begin{cases} ln(2) \text{ for }y_1\in[0,1] \\ ln(\frac{2}{y_1}) \text{ for } y_1\in[1,2] \end{cases}$$