Given:

$\displaystyle

f(x, y) = xy^2exp(-(x+1)y) \ x, y > 0

$

I needed to calculate the Cov(X,Y).

So I used the formula Cov(X, Y) = E(XY) - E(X)E(Y)

The problem occurs when I go to calculate E(X).

I know $\displaystyle E(X) = \int_o^\infty \! xf_x(x) \, dx. $

Where the marginal pdf of x is $\displaystyle f_x(x) = \frac{2x}{(1 + x)^3} $.

So the integral now is:

$\displaystyle

\int_o^\infty \! \frac{2x^2}{(1 + x)^3} \, dx.

$

Now when I evaluate that integral I get a divergent integral evaluating to $\displaystyle \infty $. I've checked my work several times, but I can't seem to find what I'm doing wrong. Any suggestions?

Thanks in advance.