Solving $\sqrt{x+5} = x - 1$ I'm currently learning about radicals and simplifying them, and I came across this problem on the internet and tried to solve it:
$$\sqrt{x+5} = x - 1$$
So I used this logic:
$$
\begin{align}
\sqrt{x+5} &= x - 1 \\
x + 5 &= (x-1)^2 \\
x + 5 &= (x-1)(x-1) \\
x + 5 &= x^2 - 2x + 1 \\
0 &= x^2 - 3x - 4 \\
0 &= (x-4)(x+1) \\
\end{align}
$$
Therefore, $x = -1$ and $x = 4$ satisfy the equation $0 = (x-4)(x+1)$.
But then I tried to plug them in the original problem $\sqrt{x+5}=x-1$:
$$
\begin{align}
\sqrt{4 + 5} &= 4 - 1 \\
\sqrt{9} &= 3 \\
3 &= 3
\end{align}
$$
So using 4 works as expected, but when using $-1$:
$$
\begin{align}
\sqrt{-1 + 5} &= -1 - 1 \\
\sqrt{4} &= -2 \\
2 &\ne -2
\end{align}
$$
At what stage am I going wrong?
And according the WolframAlpha, the solution is $x = 4$.

The problem is that when you square both sides of an equation you may introduce new roots. The new equation has all the solutions of the original one, but may have some that are not.
From $A^{2}-B^{2}=\left( A-B\right) (A+B)$ you can say that $A-B=0\Rightarrow A^{2}-B^{2}=0$ and $A+B=0\Rightarrow A^{2}-B^{2}=0$. But while $A=B$ is a solution of $A-B=0$, $A=-B$ is not, unless $A=B=0$. In the question $A=\sqrt{x+5}$, $B=x-1$.
As I wrote in this answer, in general the equation $A^n=B^n$ has all the solutions of the equation $A=B$ but may have additional ones. This is a consequence of the algebraic identity 
$$A^n-B^n=(A-B)(A^{n-1}+A^{n-2}B+\cdots +AB^{n-2}+B^{n-1}).$$ 
