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?
 A: If you ensure that
$$
\begin{cases}
x+1\ge0\\
x-1\ge0\\
2x+1\ge0
\end{cases}
$$
then you can square both sides, because they are guaranteed to exist and, when $a,b\ge0$, $a=b$ if and only if $a^2=b^2$.
The conditions above are equivalent to $x\ge1$.
Squaring we get
$$
x+1+2\sqrt{x^2-1}+x-1=2x+1
$$
that simplifies to
$$
2\sqrt{x^2-1}=1
$$
and you can square again, because both sides are non negative. This gives
$$
4x^2=5.
$$
Since you know that $x\ge1$, the only solution is
$$
x=\frac{\sqrt{5}}{2}.
$$
A: 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.
