<s>[INST] Rewriting inequality given by a fraction so I got the following solution for a problem:
$u(x,)=\begin{cases}
1 & x\leq y \\
\sqrt{\frac{x-1}{y-1}} & 1< x < y\\
0 & x\geq 1
\end{cases} \tag{1}$
and the master solution is
$u(x,)=\begin{cases}
1 & x\leq y \\
\sqrt{\frac{1-x}{1-y}} & y< x<1\\
0 & x\geq 1
\end{cases} \tag{2}$
Look at the second case of both solutions. To get there, I started at $s=\frac{y-x}{y-1}\tag{3}$ whereas the solution started at $s=\frac{x-y}{1-y} \tag{4}$ which is the same since we can multiply it with $1=\frac{-1}{-1}$
Further we know that $0<s<1\tag{5}$
Now we plug in (3) resp. (4) into (5). We multiply with the denominator, resulting in implicitly assuming $y-1>0$ for (3) and $1-y>0$ in (4). We then get (1) resp. (2).
So far, so good. But isn't $\sqrt{\frac{1-x}{1-y}}=\sqrt{\frac{x-1}{y-1}} \tag{6}$? And wouldn't that lead to a contradiction because we could plug that into (1) and (2) and get:
$\sqrt{\frac{1-x}{1-y}}=\sqrt{\frac{x-1}{y-1}}$
for
$1< x < y$ resp. $y < x < 1$? Which contradicts itself, no?
Where is my mistake?
 [/INST] No, it's true:$$\sqrt{\frac{1-x}{1-y}}=\sqrt{\frac{-(1-x)}{-(1-y)}}=\sqrt{\frac{x-1}{y-1}}$$
</s>