So I have gotten the following joint density function for random continuous variables $X$ and $Y$.
$$ f_{X,Y}(x,y) = \begin{cases} e^{-y} & \mbox{if } 0 < x < y <\infty \\ 0 & \mbox{otherwise.} \end{cases} $$
I want to find the marginal density functions of X. I tried doing the following; $$ f_X(x) = \int_0^\infty e^{-y}dy = 1 $$ Because $e^{-y}$ is a exponential distribution with parameter $\lambda = 1$. However, the answer should be $f_X(x) = e^{-x}$.
I suspect that I am not properly taking the boundaries in account. How can I do that correctly?
Thanks for reading,
K.