If $X\sim U(0,1)$ and $Y\sim U(0,X)$ what is the density (distribution) function $f_Y(y)$? If $X\sim U(0,1)$ and $Y\sim U(0,X)$ what is the density (distribution) function $f_Y(y)$?
I know the answer and I also found it on this site (link bellow). However, I just can't get the intuition why the last integral boundaries become from $y$ to $1$?
Step by step solution attempt:
$f_Y(y)=\displaystyle\int_\mathbb{R} f_{Y,X}(y,x)dx=\int_\mathbb{R} f_{Y|X=x}(y)f_{X}(x)dx=\displaystyle\int_\mathbb{R}\frac{1}{X}dx=^{?}\displaystyle\int_y^1\frac{1}{X}dx=-\ln(y)$
Let. X∼U(0,1). Given X=x, let Y∼U(0,x). How can I calculate E(X|Y=y)?

The support of the joint pdf is $0< Y<X <1$
Clearly to "integrate out" $X$ to obtain the marginal pdf of $Y=y$ requires integrating w.r.t. $x$ over the interval $y<x<1$
$$\begin{align}f_Y(y) ~=~& \int_\Bbb R \frac 1 x ~\mathbf 1_{y\in(0;x),x\in(0;1)}~\operatorname d x 
\\[1ex] =~& ~\mathbf 1_{y\in(0;1)}\int_y^1 \frac 1 x ~\operatorname d x 
\\[1ex] =~& -\ln y~\mathbf 1_{y\in(0;1)}\end{align}$$
