Why do I get incorrect solutions $ x = 0 $ and $ x = 2 $ for $ x + 1 + \sqrt{4x + 1} = 0 $? Here is my incorrect attempt at solving
$$ x + 1 + \sqrt{4x + 1} = 0. $$
Subtracting $ \sqrt{4x + 1} $ from both sides,
$$ x + 1 = -\sqrt{4x + 1} $$
Squaring both sides,
$$ x^2 + 2x + 1 = 4x + 1 $$
Subtracting $ 4x + 1 $ from both sides,
$$ x^2 - 2x = 0 $$
We have obtained
$$ x(x - 2) = 0 $$
It has two solutions: $ x = 0 $ and $ x = 2 $.
But if we substitute $ x = 0 $ in LHS of the original equation we get
$$ x + 1 + \sqrt{4x + 1} = 1 + \sqrt{1} = 2 $$
If we substitute $ x = 2 $ in LHS of the original equation we get
$$ x + 1 + \sqrt{4x + 1} = 3 + \sqrt{9} = 6 $$
Apparently I have made a mistake in some step that has led to this contradiction. Which step is incorrect in my solution above? It must be the squaring step that changes the minus sign to positive sign.
But squaring both sides is an often used step in many equations. What rules I need to keep in mind while solving such equations so that I do not get incorrect solution after squaring both sides?
 A: Here is one correct way to solve this problem I learnt from comments.
I should write
$$ x + 1 = -\sqrt{4x + 1} \iff \begin{cases} (x + 1)^2 = 4x + 1 \\ (x + 1) \le 0 \end{cases} \iff \begin{cases} x(x - 2) = 0 \\ x \le -1 \end{cases} $$
Then I should solve $ x(x - 2) = 0 $ to get $ x = 0 $ and $ x = 2 $. Then I should reject both solutions because both solutions do not satisfy $ x \le 1 $.
Therefore the equation has no solutions.
A: You can easily track where the extra solutions were introduced.
$$ x + 1 + \sqrt{4x + 1} = 0\to\color{red}{0+1+\sqrt1=0}$$
$$ x + 1 = -\sqrt{4x + 1}\to\color{red}{0+1=-\sqrt{0+1}}$$
$$ x^2 + 2x + 1 = 4x + 1\to\color{green}{0+0+1=0+1}$$
$$ x^2 - 2x = 0\to\color{green}{0-0=0}$$
$$ x(x - 2) = 0\to\color{green}{0(0-2)=0}$$
Repeat with $x=2$.

If you turn $a=b$ to $a^2=b^2$, you also allow $a=-b$.
A: Be careful to square both side,
Make sure both positive...
.
Here my solution.,
Hope this could be referenced....
${x}+\mathrm{1}+\sqrt{\mathrm{4}{x}+\mathrm{1}}=\mathrm{0} \\ $
$\left(\sqrt{\mathrm{4}{x}+\mathrm{1}}\right)^{\mathrm{2}} +\mathrm{4}\sqrt{\mathrm{4}{x}+\mathrm{1}}+\mathrm{3}=\mathrm{0} \\ $
$\left(\sqrt{\mathrm{4}{x}+\mathrm{1}}+\mathrm{3}\right)\left(\sqrt{\mathrm{4}{x}+\mathrm{1}}+\mathrm{1}\right)=\mathrm{0} \\ $
${No}\:{Solution} \\ $
A: Trick question: there will not be any real-number solutions.  If the original equation, $ \  x + 1 + \sqrt{4x + 1} \  =  \ 0 \  $ is considered as a curve intersection equation, we would write $ \ \sqrt{4x + 1} \ = \ -x - 1 \ \   . $  The left side of the equation represents a square-root curve which resembles the "upper half" of a "horizontal" parabola $ \ ( y \ \ge \ 0 ) \ $ with its vertex at $ \ \left( -\frac14 \ , \ 0 \right) \ \ , $ since the domain of this function is $ \ x \ \ge \ -\frac14 \ \ . $  The line $ \ y \ = \ -x - 1 \ $ has the $ \ y-$intercept $ \ (0 \ , \ -1) \ $ and the $ \ x-$ intercept $ \ (-1 \ , \ 0) \ \ , $ so it passes "to the left" of the square-root curve's vertex and never enters the first quadrant.  Hence, there is no intersection of these curves, which means there is no real-number solution for our equation.

The act of squaring both sides of the equation to obtain $ \ 4x + 1 \ = \ (x + 1)^2 \ \ , $ however, produces a second equation which is consistent with this squared equation:  $ \ -\sqrt{4x + 1} \ = \ -x - 1 \ \   . $  Because this new square-root curve is on or "below" the $ \ x-$axis $ \ ( y \ \le \ 0 ) \ \ . $ it can intersect the line $ \ y \ = \ -x - 1 \ $ at the two points that you found:
$$ 4x \ + \ 1 \ \ = \ \ x^2 \ + \ 2x \ + \ 1 \ \ \Rightarrow \ \ x·(x - 2) \ \ = \ \ 0   $$ $$ \Rightarrow  \ \ x \ = \ 0 \ \ , \ \ y \ = \ -\sqrt{4·0 + 1} \ = \ -0 - 1 \   =   \ -1 \ \ \ ; \ \ \  $$
$$ \Rightarrow  \ \ x \ = \ 2 \ \ , \ \ y \ = \ -\sqrt{4·2 + 1} \ = \ -2 - 1 \   =   \ -3 \ \ .  $$
Because the "negative square-root" curve is not implied by our original equation, we must ignore both of these solutions.
There are no "hard-and-fast rules" for solving non-linear equations, since there are so many possibilities for the functions involved.  But it is generally a good idea to consider the properties of the functions you will be working with, and having at least a sketch of the graph for the situation can provide some insight.
[I thought it would be of interest to discuss this problem because it is a rare instance of an equation for which all of its solutions are "spurious".]
