<s>[INST] Avoiding extraneous solutions When solving quadratic equations like $\sqrt{x+1} + \sqrt{x-1} = \sqrt{2x + 1}$  we are told to solve naively, for example we would get $x \in \{\frac{-\sqrt{5}}{2},\frac{\sqrt{5}}{2}\}$, even though the first solution doesn't work, and then try all the solutions and eliminate the extraneous ones. This is not a very elegant algorithm! How would one use the fact that $\sqrt{x}^2= |x|$ to avoid having to check answers?
 [/INST] Try to square both sides.
$$ \sqrt{x+1} + \sqrt{x-1} = \sqrt{2x+1} \Leftrightarrow $$
$$ \Leftrightarrow \left ( \sqrt{x+1} + \sqrt{x-1} \right )^{2} = \left ( \sqrt{2x+1} \right )^{2} \Leftrightarrow $$
$$ \Leftrightarrow  \left ( \sqrt{x+1} \right )^2 + 2\sqrt{x+1}\sqrt{x-1} + \left ( \sqrt{x-1} \right )^2 = 2x+1 $$
$$ \Leftrightarrow (x+1) + 2\sqrt{(x+1)(x-1)} + (x-1) = 2x+1 \Leftrightarrow $$
$$ \Leftrightarrow \sqrt{(x+1)(x-1)} = \frac{1}{2} \Leftrightarrow $$
$$ \Leftrightarrow (x+1)(x-1) = \frac{1}{4} \Leftrightarrow $$
$$ \Leftrightarrow x^{2} - 1 - \frac{1}{4} = 0 \Leftrightarrow $$
$$ \Leftrightarrow x^{2} - \frac{5}{4} = 0 $$
And now you can just use the quadratic formula.
$$ x = \frac{-(0)\pm \sqrt{(0)^2-4(1)(-\frac{5}{4}})}{2(1)} \Leftrightarrow $$
$$\Leftrightarrow x = \frac{\pm \sqrt{4\times \frac{5}{4}}}{2} \Leftrightarrow $$
$$\Leftrightarrow x = \frac{\pm \sqrt{5}}{2} $$
Also, $ -\frac{\sqrt{5}}{2} $ is not included in the final solution, try to see why...
I hope I have helped. Saclyr.
</s>