Suppose $X_1, X_2$ are i.i.d from a distribution with cdf $F$ and support on $[0,1]$. The random variables are sampled and then the goal is to compute $P(X_{(1)} < x < X_{(2)})$, the probability a value $x$ lies between the min and the max, in terms of $F$.
I have that the cdf for $X_{(2)}$ is $F(x)^2$, and the cdf of $X_{(1)}$ is $1 - (1 - F(x))^2$. However, trying to compute the probability of this interval I get: $$P(X_{(1)} < x < X_{(2)}) = P(x < X_{(2)}) - P(x < X_{(1)}) = F(x)^2 - (1 - (1-F(x))^2)$$ $$=2F(x)^2 - 2F(x)$$ which is negative on $[0,1]$, so cannot be correct. I'm not sure where the issue is, any help is greatly appreciated.
\begin{align*} P( x \in [X_{(1)}, X_{(2)}]) = 1- P(x \notin [X_{(1)}, X_{(2)}]) \end{align*}
The event $x \notin [X_{(1)}, X_{(2)}]$ is the disjoint union $\{x < X_{(1)}\}\cup \{x > X_{(2)} \}$ thus
\begin{align*} P(x \notin [X_{(1)}, X_{(2)}]) &= P(x < X_{(1)}) + P(x > X_{(2)}) \\ &= (1-F(x))^2 + F(x)^2 \\ &= 1 - 2F(x) + 2 F(x)^2 \end{align*}
Hence,
$$ P( x \in [X_{(1)}, X_{(2)}]) = 2(F(x) -F(x)^2) $$