I have a such example in my text book
Let Y and Z be two IID random variables each with CDF, $F(\cdot)$. Let $X_1:=min(Y,Z)$ and $X_2:=max(Y,Z)$ with marginals $F_1(\cdot)$ and $F_2(\cdot)$, respectively. We then have \begin{align} P\left(X_{1} \leq x_{1}, X_{2} \leq x_{2}\right)=2 F\left(\min \left\{x_{1}, x_{2}\right\}\right) F\left(x_{2}\right)-F\left(\min \left\{x_{1}, x_{2}\right\}\right)^{2}. \end{align} We can derive this by considering separately the two cases $\text { (i) } x_{2} \leq x_{1} \text { and (ii) } x_{2}>x_{1}$
We would like to compute the copula, $C\left(u_{1}, u_{2}\right) \text {, of }\left(X_{1}, X_{2}\right)$. Towards this end we rst note the two marginals satisfy
\begin{align} \begin{aligned} F_{1}(x) &=2 F(x)-F(x)^{2} \\ F_{2}(x) &=F(x)^{2} \end{aligned} \end{align} But Sklar's Theorem states that$C(\cdot,\cdot)$ satisfies $C\left(F_{1}\left(x_{1}\right), F_{2}\left(x_{2}\right)\right)=F\left(x_{1}, x_{2}\right)$ so if we connect the pieces we will obtain $C\left(u_{1}, u_{2}\right)=2 \min \left\{1-\sqrt{1-u_{1}}, \sqrt{u_{2}}\right\} \sqrt{u_{2}}-\min \left\{1-\sqrt{1-u_{1}}, \sqrt{u_{2}}\right\}^{2}$
My question is how does the Joint CDF $P\left(X_{1} \leq x_{1}, X_{2} \leq x_{2}\right)$ is equal to $2 F\left(\min \left\{x_{1}, x_{2}\right\}\right) F\left(x_{2}\right)-F\left(\min \left\{x_{1}, x_{2}\right\}\right)^{2}$ by using $\text { (i) } x_{2} \leq x_{1} \text { and (ii) } x_{2}>x_{1}$
When $x_2 \leq x_1$ we have $X_1 \leq x_1$ and $X_2 \leq x_2$ if and only if $Y \leq x_2$ and $Z \leq x_2$. [Note that $Y \leq x_2$ implies $Y \leq x_1$ and so $X_1 \leq x_1$ also]. Hence, $P(X_1 \leq x_1$ and $X_2 \leq x_2)=P(Y \leq x_2,Z \leq x_2)=F(x_2)^{2}$. Also, $2 F\left(\min \left\{x_{1}, x_{2}\right\}\right) F\left(x_{2}\right)-F\left(\min \left\{x_{1}, x_{2}\right\}\right)^{2}=2F(x_2)F(x_2)-(F(x_2))^{2}=(F(x_2))^{2}$.
Now let $x_1 <x_2$. Then $P(X_1 \leq x_1, X_2\leq x_2)$ can be split as $P(Y\leq x_1,Z \leq x_2)+P(Y>x_1, Z\leq x_1, Y\leq x_2)$. So we get $F(x_1)F(x_2)+(F(x_2)-F(x_1)) (F(x_1))=2F(x_1)F(x_2)-(F(x_1))^{2}$.