# Joint PDF of min and max of iid uniform distributions

$$U_1$$ and $$U_2$$ are identically independently distributed ~uni[0,1]. I'm trying to find the joint PDF between the $$P_1$$=min($$U_1$$, $$U_2$$) and $$P_2$$=max($$U_1$$, $$U_2$$). I have found the marginal pdfs:

$$f_{p1}(y)=2y^2-4y+2$$

$$f_{p2}(x)=2x$$

Since the min and max are not independent, I think the best course of action would be to find the conditional probability by conditioning on $$U_1$$ and then multiplying by the pdf of $$U_1$$. $$\int_0^1 P(min(U_1, U_2)

However, I am stuck now.

Going back to the cdf is always an option (and I don't believe your marginal pdf for $$P_1$$ as it doesn't integrate to 1).
We have, for $$0\leq p_1\leq p_2\leq 1$$ \begin{align*} F_{P_1,P_2}(p_1,p_2)&=\mathbb{P}(P_1\leq p_1, P_2\leq P_2)\\ &=\mathbb{P}(\min(U_1,U_2)\leq p_1,\max(U_1,U_2)\leq p_2)\\ &=\mathbb{P}((U_1,U_2)\in[0,p_1]\times[0,p_2]\cup[0,p_2]\times[0,p_1])\\ &=\mathbb{P}((U_1,U_2)\in[0,p_1]\times[0,p_2]\amalg(p_1,p_2]\times[0,p_1])\\ &=2p_1p_2-p_1^2 \end{align*} so differentiating gives the pdf $$f_{P_1,P_2}(p_1,p_2)=\frac{\partial^2 F_{P_1,P_2}(p_1,p_2)}{\partial p_1\partial p_2}= \begin{cases} 2&\text{if }0