Answer. This equation has two solutions: x = 2 and x = -1.
Solution
1. If x < 0, then |x| = -x and |x-1| = -(x-1), therefore |x| + |x-1| = -x -(x-1) = -2x + 1.
Hence, the equation |x| + |x-1| = 3 takes the form -2x + 1 = 3.
The last equation has the solution x = -1, which satisfies the inequality x < 0.
2. If 0 <= x < 1, then |x| = x and |x-1| = -(x-1), therefore |x| + |x-1| = x -(x-1) = 1.
Hence, the equation |x| + |x-1| = 3 takes the form 1 = 3.
The last equation has no solution.
3. If x >= 1, then |x| = x and |x-1| = (x-1), therefore |x| + |x-1| = x + (x-1) = 2x - 1.
Hence, the equation |x| + |x-1| = 3 takes the form 2x - 1 = 3.
The last equation has the solution x = 2, which satisfies the inequality x >= 1.
The plot of the function y = |x| + |x-1| is presented in the Figure below.
Figure. Plot y = |x| + |x-1|
|