Here is the problem:
Let $X$ and $Y$ be continuous random variables with joint density function:
$$f(x,y) = \frac{8}{3}xy\text{ for }0 \le x \le 1\text{ and }x \le y \le 2x $$
I'm trying to find the covariance of $X$ and $Y$. I found the best way to do this online, my question is actually about the way that I was trying to work out the problem and how to get around the wall i found.
I know that $\operatorname{Cov}(x,y) = E(XY) - \mu_x\mu_y$.
For this problem I solved $E(XY)$, and I created $F_x(X)$ and found the average through that, Is there a way to solve for the $E(Y)$ from $F_y(Y)$ since it equals $\frac {28}{9}x^3$?
Directly, using the joint density function,
$$E(Y) = \int_{0}^{1}\left(\int_{x}^{2x}\frac{8}{3}xy^2dy\right)dx=\frac{56}{45}$$
The marginal density function is
$$f_Y(y) = \int_{y/2}^{y} \frac{8}{3} xy \,dx=y^3 \,\,\,(0\leq y\leq1)\\f_Y(y)= \int_{y/2}^{1} \frac{8}{3} xy \,dx=\frac{4}{3}\left(y-\frac{y^3}{4}\right)\,\,\,(1<y\leq2)$$
Alternatively,
$$E(Y) = \int_{0}^{2}yf_Y(y)\,dy=\int_{0}^{1}y^4\,dy+\int_{1}^{2}\frac{4}{3}\left(y^2-\frac{y^4}{4}\right)\,dy=\frac{56}{45}$$