Explain algebraically how to solve for x in this equation:
$$|x+1| + |x-1| = 2$$
Where the result should be $ -1 \le x \le 1 $.
Also, why is it that an inequality originates from this equation ?
So far I have seen that $|x| = |a| \Leftarrow \Rightarrow x^2 = a^2$, but when I apply this rule I get $x = 0$, which in itself is true, but does not give the correct answer.
Based on the definition of absolute values, one can deduce that $x$ is either $-1$ or $1$. But I just don't understand where the inequality comes from.