This question comes from rice 3.14
Suppose that $$f (x, y) = xe^{−x(y+1)}$$ where $0 ≤ x < ∞$, $0 ≤ y < > ∞$ a. Find the marginal densities of X and Y . Are X and Y independent? b. Find the conditional densities of X and Y
to find the marginal densities i have integrated out $x$ and $y$ such that:
\begin{align} f_X(x) & = \int_0^\infty xe^{−x(y+1)} dx \\ & = x \int_0^\infty e^{−x(y+1)} dx\\ & = x \Big[ \frac{e^{−x(y+2)}}{y+2} \Big]_0^\infty\\ & = -\frac{x}{y+2} \space \text{for} 0\leq x < \infty \end{align}
\begin{align} f_Y(y) & = \int_0^\infty xe^{−x(y+1)} dy \\ \end{align}
but i get stuck here. How to solve the integral? is the first marginal distribution correct?
$$f_Y (y)=\int_0^{\infty} xe^{-x(y+1)}dx$$ $$=-\frac x {y+1}e^{-x(y+1)}|_0^{\infty} +\frac 1 {y+1} \int_0^{\infty}e^{-x(y+1)}dx$$ $$=\frac 1{(y+1)^{2}}.$$ $f_X(x)$ is easier: $f_X (x)=\int_0^{\infty} xe^{-x(y+1)}dy=xe^{-x} \int_0^{\infty} e^{-xy} dy=e^{-x}$