finding the marginal PDF of a random variable with undefined integral

The joint PDF of $X$ and $Y$ is

$$f_{X,Y}(x,y) = \begin{cases}\frac{1}{y}, 0 < x < y, 0 < y < 1\\ 0, \text{otherwise}\end{cases}$$

To find the marginal PDF of $Y$ seems straightforward enough: $$f_Y(y) = \int_0^y \frac{1}{y}dx = \left[\frac{x}{y}\right]_{x=0}^{x=y} = 1$$

But when I try to find the marginal PDF of $X$ I get stuck with what seems to be an undefined integral:

$$f_X(x) = \int_0^1 \frac{1}{y} dy$$

Is there another way to find the marginal PDF of $X$?

• You must have $x<y$ so the lower bound of your integral is..? – Shashi Nov 12 '17 at 8:58

$$f_X(x) = \int_{\color{red}x}^1 \frac1y \, dy$$
since we have $x<y< 1$.