Density of min(X,Y), max(X,Y) for iid Uniform (Related to other post) I was looking at Determine density of $\min(X,Y)$ and $\max(X,Y)$ for independently uniform distributed variables
There's a very detailed answer, but while I was doing the same exercise by myself I was thinking in a similar but slightly different way, which lead me to a different answer. Here I'll share with you my work so I can understand the why of the difference.
Also, I am making focus on the value of the CDF, and not yet working on the joint pdf.
Given $(Z,W)=(min(X,Y), max(X,Y))$ for $X,Y$ iid Uniform(0,1), find the CDF.
I thought of :
\begin{equation} 
P(Z\leq a,W\leq b)=\\
P(min(X,Y)\leq a,max(X,Y)\leq b)=\\
P( \{X\leq a, a \leq Y\leq b\}  \cup \{a \leq X \leq b, Y\leq a\}  )=(1)\\
P(\{X\leq a, a \leq Y\leq b\}) + P(\{a \leq X \leq b, Y\leq a\})= (2)\\
P(X\leq a) P( a \leq Y\leq b) + P(a \leq X \leq b) P(Y\leq a)= (3)\\
F_X(a)( F_Y(b)-F_Y(a)) + ( F_X(b)-F_X(a)) F_Y(a)=\\
F(a)(F(b)-F(a))+ (F(b)-F(a)) F(a)= (4)\\
2F(a)(F(b)-F(a)) =\\
2F(a)F(b) - 2F(a)^2
\end{equation}
Where $a$ would be the minimum, $b$ the maximum and I use:

*

*{X is the minimum, Y the maximum} union {Y is the minimum, X the maximum}

*Probability of the union of disjoint set

*Independence of $X$ and $Y$

*The fact that $F_X$ = $F_Y$ = $F$
This result is different to $F_{X,Y}(a,b) + F_{X,Y}(b,a) - F_{X,Y}(a,a)$, as given in the original question (there are differences in variable naming, but the setting is essentially the same)
I notice that if I use the idea (4) about equality of CDFs, it would be really close: with the answer to the original question being $- F(a)^2$ compared to $- 2F(a)^2$ in the way I am doing it.
I did the drawings of the regions considered and I can clearly see the missing "infinite square" $(X<a, Y<a)$, but my argument is that if $X$ is the minimum, then $Y$ should be integrated over a region where $Y$ would be the maximum (and vice-versa), hence the difference in the proposed sets considered.

Your
$$P( \{X\leq a, a \leq Y\leq b\}  \cup \{a \leq X \leq b, Y\leq a\}  )$$
Is excluding the cases $X<Y<a$ and $X<Y<a$, when both $X$ and $Y$ are smaller than $a$.
This is because your expression with either $a \leq Y\leq b$ or $a \leq X\leq b$ you make the restriction that at least one of the variables must be above $a$.
When you incorporate these cases with both $X\leq a, Y \leq a$, then your end result will be increased by $P(X \leq a,Y \leq a) = F(a)^2$. You will get a result of $2F(a)F(b)-F(a)^2$ instead of $2F(a)F(b)-2F(a)^2$
