$f(x,y)=\dfrac{1}{2x^2y}$ , $1\le x<\infty $ , $\dfrac{1}{x}\le y<x$
Derive marginal probability density function of $X$ and $Y$
I have a problem in calculating marginal of Y.
We have to calculate $\int_{x}f(x,y)dx$
Usually, I draw graphs to get my limits of integration first before calculating marginal distribution but this time I am unable to figure out limits.
Function changes.
I have $y<x$ and $y<1/x$ as well . So how do I calculate marginal in this case?

\begin{align*}f_X(x)&=\int_{y}f(x,y)dy=\int_{1/x}^x\frac{1}{2x^2y}dy=\frac{1}{2x^2}\int_{1/x}^x\left(\ln{y}\right)'dy=\frac{\ln{x}}{x^2}\cdot\mathbf1_{\{x\ge1\}}\end{align*} For $f_Y$ you need to take cases depending on whether $y<1$ or $y\ge 1$. This is best determined from your graph: