I need to solve the following equation involving absolute value:
$$|x-1| = 1-x$$
Looking at the term $x-1$, I thought I'd divide the interval into parts: $x < 1$ and $x \geq 1$. Now, when $x<1$, $|x-1|$ is negative, which means $|x-1|$ needs to be written as $1-x$. But now I get:
$$1-x = 1-x$$
which is an identity and not a solution. Anyway, so now I moved on to the next part, that of $x \geq 1$. Here $|x-1|$ is positive, and so I have:
$$1-x = x-1$$
which gives $x = 1$.
When I checked the answer, it was $x \leq 1$. I'm not sure how it was reached, but looking back at the equation I can see that $x=0$ is also a solution, which got eliminated during my approach.
Please help me straighten out my thinking here!