Looking for an efficient way of finding the Covariance of Y/X and XY given a shared pdf I'm trying to do a past test's questions and one seems to be extremely computationally intensive so I was wandering how you'd approach it.
$$f_{X,Y}(x,y) =\begin{cases} \frac{2e^{-2x}}{x} & 0 \leq y\leq x \\ 0 & \textsf{otherwise}\end{cases}$$
Given $U=Y/X$ and $V=XY$ find $\textsf{CoV}(U,V)$ 
My thinking so far is either to replace $U,V$ with $X,Y$, open up the expression and compute it or use the 2×2 transformation formula to find $U,V$'s pdf and continue from there. I think it's doable either way but trying the transformation led to a nasty integral and the using X&Y way is computationally intensive- is this the nature of this question or is there a trick to ease the computation.
 A: $$\operatorname{Cov}[U,V] = \operatorname{E}[UV] - \operatorname{E}[U]\operatorname{E}[V] = \operatorname{E}[Y^2] - \operatorname{E}[Y/X]\operatorname{E}[XY]. \tag{1}$$
Then for $a, b \in \mathbb Z$, with $b \ne -1$,
$$\begin{align}
\operatorname{E}[X^a Y^b] &= \int_{x=0}^\infty \int_{y=0}^x x^a y^b f_{X,Y}(x,y) \, dy \, dx \\
&= \int_{x=0}^\infty 2x^{a-1} e^{-2x} \int_{y=0}^x y^b \, dy \, dx \\
&= \int_{x=0}^\infty 2x^{a-1} e^{-2x} \frac{x^{b+1}}{b+1} \, dx \\
&= \frac{2}{b+1} \int_{x=0}^\infty x^{a+b} e^{-2x} \, dx \\
&= \frac{2}{b+1} \cdot \frac{\Gamma(a+b+1)}{2^{a+b+1}}\int_{x=0}^\infty \frac{2^{a+b+1} x^{(a+b+1)-1} e^{-2x}}{\Gamma(a+b+1)} \, dx \\
&= \frac{(a+b)!}{(b+1) 2^{a+b}}. \tag{2}
\end{align}$$
Here, we used the fact that the integral of a gamma density with shape parameter $a+b+1$ and rate $2$ is equal to $1$ over its support; thus we have the additional restriction that $a+b > -1$.  Since we are only interested in the cases $(a,b) \in \{(0,2), (-1,1), (1,1)\}$ for the covariance, there are no issues with convergence, and the rest of the computation is straightforward.
A: Note that $X\sim\text{Gamma}(k=1,\theta=\frac{1}{2})$ and $Y\vert X \sim \text{Uniform}(0,X)$, so $E[X] = \frac{1}{2}$, $E[X^2] = \frac{1}{2}$, $E[Y|X] = \frac{1}{2}X$, and $E[Y^2\vert X] = \frac{1}{3}X^2$.
Using the tower rule, we get:
$$E[Y/X] = E[E[Y/X\vert X]] = E[E[Y|X]/X] = \frac{1}{2},$$
$$E[XY] = E[E[XY\vert X]] = E[XE[Y|X]] = \frac{1}{2}E[X^2] = \frac{1}{4},$$
and
$$E[Y^2] = E[E[Y^2\vert X]] = \frac{1}{3}E[X^2] = \frac{1}{6},$$
which gives
$$\text{Cov}(Y/X,XY) = E[Y^2] - E[Y/X]E[XY] = \frac{1}{6} - \frac{1}{4}\cdot \frac{1}{2} = \frac{1}{24}.$$
