<s>[INST] simplify the expression ${\sqrt{x - 2\sqrt{x -1}} +\sqrt{x + 2\sqrt{x -1}}}$ 
Simplify the expression ${\sqrt{x - 2\sqrt{x -1}} +\sqrt{x + 2\sqrt{x -1}}}$

The problem is from a not so well renowned book for calculus in India - Concepts of Functions & Calculus - Vikas Rahi, ISBN 9780070080805. The answer for this question is given as
$$\lvert \sqrt{x-1} -1  \rvert + \lvert \sqrt{x-1}+1 \rvert$$
My efforts weren't great at all, I tried rationalizing them but the denominator becomes very similar to the question, which is totally not helpful for simplification.
 [/INST] First, note that
\begin{align}
(1 \pm \sqrt{x-1})^2
&= 1 \pm 2 \sqrt{x-1} + \sqrt{x-1}^2 \\
&= 1 \pm 2 \sqrt{x-1} + x-1 & x \geq 1 \\
&= x \pm 2 \sqrt{x-1}
\end{align}
Thus, since $\sqrt{u^2} = |u|$,
\begin{align}
f(x)
&= \sqrt{x-2\sqrt{x-1}}+\sqrt{x+2\sqrt{x-1}} \\
&= \sqrt{(1-\sqrt{x-1})^2}+\sqrt{(1+\sqrt{x-1})^2} & x \geq 1 \\
&= |1-\sqrt{x-1}|+|1+\sqrt{x-1}| \\
&= \begin{cases}
(1-\sqrt{x-1})+(1+\sqrt{x-1}) & 1 \leq x < 2 \\
-(1-\sqrt{x-1})+(1+\sqrt{x-1}) & 2 \leq x
\end{cases} \\
&= \begin{cases}
2 & 1 \leq x < 2 \\
2 \sqrt{x-1} & 2 \leq x
\end{cases}
\end{align}
</s>