I am having some problems with this exercise, can someone help me?
Let $X_1,X_2$ be independent and identically uniform on $[0,a]$. Let $U:= \min(X_1,X_2)$ and $V:= \max(X_1,X_2)$.
Calculate the distribution function of $U,V,$ and $E[U],E[V],Cov(U,V)$
So what I have done is: for $F_V(x)\overset{\text{since iid}}=F_{X_1}^2=x^2/a^2$
$F_u(x)\overset{\text{since iid}}=1-(1-F_{X_1})^2=1-(1-\frac{a}{x})^2$
We have $f_v(x)=d/dx(x^2/a^2)=\frac{2x}{a^2}_{(0\leq x\leq a)}$
and for $f_u(x)=d/dx(1-(1-\frac{a}{x})^2)=-\dfrac{2a\cdot\left(1-\frac{a}{x}\right)}{x^2}_{(0\leq x\leq a)}$
So we have $E[V]=\int_{0}^{a}\frac{2x^2}{a^2}=\dfrac{2a}{3}$
And $E[U]=\int_0^a x\dfrac{2a\cdot\left(1-\frac{a}{x}\right)}{x^2}= \infty$
And here starts the problems: I think that how I calculated the two expected values is wrong since I got that E[U] is divergent.
Moreover, if I had calculated the two expected values well, I would not know how to calculate $E[UV]$ to calculate $Cov(U,V)=E[UV]-E[U]E[V]$
Can anyone tell me what am I doing wrong and how should I calculate $E[UV]$?