Closed form solution for logarithmic inequality We have the following inequality that was very hard to be solved in a closed form. Yet, someone solved it this way, and I can't get to fully understand what is done.
eq: $\sqrt{x-2\sqrt{x-1}} + \sqrt{x+2\sqrt{x-1}} +log_2(x-1)=0$
Solution: 
$x\in Df \iff x \geq 1$
We have: $|\sqrt{x-1} -1|+|\sqrt{x-1} +1|+log_2(x-1)=0$
$|\sqrt{x-1} -1|= \{\sqrt{x-1} -1 \ if\ \sqrt{x-1} -1 \geq0\ and\ \sqrt{x-1} -1 \geq0 \Rightarrow x\geq2$
$\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{\ 1 - \sqrt{x-1} \ if\ \sqrt{x-1} -1 \leq0\ and\ \sqrt{x-1} -1 \leq0 \Rightarrow 1\leq x\leq2$
$|\sqrt{x-1} +1|= \{\sqrt{x-1} +1 \ if\ \sqrt{x-1} +1 \geq0\ and\ \sqrt{x-1} +1 \geq0,\ \forall x\geq1$
$\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \{\ -\sqrt{x-1}-1 \ if\ \sqrt{x-1} +1 \leq0\ and\ \sqrt{x-1} +1 \leq0 \Rightarrow x\in \emptyset$
Then, the solution moves to have two intervals for study, (1,2) and (2, +oo[, for which we find the solution to be x = 5/4 on the interval (1,2) and no solution in the second interval. My question is what is the logic of the use of absolute value and replacing x with 1 as you can notice?
 A: The logic of replacing the square root with an absolute value is the formula $$ \sqrt {x^2} = |x|$$ which is correct.
The problem is that there is a mistake in the solution because $ |\sqrt{x-1} -1|$ is substituted for   $ \sqrt{x-\sqrt{x-1}}$ which is not correct.
Note that $$|\sqrt{x-1} -1| =\sqrt {(\sqrt{x-1} -1)^2}= \sqrt{x-2\sqrt{x-1}}$$
Similarly $$|\sqrt{x-1} +1| =\sqrt {(\sqrt{x-1} +1)^2}= \sqrt{x+2\sqrt{x-1}}$$
A: Suppose you have, instead,
$$
\sqrt{x-2\sqrt{x-1}}+\sqrt{x+2\sqrt{x-1}}+\log_2x=0
$$
Then the substitution with the absolute values would be sensible, but there's a better method.
Let $y=\sqrt{x-2\sqrt{x-1}}+\sqrt{x+2\sqrt{x-1}}$; then $y>0$ and
$$
y^2=2x+2\sqrt{x^2-4(x-1)}=2x+2\sqrt{(x-2)^2}
$$
However, $\log_2x$ should be negative, because $y>0$, which implies $1<x<2$. Hence $\sqrt{(x-2)^2}=2-x$ and we have $y^2=4$, so $y=2$. Thus the solution is $\log_2(x-1)=-2$, hence $x-1=1/4$ and therefore
$$
x=\frac{5}{4}
$$
The equation in your question has a solution, but it's strictly between $1.2$ and $1.25=5/4$.
