<s>[INST] Understanding the equation $|x+1|=x^2 -1$ I want to understand the equation
$$|x+1|=x^2 -1$$
$$\Leftrightarrow x^2 - |x+1| - 1 = 0$$
Case $1$:
$$x+1 \geq 0 \Rightarrow x^2 - x-2 = 0$$
$$x_{1,2} = \frac{1}{2} \big( 1\pm \sqrt{1-4\cdot(-2)} \big) = \frac{1}{2}(1\pm3) \Rightarrow x_1 = 2, x_2 = -1$$
Case $2$:
$$x+1 <  0 \Rightarrow x^2 + x = 0 \Rightarrow x_3= 0 \text{, (but doesn't fulfill } x+1 < 0), x_4 = -1$$
$$\Rightarrow L = \{2,-1\}$$
What I don't get is how $x+1 <  0 \Rightarrow x^2 + x = 0$. How do we get $x^2 + x = 0$?
 [/INST] When $x + 1 < 0$ then the initial equation becomes $$\begin{align*} && -(x+1) &= x^2 - 1 \\ &\iff&-x -1 &= x^2 - 1 \\ &\iff& 0 &= x^2 + x\end{align*}$$
</s>