Explain the modulus function through this problem?

I have easily solved a lot of log equations which do not involve the modulus function. I know the definition of the modulus function. But, how does this function affect the solutions of a equation? The given equation is an example.Can someone explain me the approach to solving equations having modulus by using this example (detailed explanation will be appreciated)?

The domain gives $x\geq0$.
Now for $0\leq x\leq1$ we get an identity.
For $x>1$ the $|.|$ disappears and we obtain: $$(2\sqrt{x}-1)^2=8\sqrt{x}-7,$$ which gives also $x=4$ and we get the answer: $$[0,1]\cup\left\{4\right\}$$
• @Mriganka Parasar Because $|x|=x$ for $x\geq0$ and $|x|=-x$ for $x\leq0$. In our case for $0\leq x\leq1$ we obtain: $\sqrt{x}+|\sqrt{x}-1|=\sqrt{x}-\sqrt{x}+1=1$. – Michael Rozenberg May 16 '17 at 4:12